code: private void expandPE()
          throws XMLStreamException
      {
          String id;
          char c;
  
          if (mCheckForbiddenPEs) {
              /* Ok; we hit a PE where we should not have (within the internal
               * dtd subset proper, within a declaration). This is a WF error.
               */
              throwForbiddenPE();
          }
  
          // 01-Jul-2004, TSa: When flattening, need to flush previous output
          if (mFlattenWriter != null) {
              // Flush up to but not including ampersand...
              mFlattenWriter.flush(mInputBuffer, mInputPtr-1);
              mFlattenWriter.disableOutput();
              c = (mInputPtr < mInputEnd) ?
                  mInputBuffer[mInputPtr++] : dtdNextFromCurr();
              id = readDTDName(c);
              try {
                  c = (mInputPtr < mInputEnd) ?
                      mInputBuffer[mInputPtr++] : dtdNextFromCurr();
              } finally {
                  // will ignore name and colon (or whatever was parsed)
                  mFlattenWriter.enableOutput(mInputPtr);
              }
          } else {
              c = (mInputPtr < mInputEnd) ?
                  mInputBuffer[mInputPtr++] : dtdNextFromCurr();
              id = readDTDName(c);
              c = (mInputPtr < mInputEnd) ?
                  mInputBuffer[mInputPtr++] : dtdNextFromCurr();
          }
          
          // Should now get semicolon...
          if (c != ';') {
              throwDTDUnexpectedChar(c, "; expected ';' to end parameter entity name");
          }
          mExpandingPE = true;
          expandEntity(id, true, ENTITY_EXP_PE);
      }
docs: Method called to handle expansion of parameter entities. When called,
  '%' character has been encountered as a reference indicator, and
  now we should get parameter entity name.