rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
hash = 31 * hash + ch [i]; | { hash = 31 * hash + ch[i]; } | public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SY... |
} else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; | } else { while (index < bucket.length) { char[] chFound = (char[]) bucket[index]; | public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SY... |
} | private final boolean isWhitespace (char c) { if (c > 0x20) return false; if (c == 0x20 || c == 0x0a || c == 0x09 || c == 0x0d) return true; return false; // illegal ... } | |
if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { | if (handler.stringInterning) { | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... |
enumer = dataBufferToString (); } else { | { enumer = dataBufferToString(); } } else { | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... |
enumer = dataBufferToString (); | { enumer = dataBufferToString(); } | private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.get... |
error ("whitespace required before attribute definition"); parseAttDef (elementName); white = tryWhitespace (); | { error("whitespace required before attribute definition"); } parseAttDef(elementName); white = tryWhitespace(); | private void parseAttlistDecl () throws Exception { String elementName; requireWhitespace (); elementName = readNmtoken (true); boolean white = tryWhitespace (); while (!tryRead ('>')) { if (!white) error ("whitespace required before attribute definition"); parseAttDef (elementName); white = tryW... |
if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if (type == "CDATA" || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMA... | if (handler.stringInterning) { if (type == "CDATA" || type == null) { value = readLiteral(flags); } else { value = readLiteral(flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral(flags); } else { value = readLiteral(flags | LIT_NORMALIZE); | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... |
if (aname.equals (tagAttributes [i])) error ("duplicate attribute", aname, null); | { if (aname.equals(tagAttributes [i])) { error("duplicate attribute", aname, null); } } | private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace /... |
error ("illegal XML character U+" + Integer.toHexString (c)); | { error("illegal XML character U+" + Integer.toHexString(c)); } | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... |
handler.ignorableWhitespace (readBuffer, | { handler.ignorableWhitespace(readBuffer, | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... |
handler.charData (readBuffer, readBufferPos, length); | { handler.charData(readBuffer, readBufferPos, length); } | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... |
error ("character data may not contain ']]>'"); | { error("character data may not contain ']]>'"); } | private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right ... |
private void parseConditionalSect (char saved []) | private void parseConditionalSect(char[] saved) | private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitesp... |
handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); | { handler.verror("Illegal Conditional Section/PE nesting"); } skipWhitespace(); while (!tryRead("]]>")) { parseMarkupdecl(); skipWhitespace(); } } else if (tryRead("IGNORE")) { skipWhitespace(); require('['); | private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitesp... |
handler.verror ("Illegal Conditional Section/PE nesting"); | { handler.verror("Illegal Conditional Section/PE nesting"); } | private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitesp... |
handler.getDeclHandler ().elementDecl (name, "EMPTY"); | { handler.getDeclHandler().elementDecl(name, "EMPTY"); } | private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead... |
handler.getDeclHandler ().elementDecl (name, "ANY"); | { handler.getDeclHandler().elementDecl(name, "ANY"); } | private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead... |
char saved []; | char[] saved; | private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead... |
handler.getDeclHandler ().elementDecl (name, model); | { handler.getDeclHandler().elementDecl(name, model); } | private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead... |
if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { | if (handler.stringInterning) { | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... |
} else { | } } else { | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... |
} else { error ("illegal keyword for attribute default value"); | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... | |
} else value = readLiteral (flags); | else { error("illegal keyword for attribute default value"); } } else { value = readLiteral(flags); } | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... |
setAttribute (elementName, name, type, enumer, value, valueType); if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { | setAttribute(elementName, name, type, enumer, value, valueType); if (handler.stringInterning) { | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... |
if (!skippedPE) handler.getDeclHandler () .attributeDecl (elementName, name, type, defaultType, value); | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... | |
if (!skippedPE) { handler.getDeclHandler().attributeDecl(elementName, name, type, defaultType, value); } } | private void parseDefault ( String elementName, String name, String type, String enumer ) throws Exception { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; String value = null; int flags = LIT_ATTRIBUTE; boolean saved = expandPE; String defaultType = null; // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns... | |
String rootName, ids[]; | String rootName; ExternalIdentifiers ids; | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
handler.doctypeDecl (rootName, ids [0], ids [1]); | handler.doctypeDecl(rootName, ids.publicId, ids.systemId); | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
if (ids [1] == null) subset = handler.getExternalSubset (rootName, handler.getSystemId ()); | if (ids.systemId == null) { subset = handler.getExternalSubset(rootName, handler.getSystemId()); } | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
if (ids [1] != null || subset != null) { pushString (null, ">"); | } if (ids.systemId != null || subset != null) { pushString(null, ">"); | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
if (ids [1] != null) pushURL (true, "[dtd]", ids, null, null, null, true); else { handler.warn ("modifying document by adding external subset"); pushURL (true, "[dtd]", new String [] { subset.getPublicId (), subset.getSystemId (), null }, subset.getCharacterStream (), subset.getByteStream (), subset.getEncoding (), | if (ids.systemId != null) { pushURL(true, "[dtd]", ids, null, null, null, true); } else { handler.warn("modifying document by adding external subset"); pushURL(true, "[dtd]", new ExternalIdentifiers(subset.getPublicId(), subset.getSystemId(), null), subset.getCharacterStream(), subset.getByteStream(), subset.getEncodin... | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
if (inputStack.size () != 1) error ("external subset has unmatched '>'"); | if (inputStack.size() != 1) { error("external subset has unmatched '>'"); } | private void parseDoctypedecl () throws Exception { String rootName, ids[]; // Read the document type name. requireWhitespace (); rootName = readNmtoken (true); // Read the External subset's IDs skipWhitespace (); ids = readExternalIds (false, true); // report (a) declaration of name, (b) lexical info (ids) h... |
Object element []; | ElementDecl element; | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
pushURL (true, "[dtd]", new String [] { publicId, systemId, null }, subset.getCharacterStream (), subset.getByteStream (), subset.getEncoding (), | pushURL(true, "[dtd]", new ExternalIdentifiers(publicId, systemId, null), subset.getCharacterStream(), subset.getByteStream(), subset.getEncoding(), | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
if (inputStack.size () != 1) error ("external subset has unmatched '>'"); | if (inputStack.size() != 1) { error("external subset has unmatched '>'"); } | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
element = (Object []) elementInfo.get (gi); currentElementContent = getContentType (element, CONTENT_ANY); | element = (ElementDecl) elementInfo.get(gi); currentElementContent = getContentType(element, CONTENT_ANY); | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
error ("need whitespace between attributes"); parseAttribute (gi); white = tryWhitespace (); c = readCh (); | { error("need whitespace between attributes"); } parseAttribute(gi); white = tryWhitespace(); c = readCh(); | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
Enumeration atts = declaredAttributes (element); if (atts != null) { | Iterator atts = declaredAttributes(element); if (atts != null) { | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
while (atts.hasMoreElements ()) { aname = (String) atts.nextElement (); | while (atts.hasNext()) { aname = (String) atts.next(); | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
handler.attribute (aname, value, false); | } handler.attribute(aname, value, false); | private void parseElement (boolean maybeGetSubset) throws Exception { String gi; char c; int oldElementContent = currentElementContent; String oldElement = currentElement; Object element []; // This is the (global) counter for the // array of specified attributes. tagAttributePos = 0; // Read the element type... |
private void parseElements (char saved []) | private void parseElements(char[] saved) | private void parseElements (char saved []) throws Exception { char c; char sep; // Parse the first content particle skipWhitespace (); parseCp (); // Check for end or for a separator. skipWhitespace (); c = readCh (); switch (c) { case ')': // VC: Proper Group/PE Nesting if (readBuffer != saved) hand... |
handler.verror ("Illegal Group/PE nesting"); | { handler.verror("Illegal Group/PE nesting"); } | private void parseElements (char saved []) throws Exception { char c; char sep; // Parse the first content particle skipWhitespace (); parseCp (); // Check for end or for a separator. skipWhitespace (); c = readCh (); switch (c) { case ')': // VC: Proper Group/PE Nesting if (readBuffer != saved) hand... |
error ("Illegal character(':') in entity name ", name, null); if (peFlag) { | { error("Illegal character(':') in entity name ", name, null); } if (peFlag) { | private void parseEntityDecl () throws Exception { boolean peFlag = false; int flags = 0; // Check for a parameter entity. expandPE = false; requireWhitespace (); if (tryRead ('%')) { peFlag = true; requireWhitespace (); } expandPE = true; // Read the entity name, and prepend // '%' if necessary. Stri... |
String ids [] = readExternalIds (false, false); | ExternalIdentifiers ids = readExternalIds(false, false); | private void parseEntityDecl () throws Exception { boolean peFlag = false; int flags = 0; // Check for a parameter entity. expandPE = false; requireWhitespace (); if (tryRead ('%')) { peFlag = true; requireWhitespace (); } expandPE = true; // Read the entity name, and prepend // '%' if necessary. Stri... |
error ("whitespace required before NDATA"); requireWhitespace (); String notationName = readNmtoken (true); if (!skippedPE) { setExternalEntity (name, ENTITY_NDATA, ids, notationName); handler.unparsedEntityDecl (name, ids, notationName); } } else if (!skippedPE) { setExternalEntity (name, ENTITY_TEXT, ids, null); hand... | { error("whitespace required before NDATA"); } requireWhitespace(); String notationName = readNmtoken(true); if (!skippedPE) { setExternalEntity(name, ENTITY_NDATA, ids, notationName); handler.unparsedEntityDecl(name, ids.publicId, ids.systemId, ids.baseUri, notationName); } } else if (!skippedPE) { setExternalEntity(n... | private void parseEntityDecl () throws Exception { boolean peFlag = false; int flags = 0; // Check for a parameter entity. expandPE = false; requireWhitespace (); if (tryRead ('%')) { peFlag = true; requireWhitespace (); } expandPE = true; // Read the entity name, and prepend // '%' if necessary. Stri... |
? handler.absolutize (ids [2], ids [1], false) : ids [1]); | ? handler.absolutize(ids.baseUri, ids.systemId, false) : ids.systemId); | private void parseEntityDecl () throws Exception { boolean peFlag = false; int flags = 0; // Check for a parameter entity. expandPE = false; requireWhitespace (); if (tryRead ('%')) { peFlag = true; requireWhitespace (); } expandPE = true; // Read the entity name, and prepend // '%' if necessary. Stri... |
handler.skippedEntity (name); } else error (message); | { handler.skippedEntity(name); } } else { error(message); } | private void parseEntityRef (boolean externalAllowed) throws SAXException, IOException { String name; name = readNmtoken (true); require (';'); switch (getEntityType (name)) { case ENTITY_UNDECLARED: // NOTE: XML REC describes amazingly convoluted handling for // this case. Nothing as meaningful as ... |
char saved [] = null; | char[] saved = null; | private void parseMarkupdecl () throws Exception { char saved [] = null; boolean savedPE = expandPE; // prevent "<%foo;" and ensures saved entity is right require ('<'); unread ('<'); expandPE = false; if (tryRead ("<!ELEMENT")) { saved = readBuffer; expandPE = savedPE; parseElementDecl (); } else... |
if (inputStack.size () > 0) parseConditionalSect (saved); | if (inputStack.size() > 0) { parseConditionalSect(saved); } | private void parseMarkupdecl () throws Exception { char saved [] = null; boolean savedPE = expandPE; // prevent "<%foo;" and ensures saved entity is right require ('<'); unread ('<'); expandPE = false; if (tryRead ("<!ELEMENT")) { saved = readBuffer; expandPE = savedPE; parseElementDecl (); } else... |
error ("conditional sections illegal in internal subset"); } else { error ("expected markup declaration"); | { error("conditional sections illegal in internal subset"); } } else { error("expected markup declaration"); | private void parseMarkupdecl () throws Exception { char saved [] = null; boolean savedPE = expandPE; // prevent "<%foo;" and ensures saved entity is right require ('<'); unread ('<'); expandPE = false; if (tryRead ("<!ELEMENT")) { saved = readBuffer; expandPE = savedPE; parseElementDecl (); } else... |
handler.verror ("Illegal Declaration/PE nesting"); | { handler.verror("Illegal Declaration/PE nesting"); } | private void parseMarkupdecl () throws Exception { char saved [] = null; boolean savedPE = expandPE; // prevent "<%foo;" and ensures saved entity is right require ('<'); unread ('<'); expandPE = false; if (tryRead ("<!ELEMENT")) { saved = readBuffer; expandPE = savedPE; parseElementDecl (); } else... |
private void parseMixed (char saved []) | private void parseMixed(char[] saved) | private void parseMixed (char saved []) throws Exception { // Check for PCDATA alone. skipWhitespace (); if (tryRead (')')) { // VC: Proper Group/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Group/PE nesting"); dataBufferAppend (")*"); tryRead ('*'); return; } // Parse mix... |
handler.verror ("Illegal Group/PE nesting"); | { handler.verror("Illegal Group/PE nesting"); } | private void parseMixed (char saved []) throws Exception { // Check for PCDATA alone. skipWhitespace (); if (tryRead (')')) { // VC: Proper Group/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Group/PE nesting"); dataBufferAppend (")*"); tryRead ('*'); return; } // Parse mix... |
String nname, ids[]; | String nname; ExternalIdentifiers ids; | private void parseNotationDecl () throws Exception { String nname, ids[]; requireWhitespace (); nname = readNmtoken (true); //NE08 if (nname.indexOf(':') >= 0) error ("Illegal character(':') in notation name ", nname, null); requireWhitespace (); // Read the external identifiers. ids = readEx... |
error ("Illegal character(':') in notation name ", nname, null); requireWhitespace (); | { error("Illegal character(':') in notation name ", nname, null); } requireWhitespace(); | private void parseNotationDecl () throws Exception { String nname, ids[]; requireWhitespace (); nname = readNmtoken (true); //NE08 if (nname.indexOf(':') >= 0) error ("Illegal character(':') in notation name ", nname, null); requireWhitespace (); // Read the external identifiers. ids = readEx... |
pushString (name, getEntityValue (name)); | { pushString(name, getEntityValue(name)); } | private void parsePEReference () throws SAXException, IOException { String name; name = "%" + readNmtoken (true); require (';'); switch (getEntityType (name)) { case ENTITY_UNDECLARED: // VC: Entity Declared handler.verror ("reference to undeclared parameter entity " + name); // we should disable ... |
pushString (name, ' ' + getEntityValue (name) + ' '); | { pushString(name, ' ' + getEntityValue(name) + ' '); } | private void parsePEReference () throws SAXException, IOException { String name; name = "%" + readNmtoken (true); require (';'); switch (getEntityType (name)) { case ENTITY_UNDECLARED: // VC: Entity Declared handler.verror ("reference to undeclared parameter entity " + name); // we should disable ... |
pushString (null, " "); pushURL (true, name, getEntityIds (name), null, null, null, true); | { pushString(null, " "); } pushURL(true, name, getEntityIds(name), null, null, null, true); | private void parsePEReference () throws SAXException, IOException { String name; name = "%" + readNmtoken (true); require (';'); switch (getEntityType (name)) { case ENTITY_UNDECLARED: // VC: Entity Declared handler.verror ("reference to undeclared parameter entity " + name); // we should disable ... |
pushString (null, " "); | { pushString(null, " "); } | private void parsePEReference () throws SAXException, IOException { String name; name = "%" + readNmtoken (true); require (';'); switch (getEntityType (name)) { case ENTITY_UNDECLARED: // VC: Entity Declared handler.verror ("reference to undeclared parameter entity " + name); // we should disable ... |
error ("Illegal character(':') in processing instruction name ", name, null); if ("xml".equalsIgnoreCase (name)) error ("Illegal processing instruction target", name, null); if (!tryRead (endDelimPI)) { requireWhitespace (); parseUntil (endDelimPI); | { error("Illegal character(':') in processing instruction name ", name, null); } if ("xml".equalsIgnoreCase(name)) { error("Illegal processing instruction target", name, null); } if (!tryRead(endDelimPI)) { requireWhitespace(); parseUntil(endDelimPI); | private void parsePI () throws SAXException, IOException { String name; boolean saved = expandPE; expandPE = false; name = readNmtoken (true); //NE08 if (name.indexOf(':') >= 0) error ("Illegal character(':') in processing instruction name ", name, null); if ("xml".equalsIgnoreCase (name)) error... |
setupDecoding (encodingName); skipWhitespace (); require ("?>"); | { setupDecoding(encodingName); } skipWhitespace(); require("?>"); | private String parseTextDecl (boolean ignoreEncoding) throws SAXException, IOException { String encodingName = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; // Read an optional version. if (tryRead ("version")) { String version; parseEq (); checkLegalVersion (version = re... |
error ("whitespace required before 'encoding='"); parseEq (); encodingName = readLiteral (flags); | { error("whitespace required before 'encoding='"); } parseEq(); encodingName = readLiteral(flags); | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { ... |
setupDecoding (encodingName); | { setupDecoding(encodingName); } | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { ... |
white = tryWhitespace (); if (tryRead ("standalone")) { | { white = tryWhitespace(); } if (tryRead("standalone")) { | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { ... |
error ("whitespace required before 'standalone='"); parseEq (); standalone = readLiteral (flags); if ("yes".equals (standalone)) | { error("whitespace required before 'standalone='"); } parseEq(); standalone = readLiteral(flags); if ("yes".equals(standalone)) { | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { ... |
else if (!"no".equals (standalone)) error ("standalone flag must be 'yes' or 'no'"); | } else if (!"no".equals(standalone)) { error("standalone flag must be 'yes' or 'no'"); } | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { ... |
handler.xmlDecl(version, encodingName, "yes".equals(standalone), | handler.xmlDecl(version, encodingName, docIsStandalone, | private String parseXMLDecl (boolean ignoreEncoding) throws SAXException, IOException { String version; String encodingName = null; String standalone = null; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; String inputEncoding = null; switch (this.encoding) { ... |
String ename = (String) entityStack.pop (); | String ename = (String) entityStack.removeLast(); | private void popInput () throws SAXException, IOException { String ename = (String) entityStack.pop (); if (ename != null && doReport) dataBufferFlush (); switch (sourceType) { case INPUT_STREAM: handler.endExternalEntity (ename); is.close (); break; case INPUT_READER: handler.endExternalE... |
dataBufferFlush (); switch (sourceType) { | { dataBufferFlush(); } switch (sourceType) { | private void popInput () throws SAXException, IOException { String ename = (String) entityStack.pop (); if (ename != null && doReport) dataBufferFlush (); switch (sourceType) { case INPUT_STREAM: handler.endExternalEntity (ename); is.close (); break; case INPUT_READER: handler.endExternalE... |
handler.endInternalEntity (ename); | { handler.endInternalEntity(ename); } | private void popInput () throws SAXException, IOException { String ename = (String) entityStack.pop (); if (ename != null && doReport) dataBufferFlush (); switch (sourceType) { case INPUT_STREAM: handler.endExternalEntity (ename); is.close (); break; case INPUT_READER: handler.endExternalE... |
Object input [] = (Object[]) inputStack.pop (); | Input input = (Input) inputStack.removeLast(); | private void popInput () throws SAXException, IOException { String ename = (String) entityStack.pop (); if (ename != null && doReport) dataBufferFlush (); switch (sourceType) { case INPUT_STREAM: handler.endExternalEntity (ename); is.close (); break; case INPUT_READER: handler.endExternalE... |
sourceType = ((Integer) input [0]).intValue (); externalEntity = (URLConnection) input [1]; readBuffer = (char[]) input [2]; readBufferPos = ((Integer) input [3]).intValue (); readBufferLength = ((Integer) input [4]).intValue (); line = ((Integer) input [5]).intValue (); encoding = ((Integer) input [6]).intValue (); re... | sourceType = input.sourceType; externalEntity = input.externalEntity; readBuffer = input.readBuffer; readBufferPos = input.readBufferPos; readBufferLength = input.readBufferLength; line = input.line; encoding = input.encoding; readBufferOverflow = input.readBufferOverflow; is = input.is; currentByteCount = input.curren... | private void popInput () throws SAXException, IOException { String ename = (String) entityStack.pop (); if (ename != null && doReport) dataBufferFlush (); switch (sourceType) { case INPUT_STREAM: handler.endExternalEntity (ename); is.close (); break; case INPUT_READER: handler.endExternalE... |
error ("unfinished XML or encoding declaration"); | { error("unfinished XML or encoding declaration"); } | private void prefetchASCIIEncodingDecl () throws SAXException, IOException { int ch; readBufferPos = readBufferLength = 0; is.mark (readBuffer.length); while (true) { ch = is.read (); readBuffer [readBufferLength++] = (char) ch; switch (ch) { case (int) '>': return; case -1: error ("... |
private void pushCharArray (String ename, char ch[], int start, int length) | private void pushCharArray(String ename, char[] ch, int start, int length) | private void pushCharArray (String ename, char ch[], int start, int length) throws SAXException { // Push the existing status pushInput (ename); if (ename != null && doReport) { dataBufferFlush (); handler.startInternalEntity (ename); } sourceType = INPUT_INTERNAL; readBuffer = ch; readBufferPos = sta... |
if (ename != null) { Enumeration entities = entityStack.elements (); while (entities.hasMoreElements ()) { String e = (String) entities.nextElement (); if (e != null && e == ename) { error ("recursive reference to entity", ename, null); | if (ename != null) { Iterator entities = entityStack.iterator(); while (entities.hasNext()) { String e = (String) entities.next(); if (e != null && e == ename) { error("recursive reference to entity", ename, null); | private void pushInput (String ename) throws SAXException { // Check for entity recursion. if (ename != null) { Enumeration entities = entityStack.elements (); while (entities.hasMoreElements ()) { String e = (String) entities.nextElement (); if (e != null && e == ename) { error ("recursive ref... |
entityStack.push (ename); | entityStack.addLast(ename); | private void pushInput (String ename) throws SAXException { // Check for entity recursion. if (ename != null) { Enumeration entities = entityStack.elements (); while (entities.hasMoreElements ()) { String e = (String) entities.nextElement (); if (e != null && e == ename) { error ("recursive ref... |
Object input[] = new Object [12]; | Input input = new Input(); | private void pushInput (String ename) throws SAXException { // Check for entity recursion. if (ename != null) { Enumeration entities = entityStack.elements (); while (entities.hasMoreElements ()) { String e = (String) entities.nextElement (); if (e != null && e == ename) { error ("recursive ref... |
input [0] = new Integer (sourceType); input [1] = externalEntity; input [2] = readBuffer; input [3] = new Integer (readBufferPos); input [4] = new Integer (readBufferLength); input [5] = new Integer (line); input [6] = new Integer (encoding); input [7] = new Integer (readBufferOverflow); input [8] = is; input [9] = new... | input.sourceType = sourceType; input.externalEntity = externalEntity; input.readBuffer = readBuffer; input.readBufferPos = readBufferPos; input.readBufferLength = readBufferLength; input.line = line; input.encoding = encoding; input.readBufferOverflow = readBufferOverflow; input.is = is; input.currentByteCount = curren... | private void pushInput (String ename) throws SAXException { // Check for entity recursion. if (ename != null) { Enumeration entities = entityStack.elements (); while (entities.hasMoreElements ()) { String e = (String) entities.nextElement (); if (e != null && e == ename) { error ("recursive ref... |
inputStack.push (input); | inputStack.addLast(input); | private void pushInput (String ename) throws SAXException { // Check for entity recursion. if (ename != null) { Enumeration entities = entityStack.elements (); while (entities.hasMoreElements ()) { String e = (String) entities.nextElement (); if (e != null && e == ename) { error ("recursive ref... |
char ch[] = s.toCharArray (); pushCharArray (ename, ch, 0, ch.length); | char[] ch = s.toCharArray(); pushCharArray(ename, ch, 0, ch.length); | private void pushString (String ename, String s) throws SAXException { char ch[] = s.toCharArray (); pushCharArray (ename, ch, 0, ch.length); } |
String ids [], | ExternalIdentifiers ids, | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
dataBufferFlush (); scratch.setPublicId (ids [0]); scratch.setSystemId (ids [1]); | { dataBufferFlush(); } scratch.setPublicId(ids.publicId); scratch.setSystemId(ids.systemId); | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
source = handler.resolveEntity (isPE, ename, scratch, ids [2]); if (source == null) { handler.warn ("skipping entity: " + ename); handler.skippedEntity (ename); | source = handler.resolveEntity(isPE, ename, scratch, ids.baseUri); if (source == null) { handler.warn("skipping entity: " + ename); handler.skippedEntity(ename); | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
handler.warn ("missing system ID, using " + ids [1]); systemId = ids [1]; | handler.warn ("missing system ID, using " + ids.systemId); systemId = ids.systemId; | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
systemId = ids [1]; if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { handler.startExternalEntity (ename, systemId, | systemId = ids.systemId; if (handler.stringInterning) { handler.startExternalEntity(ename, systemId, | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
stream = source.getByteStream (); else try { reader = new InputStreamReader ( source.getByteStream (), | { stream = source.getByteStream(); } else { try { reader = new InputStreamReader(source.getByteStream(), | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
} catch (IOException e) { stream = source.getByteStream (); } } else if (systemId == null) error ("InputSource has no URI!"); scratch.setCharacterStream (null); scratch.setByteStream (null); scratch.setEncoding (null); | } catch (IOException e) { stream = source.getByteStream(); } } } else if (systemId == null) { error("InputSource has no URI!"); } scratch.setCharacterStream(null); scratch.setByteStream(null); scratch.setEncoding(null); | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
else { | } else { | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
if ((temp = encoding.indexOf (';')) > 0) encoding = encoding.substring (0, temp); if ((temp = encoding.indexOf ('=', temp + 7)) > 0) { encoding = encoding.substring (temp + 1); | if ((temp = encoding.indexOf(';')) > 0) { encoding = encoding.substring(0, temp); } if ((temp = encoding.indexOf('=', temp + 7)) > 0) { encoding = encoding.substring(temp + 1); | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
if ((temp = encoding.indexOf ('(')) > 0) encoding = encoding.substring (0, temp); | if ((temp = encoding.indexOf('(')) > 0) { encoding = encoding.substring(0, temp); } | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
if ((temp = encoding.indexOf ('"')) > 0) encoding = encoding.substring (temp + 1, encoding.indexOf ('"', temp + 2)); encoding.trim (); } else { handler.warn ("ignoring illegal MIME attribute: " | if ((temp = encoding.indexOf('"')) > 0) { encoding = encoding.substring(temp + 1, encoding.indexOf('"', temp + 2)); } encoding.trim(); } else { handler.warn("ignoring illegal MIME attribute: " | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
is.reset (); | } is.reset(); | private void pushURL ( boolean isPE, String ename, String ids [], // public, system, baseURI Reader reader, InputStream stream, String encoding, boolean doResolve ) throws SAXException, IOException { boolean ignoreEncoding; String systemId; InputSource source; if (!isPE) dataBufferFlush ()... |
} else { String typeString = readNmtoken (true); if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("NOTATION" == typeString) { parseNotationType (); | } else { String typeString = readNmtoken(true); if (handler.stringInterning) { if ("NOTATION" == typeString) { parseNotationType(); | private String readAttType () throws Exception { if (tryRead ('(')) { parseEnumeration (false); return "ENUMERATION"; } else { String typeString = readNmtoken (true); if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("NOTATION" == typeString) { parseNota... |
} else { if ("NOTATION".equals(typeString)) { parseNotationType (); | } } else { if ("NOTATION".equals(typeString)) { parseNotationType(); | private String readAttType () throws Exception { if (tryRead ('(')) { parseEnumeration (false); return "ENUMERATION"; } else { String typeString = readNmtoken (true); if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("NOTATION" == typeString) { parseNota... |
error ("illegal attribute type", typeString, null); | } error("illegal attribute type", typeString, null); | private String readAttType () throws Exception { if (tryRead ('(')) { parseEnumeration (false); return "ENUMERATION"; } else { String typeString = readNmtoken (true); if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("NOTATION" == typeString) { parseNota... |
error ("illegal XML character U+" + Integer.toHexString (c)); | { error("illegal XML character U+" + Integer.toHexString(c)); } | private char readCh () throws SAXException, IOException { // As long as there's nothing in the // read buffer, try reading more data // (for an external entity) or popping // the entity stack (for either). while (readBufferPos >= readBufferLength) { switch (sourceType) { case INPUT_READER: case IN... |
error ("PE reference within decl in internal subset."); parsePEReference (); return readCh (); | { error("PE reference within decl in internal subset."); } parsePEReference(); return readCh(); | private char readCh () throws SAXException, IOException { // As long as there's nothing in the // read buffer, try reading more data // (for an external entity) or popping // the entity stack (for either). while (readBufferPos >= readBufferLength) { switch (sourceType) { case INPUT_READER: case IN... |
filterCR (count >= 0); | { filterCR(count >= 0); } | private void readDataChunk () throws SAXException, IOException { int count; // See if we have any overflow (filterCR sets for CR at end) if (readBufferOverflow > -1) { readBuffer [0] = (char) readBufferOverflow; readBufferOverflow = -1; readBufferPos = 1; sawCR = true; } else { readBufferP... |
} else | } else { | private void readDataChunk () throws SAXException, IOException { int count; // See if we have any overflow (filterCR sets for CR at end) if (readBufferOverflow > -1) { readBuffer [0] = (char) readBufferOverflow; readBufferOverflow = -1; readBufferPos = 1; sawCR = true; } else { readBufferP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.