void parsePEReference(boolean isEntityValue) throws java.lang.Exception
    {
        String name;

        name = "%" + readNmtoken(true);
        require(';');
        switch (getEntityType(name)) {
            case ENTITY_UNDECLARED:
                error("reference to undeclared parameter entity", name, null);
                break;
            case ENTITY_INTERNAL:
                if (isEntityValue) {
                    pushString(name, getEntityValue(name));
                } else {
                    pushString(name, " " + getEntityValue(name) + ' ');
                }
                break;
            case ENTITY_TEXT:
                if (isEntityValue) {
                    pushString(null, " ");
                }
                pushURL(name, getEntityPublicId(name), getEntitySystemId(name),
                        null, null, null);
                if (isEntityValue) {
                    pushString(null, " ");
                }
                break;
        }
    }