< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
Print this page
*** 731,753 ****
// Driver methods
//
public int next() throws IOException, XNIException {
- if(DEBUG_NEXT){
- System.out.println("NOW IN XMLDeclDriver");
- }
// next driver is prolog regardless of whether there
// is an XMLDecl in this document
setScannerState(SCANNER_STATE_PROLOG);
setDriver(fPrologDriver);
//System.out.println("fEntityScanner = " + fEntityScanner);
// scan XMLDecl
try {
! if (fEntityScanner.skipString(xmlDecl)) {
if (fEntityScanner.peekChar() == ' ') {
fMarkupDepth++;
scanXMLDeclOrTextDecl(false);
} else {
// PI, reset position
--- 731,750 ----
// Driver methods
//
public int next() throws IOException, XNIException {
// next driver is prolog regardless of whether there
// is an XMLDecl in this document
setScannerState(SCANNER_STATE_PROLOG);
setDriver(fPrologDriver);
//System.out.println("fEntityScanner = " + fEntityScanner);
// scan XMLDecl
try {
! if (fEntityScanner.skipString(XMLDECL)) {
if (fEntityScanner.peekChar() == ' ') {
fMarkupDepth++;
scanXMLDeclOrTextDecl(false);
} else {
// PI, reset position
*** 795,809 ****
* @throws IOException Thrown on i/o error.
* @throws XNIException Thrown on parse error.
*/
public int next() throws IOException, XNIException {
- //System.out.println("here in next");
- if(DEBUG_NEXT){
- System.out.println("NOW IN PrologDriver");
- }
try {
do {
switch (fScannerState) {
case SCANNER_STATE_PROLOG: {
fEntityScanner.skipSpaces();
--- 792,802 ----
*** 1012,1032 ****
//
// Driver methods
//
public int next() throws IOException, XNIException{
- // throw new XNIException("DTD Parsing is currently not supported");
- if(DEBUG_NEXT){
- System.out.println("Now in DTD Driver");
- }
dispatch(true);
- if(DEBUG_NEXT){
- System.out.println("After calling dispatch(true) -- At this point whole DTD is read.");
- }
-
//xxx: remove this hack and align this with reusing DTD components
//currently this routine will only be executed from Stax
if(fPropertyManager != null){
dtdGrammarUtil = new DTDGrammarUtil(((XMLDTDScannerImpl)fDTDScanner).getGrammar(),fSymbolTable, fNamespaceContext);
}
--- 1005,1017 ----
*** 1378,1391 ****
null);
}
break;
}
}
! }while(fScannerState == SCANNER_STATE_START_OF_MARKUP || fScannerState == SCANNER_STATE_TRAILING_MISC);
! if(DEBUG_NEXT){
! System.out.println("State set by deciding while loop [TrailingMiscellaneous] is = " + getScannerStateName(fScannerState));
! }
switch (fScannerState){
case SCANNER_STATE_PI: {
fContentBuffer.clear();
scanPI(fContentBuffer);
setScannerState(SCANNER_STATE_TRAILING_MISC);
--- 1363,1375 ----
null);
}
break;
}
}
! } while(fScannerState == SCANNER_STATE_START_OF_MARKUP ||
! fScannerState == SCANNER_STATE_TRAILING_MISC);
!
switch (fScannerState){
case SCANNER_STATE_PI: {
fContentBuffer.clear();
scanPI(fContentBuffer);
setScannerState(SCANNER_STATE_TRAILING_MISC);
< prev index next >