rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
setInputEncoding("UTF-16LE"); | private void detectEncoding() throws IOException { int[] signature = new int[4]; in.mark(4); for (int i = 0; i < 4; i++) signature[i] = in.read(); in.reset(); // 4-byte encodings if (equals(SIGNATURE_UCS_4_1234, signature)) setInputEncoding("UTF-32BE"); else ... | |
setInputEncoding("UTF-8"); | private void detectEncoding() throws IOException { int[] signature = new int[4]; in.mark(4); for (int i = 0; i < 4; i++) signature[i] = in.read(); in.reset(); // 4-byte encodings if (equals(SIGNATURE_UCS_4_1234, signature)) setInputEncoding("UTF-32BE"); else ... | |
setInputEncoding("UTF-8"); | private void detectEncoding() throws IOException { int[] signature = new int[4]; in.mark(4); for (int i = 0; i < 4; i++) signature[i] = in.read(); in.reset(); // 4-byte encodings if (equals(SIGNATURE_UCS_4_1234, signature)) setInputEncoding("UTF-32BE"); else ... | |
if (!forceReader && in != null) | if (in != null) | void init() throws IOException { if (initialized) return; if (!forceReader && in != null) detectEncoding(); initialized = true; } |
reader.mark(len); | if (unicodeReader != null) unicodeReader.mark(len); else in.mark(len); | void mark(int len) throws IOException { //System.out.println(" mark:"+len); markOffset = offset; markLine = line; markColumn = column; reader.mark(len); } |
int ret = reader.read(); if (ret == 0x0d) | int ret = (unicodeReader != null) ? unicodeReader.read() : in.read(); if (normalize && (ret == 0x0d || (xml11 && (ret == 0x85 || ret == 0x2028)))) { | int read() throws IOException { offset++; int ret = reader.read(); //System.out.println("read1:"+((char) ret)); if (ret == 0x0d) ret = 0x0a; if (ret == 0x0a) { line++; column = 0; } else column++; return ret; } |
} | int read() throws IOException { offset++; int ret = reader.read(); //System.out.println("read1:"+((char) ret)); if (ret == 0x0d) ret = 0x0a; if (ret == 0x0a) { line++; column = 0; } else column++; return ret; } | |
reader.reset(); | if (unicodeReader != null) unicodeReader.reset(); else in.reset(); | void reset() throws IOException { //System.out.println(" reset"); reader.reset(); offset = markOffset; line = markLine; column = markColumn; } |
private void setInputEncoding(String encoding) throws UnsupportedEncodingException { if (!encoding.equals(inputEncoding) && reader instanceof XMLInputStreamReader) | void setInputEncoding(String encoding) throws IOException | private void setInputEncoding(String encoding) throws UnsupportedEncodingException { if (!encoding.equals(inputEncoding) && reader instanceof XMLInputStreamReader) { inputEncoding = encoding; reader = new XMLInputStreamReader((XMLInputStreamReader) reader, ... |
reader = new XMLInputStreamReader((XMLInputStreamReader) reader, encoding); } else { /*if (reporter != null) { try { reporter.report("unable to set input encoding '" + encoding + "': input is specified as reader", "WARNING", encoding, this); | finalizeEncoding(); | private void setInputEncoding(String encoding) throws UnsupportedEncodingException { if (!encoding.equals(inputEncoding) && reader instanceof XMLInputStreamReader) { inputEncoding = encoding; reader = new XMLInputStreamReader((XMLInputStreamReader) reader, ... |
catch (XMLStreamException e) { }}*/ System.err.println("Can't set input encoding "+encoding); } } | private void setInputEncoding(String encoding) throws UnsupportedEncodingException { if (!encoding.equals(inputEncoding) && reader instanceof XMLInputStreamReader) { inputEncoding = encoding; reader = new XMLInputStreamReader((XMLInputStreamReader) reader, ... | |
if (XMLConstants.XML_NS_PREFIX.equals(attr.localName)) { if (!XMLConstants.XML_NS_URI.equals(attr.value)) error("can't redeclare xml prefix"); else return false; } if (XMLConstants.XML_NS_URI.equals(attr.value)) error("can't bind non-xml prefix to XML namespace"); if (XMLConstants.XMLNS_ATTRIBUTE.equals(attr.localName)... | private boolean addNamespace(Attribute attr) throws XMLStreamException { if ("xmlns".equals(attr.name)) { LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst(); if (ctx.get(XMLConstants.DEFAULT_NS_PREFIX) != null) error("Duplicate default namespace declaration"); ctx.put(... | |
inputStack = null; validationStack = null; ids = null; idrefs = null; | public void close() throws XMLStreamException { stack = null; namespaces = null; bases = null; buf = null; attrs = null; doctype = null; } | |
private void expandEntity(String name, boolean inAttr) | private void expandEntity(String name, boolean inAttr, boolean normalize) | private void expandEntity(String name, boolean inAttr) throws IOException, XMLStreamException { if (doctype != null) { Object value = doctype.getEntity(name); if (value != null) { if (xmlStandalone == Boolean.TRUE) { if (doctype.isEntityExterna... |
pushInput(name, text); | pushInput(name, text, !inAttr, normalize); | private void expandEntity(String name, boolean inAttr) throws IOException, XMLStreamException { if (doctype != null) { Object value = doctype.getEntity(name); if (value != null) { if (xmlStandalone == Boolean.TRUE) { if (doctype.isEntityExterna... |
pushInput(name, (ExternalIds) value); if (name != null) startEntityStack.addFirst(name); | pushInput(name, (ExternalIds) value, !inAttr, normalize); | private void expandEntity(String name, boolean inAttr) throws IOException, XMLStreamException { if (doctype != null) { Object value = doctype.getEntity(name); if (value != null) { if (xmlStandalone == Boolean.TRUE) { if (doctype.isEntityExterna... |
if (input.forceReader) return null; | public String getEncoding() { if (input.forceReader) return null; return (input.inputEncoding == null) ? "UTF-8" : input.inputEncoding; } | |
if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) return XMLConstants.XMLNS_ATTRIBUTE_NS_URI; | public String getNamespaceURI(String prefix) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) return XMLConstants.XML_NS_URI; for (Iterator i = namespaces.iterator(); i.hasNext(); ) { LinkedHashMap ctx = (LinkedHashMap) i.next(); String namespaceURI = (String) ctx.get(prefix); if... | |
if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI)) return XMLConstants.XMLNS_ATTRIBUTE; | public String getPrefix(String namespaceURI) { if (XMLConstants.XML_NS_URI.equals(namespaceURI)) return XMLConstants.XML_NS_PREFIX; for (Iterator i = namespaces.iterator(); i.hasNext(); ) { LinkedHashMap ctx = (LinkedHashMap) i.next(); if (ctx.containsValue(namespaceURI)) { ... | |
if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI)) return Collections.singleton(XMLConstants.XMLNS_ATTRIBUTE).iterator(); | public Iterator getPrefixes(String namespaceURI) { if (XMLConstants.XML_NS_URI.equals(namespaceURI)) return Collections.singleton(XMLConstants.XML_NS_PREFIX).iterator(); LinkedList acc = new LinkedList(); for (Iterator i = namespaces.iterator(); i.hasNext(); ) { LinkedHashMap ctx = (LinkedH... | |
if ("gnu.xml.stream.stringInterning".equals(name)) return stringInterning ? Boolean.TRUE : Boolean.FALSE; if ("gnu.xml.stream.xmlBase".equals(name)) return baseAware ? Boolean.TRUE : Boolean.FALSE; if ("gnu.xml.stream.baseURI".equals(name)) return getXMLBase(); | public Object getProperty(String name) throws IllegalArgumentException { if (name == null) throw new IllegalArgumentException("name is null"); if (XMLInputFactory.ALLOCATOR.equals(name)) return null; if (XMLInputFactory.IS_COALESCING.equals(name)) return coalescing ? Boolean.TRUE : Boolean... | |
private boolean isNameCharacter(char c) | private boolean isNameCharacter(int c) | private boolean isNameCharacter(char c) { if (input.xml11) { if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && (c < 0x0030 || c > 0x0039) && c != ':' && c != '_' && c != '-' && c != '.' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 ||... |
{ if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && (c < 0x0030 || c > 0x0039) && c != ':' && c != '_' && c != '-' && c != '.' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 || c > 0x00f6) && (c < 0x00f8 || c > 0x02ff) && (c < 0x0370 || c > 0x037d) && (c < 0x037f || c > 0x1fff) && (c < 0x200c || c > 0x200d)... | return ((c >= 0x0041 && c <= 0x005a) || (c >= 0x0061 && c <= 0x007a) || (c >= 0x0030 && c <= 0x0039) || c == 0x3a | c == 0x5f | c == 0x2d | c == 0x2e | c == 0xB7 | (c >= 0xC0 && c <= 0xD6) || (c >= 0xD8 && c <= 0xF6) || (c >= 0xF8 && c <= 0x2FF) || (c >= 0x300 && c <= 0x37D) || (c >= 0x37F && c <= 0x1FFF) || (c >= 0x20... | private boolean isNameCharacter(char c) { if (input.xml11) { if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && (c < 0x0030 || c > 0x0039) && c != ':' && c != '_' && c != '-' && c != '.' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 ||... |
{ int type = Character.getType(c); switch (type) { case Character.LOWERCASE_LETTER: case Character.UPPERCASE_LETTER: case Character.DECIMAL_DIGIT_NUMBER: case Character.OTHER_LETTER: case Character.TITLECASE_LETTER: case Character.LETTER_NUMBER: case Character.COMBINING_SPACING_MARK: case Character.ENCLOSING_MARK: case... | return (c == 0x2e || c == 0x2d || c == 0x5f || c == 0x3a || isLetter(c) || isDigit(c) || isCombiningChar(c) || isExtender(c)); | private boolean isNameCharacter(char c) { if (input.xml11) { if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && (c < 0x0030 || c > 0x0039) && c != ':' && c != '_' && c != '-' && c != '.' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 ||... |
private boolean isNameStartCharacter(char c) | private boolean isNameStartCharacter(int c) | private boolean isNameStartCharacter(char c) { if (input.xml11) { if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && c != ':' && c != '_' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 || c > 0x00f6) && (c < 0x00f8 || c > 0x02ff) && ... |
{ if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && c != ':' && c != '_' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 || c > 0x00f6) && (c < 0x00f8 || c > 0x02ff) && (c < 0x0370 || c > 0x037d) && (c < 0x037f || c > 0x1fff) && (c < 0x200c || c > 0x200d) && (c < 0x2070 || c > 0x218f) && (c < 0x2c00 || c > 0... | return ((c >= 0x0041 && c <= 0x005a) || (c >= 0x0061 && c <= 0x007a) || c == 0x3a | c == 0x5f | (c >= 0xC0 && c <= 0xD6) || (c >= 0xD8 && c <= 0xF6) || (c >= 0xF8 && c <= 0x2FF) || (c >= 0x370 && c <= 0x37D) || (c >= 0x37F && c <= 0x1FFF) || (c >= 0x200C && c <= 0x200D) || (c >= 0x2070 && c <= 0x218F) || (c >= 0x2C00 &... | private boolean isNameStartCharacter(char c) { if (input.xml11) { if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && c != ':' && c != '_' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 || c > 0x00f6) && (c < 0x00f8 || c > 0x02ff) && ... |
{ int type = Character.getType(c); switch (type) { case Character.LOWERCASE_LETTER: case Character.UPPERCASE_LETTER: case Character.OTHER_LETTER: case Character.TITLECASE_LETTER: case Character.LETTER_NUMBER: if ((c > 0xf900 && c < 0xfffe) || (c >= 0x20dd && c <= 0x20e0)) { return false; } break; default: if (c != ':'... | return (c == 0x5f || c == 0x3a || isLetter(c)); | private boolean isNameStartCharacter(char c) { if (input.xml11) { if ((c < 0x0041 || c > 0x005a) && (c < 0x0061 || c > 0x007a) && c != ':' && c != '_' && (c < 0x00c0 || c > 0x00d6) && (c < 0x00d8 || c > 0x00f6) && (c < 0x00f8 || c > 0x02ff) && ... |
private char literalReadCh() | private int literalReadCh(boolean recognizePEs) | private char literalReadCh() throws IOException, XMLStreamException { char c = readCh(); while (c == '\uffff') { if (inputStack.size() > 1) { inputStack.removeLast(); input = (Input) inputStack.getLast(); // Don't issue end-entity c = readCh()... |
char c = readCh(); while (c == '\uffff') | int c = recognizePEs ? readCh() : read(); while (c == -1) | private char literalReadCh() throws IOException, XMLStreamException { char c = readCh(); while (c == '\uffff') { if (inputStack.size() > 1) { inputStack.removeLast(); input = (Input) inputStack.getLast(); // Don't issue end-entity c = readCh()... |
c = readCh(); | c = recognizePEs ? readCh() : read(); | private char literalReadCh() throws IOException, XMLStreamException { char c = readCh(); while (c == '\uffff') { if (inputStack.size() > 1) { inputStack.removeLast(); input = (Input) inputStack.getLast(); // Don't issue end-entity c = readCh()... |
false, | true, | public static void main(String[] args) throws Exception { boolean xIncludeAware = false; if (args.length > 1 && "-x".equals(args[1])) xIncludeAware = true; XMLParser p = new XMLParser(new java.io.FileInputStream(args[0]), absolutize(null, args[0]), ... |
System.out.println("CHARACTERS '"+reader.getText()+"'"); | System.out.println("CHARACTERS '"+encodeText(reader.getText())+"'"); | public static void main(String[] args) throws Exception { boolean xIncludeAware = false; if (args.length > 1 && "-x".equals(args[1])) xIncludeAware = true; XMLParser p = new XMLParser(new java.io.FileInputStream(args[0]), absolutize(null, args[0]), ... |
System.out.println("CDATA '"+reader.getText()+"'"); | System.out.println("CDATA '"+encodeText(reader.getText())+"'"); | public static void main(String[] args) throws Exception { boolean xIncludeAware = false; if (args.length > 1 && "-x".equals(args[1])) xIncludeAware = true; XMLParser p = new XMLParser(new java.io.FileInputStream(args[0]), absolutize(null, args[0]), ... |
System.out.println("SPACE '"+reader.getText()+"'"); | System.out.println("SPACE '"+encodeText(reader.getText())+"'"); | public static void main(String[] args) throws Exception { boolean xIncludeAware = false; if (args.length > 1 && "-x".equals(args[1])) xIncludeAware = true; XMLParser p = new XMLParser(new java.io.FileInputStream(args[0]), absolutize(null, args[0]), ... |
System.out.println("COMMENT '"+reader.getText()+"'"); | System.out.println("COMMENT '"+encodeText(reader.getText())+"'"); | public static void main(String[] args) throws Exception { boolean xIncludeAware = false; if (args.length > 1 && "-x".equals(args[1])) xIncludeAware = true; XMLParser p = new XMLParser(new java.io.FileInputStream(args[0]), absolutize(null, args[0]), ... |
if (!"".equals(old.name)) | if (old.report) | private void popInput() { Input old = (Input) inputStack.removeLast(); if (!"".equals(old.name)) endEntityStack.addFirst(old.name); input = (Input) inputStack.getLast(); //System.out.print("\n(-input:"+input.systemId+")"); //System.out.println("popInput "+old.name); } |
private void pushInput(String name, String text) | private void pushInput(String name, String text, boolean report, boolean normalize) | private void pushInput(String name, String text) throws IOException, XMLStreamException { // Check for recursion for (Iterator i = inputStack.iterator(); i.hasNext(); ) { Input ctx = (Input) i.next(); if (name.equals(ctx.name)) error("entities may not be self-recursive", name); ... |
input.systemId, name, input.inputEncoding)); | input.systemId, name, input.inputEncoding, report, normalize)); | private void pushInput(String name, String text) throws IOException, XMLStreamException { // Check for recursion for (Iterator i = inputStack.iterator(); i.hasNext(); ) { Input ctx = (Input) i.next(); if (name.equals(ctx.name)) error("entities may not be self-recursive", name); ... |
int ret = input.read(); return ret; | return input.read(); | private int read() throws IOException { int ret = input.read(); //System.out.println("read1:"+(char) ret); return ret; } |
String type = readAttType(acc); | HashSet values = new HashSet(); String type = readAttType(acc, values); if (validating) { if ("ID".equals(type)) { for (Iterator i = doctype.attlistIterator(elementName); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); AttributeDecl decl = (AttributeDecl) entry.getValue(); if ("ID".equals(decl.type)) error("e... | private void readAttDef(String elementName) throws IOException, XMLStreamException { String name = readNmtoken(true); requireWhitespace(); StringBuffer acc = new StringBuffer(); String type = readAttType(acc); String enumer = null; if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) ... |
readDefault(elementName, name, type, enumer); | readDefault(elementName, name, type, enumer, values); | private void readAttDef(String elementName) throws IOException, XMLStreamException { String name = readNmtoken(true); requireWhitespace(); StringBuffer acc = new StringBuffer(); String type = readAttType(acc); String enumer = null; if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) ... |
private String readAttType(StringBuffer acc) | private String readAttType(StringBuffer acc, HashSet values) | private String readAttType(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { readEnumeration(false, acc); return "ENUMERATION"; } else { String typeString = readNmtoken(true); if ("NOTATION".equals(typeString)) { rea... |
readEnumeration(false, acc); | readEnumeration(false, acc, values); | private String readAttType(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { readEnumeration(false, acc); return "ENUMERATION"; } else { String typeString = readNmtoken(true); if ("NOTATION".equals(typeString)) { rea... |
readNotationType(acc); | readNotationType(acc, values); | private String readAttType(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { readEnumeration(false, acc); return "ENUMERATION"; } else { String typeString = readNmtoken(true); if ("NOTATION".equals(typeString)) { rea... |
readLiteral(flags) : readLiteral(flags | LIT_NORMALIZE); | readLiteral(flags, false) : readLiteral(flags | LIT_NORMALIZE, false); | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... |
if (attributeName.equals(":")) error("XML Namespaces forbids names consisting of a single colon"); | if (attributeName.charAt(0) == ':' || attributeName.charAt(attributeName.length() - 1) == ':') error("not a QName", attributeName); | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... |
if (validating && doctype != null) { AttributeDecl decl = doctype.getAttributeDecl(elementName, attributeName); if (decl == null) error("attribute must be declared", attributeName); if ("ENUMERATION".equals(decl.type)) { if (!decl.values.contains(value)) error("value does not match enumeration " + decl.enumeration, v... | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... | |
private char readCh() | private int readCh() | private char readCh() throws IOException, XMLStreamException { char c = (char) read(); if (expandPE && c == '%') { if (peIsError) error("PE reference within decl in internal subset."); parsePEReference(); return readCh(); } return c; } |
char c = (char) read(); if (expandPE && c == '%') | int c = read(); if (expandPE && c == 0x25) | private char readCh() throws IOException, XMLStreamException { char c = (char) read(); if (expandPE && c == '%') { if (peIsError) error("PE reference within decl in internal subset."); parsePEReference(); return readCh(); } return c; } |
parsePEReference(); | expandPEReference(); | private char readCh() throws IOException, XMLStreamException { char c = (char) read(); if (expandPE && c == '%') { if (peIsError) error("PE reference within decl in internal subset."); parsePEReference(); return readCh(); } return c; } |
char c = tmpBuf[i]; | int c = tmpBuf[i]; | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
case ' ': case '\t': case '\n': case '\r': buf.append(c); | case 0x20: case 0x09: case 0x0a: case 0x0d: buf.append(Character.toChars(c)); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
case '&': | case 0x26: | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
if (c == '#') | if (c == 0x23) | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
boolean hex = (c == 'x'); | boolean hex = (c == 0x78); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
case ' ': case '\t': case '\n': case '\r': | case 0x20: case 0x09: case 0x0a: case 0x0d: | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
pushInput("", "&" + entityName + ";"); | pushInput("", "&" + entityName + ";", false, false); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
case '>': | case 0x3e: | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
buf.append(c); | buf.append(Character.toChars(c)); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
case '<': | case 0x3c: | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
done = true; break; | i = len; if (coalescing && tryRead(TEST_CDATA)) readUntil(TEST_END_CDATA); else done = true; break; | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
if ((c < 0x0020 || c > 0xfffd) || (input.xml11 && (c >= 0x007f) && (c <= 0x009f) && (c != 0x0085))) | if (input.xml11) | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
error("illegal XML character", | if (!isXML11Char(c) || isXML11RestrictedChar(c)) error("illegal XML 1.1 character", | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
if (!coalescing && buf.length() >= 2097152) | if (buf.length() >= 2097152) | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
for (char c = readCh(); c != ';' && c != '\uffff'; c = readCh()) b.append(c); | for (int c = readCh(); c != 0x3b && c != -1; c = readCh()) b.append(Character.toChars(c)); | private char[] readCharacterRef(int base) throws IOException, XMLStreamException { StringBuffer b = new StringBuffer(); for (char c = readCh(); c != ';' && c != '\uffff'; c = readCh()) b.append(c); try { int ord = Integer.parseInt(b.toString(), base); if ((ord < 0x20 && !(ord == 0... |
} | private char[] readCharacterRef(int base) throws IOException, XMLStreamException { StringBuffer b = new StringBuffer(); for (char c = readCh(); c != ';' && c != '\uffff'; c = readCh()) b.append(c); try { int ord = Integer.parseInt(b.toString(), base); if ((ord < 0x20 && !(ord == 0... | |
private void readComment() | private void readComment(boolean inDTD) | private void readComment() throws IOException, XMLStreamException { boolean saved = expandPE; expandPE = false; buf.setLength(0); readUntil(TEST_END_COMMENT); require('>'); expandPE = saved; } |
if (inDTD) doctype.addComment(buf.toString()); | private void readComment() throws IOException, XMLStreamException { boolean saved = expandPE; expandPE = false; buf.setLength(0); readUntil(TEST_END_COMMENT); require('>'); expandPE = saved; } | |
private void readContentParticle(StringBuffer acc) | private ContentParticle readContentParticle(StringBuffer acc) | private void readContentParticle(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { acc.append('('); readElements(acc); } else { acc.append(readNmtoken(true)); mark(1); char c = readCh(); switch (c) { case... |
readElements(acc); | cp.content = readElements(acc); | private void readContentParticle(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { acc.append('('); readElements(acc); } else { acc.append(readNmtoken(true)); mark(1); char c = readCh(); switch (c) { case... |
acc.append(readNmtoken(true)); | String name = readNmtoken(true); acc.append(name); cp.content = name; | private void readContentParticle(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { acc.append('('); readElements(acc); } else { acc.append(readNmtoken(true)); mark(1); char c = readCh(); switch (c) { case... |
char c = readCh(); | int c = readCh(); | private void readContentParticle(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { acc.append('('); readElements(acc); } else { acc.append(readNmtoken(true)); mark(1); char c = readCh(); switch (c) { case... |
case '?': case '*': case '+': acc.append(c); | case 0x3f: acc.append('?'); cp.min = 0; cp.max = 1; break; case 0x2a: acc.append('*'); cp.min = 0; cp.max = -1; break; case 0x2b: acc.append('+'); cp.min = 1; cp.max = -1; | private void readContentParticle(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { acc.append('('); readElements(acc); } else { acc.append(readNmtoken(true)); mark(1); char c = readCh(); switch (c) { case... |
return cp; | private void readContentParticle(StringBuffer acc) throws IOException, XMLStreamException { if (tryRead('(')) { acc.append('('); readElements(acc); } else { acc.append(readNmtoken(true)); mark(1); char c = readCh(); switch (c) { case... | |
doctype.addElementDecl(elementName, "EMPTY"); | doctype.addElementDecl(elementName, "EMPTY", new EmptyContentModel()); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.addElementDecl(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.addElementDecl(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); req... |
doctype.addElementDecl(elementName, "ANY"); | doctype.addElementDecl(elementName, "ANY", new AnyContentModel()); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.addElementDecl(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.addElementDecl(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); req... |
acc.append(")*"); tryRead('*'); | acc.append(")"); if (tryRead('*')) { mm.min = 0; mm.max = -1; } | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.addElementDecl(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.addElementDecl(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); req... |
acc.append(readNmtoken(true)); | String name = readNmtoken(true); acc.append(name); mm.addName(name); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.addElementDecl(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.addElementDecl(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); req... |
readElements(acc); doctype.addElementDecl(elementName, acc.toString()); | model = readElements(acc); doctype.addElementDecl(elementName, acc.toString(), model); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.addElementDecl(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.addElementDecl(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); req... |
String type, String enumeration) | String type, String enumeration, HashSet values) | private void readDefault(String elementName, String name, String type, String enumeration) throws IOException, XMLStreamException { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; ... |
value = readLiteral(flags); | value = readLiteral(flags, false); | private void readDefault(String elementName, String name, String type, String enumeration) throws IOException, XMLStreamException { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; ... |
new AttributeDecl(type, value, valueType, enumeration); | new AttributeDecl(type, value, valueType, enumeration, values, inputStack.size() != 1); | private void readDefault(String elementName, String name, String type, String enumeration) throws IOException, XMLStreamException { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; ... |
{ peIsError = expandPE = true; | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... | |
peIsError = expandPE = false; } | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... | |
pushInput("", ">"); pushInput("[dtd]", ids); | pushInput("", ">", false, false); pushInput("[dtd]", ids, true, true); | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... |
char c = readCh(); if (c == '>') | int c = readCh(); if (c == 0x3e) | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... |
else if (c == '\uffff') | else if (c == -1) | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... |
checkDoctype(); if (validating) validateDoctype(); | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... | |
private void readElements(StringBuffer acc) | private ElementContentModel readElements(StringBuffer acc) | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
char separator; | int separator; ElementContentModel model = new ElementContentModel(); | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
readContentParticle(acc); | model.addContentParticle(readContentParticle(acc)); | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
char c = readCh(); | int c = readCh(); | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
case ')': | case 0x29: | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
case '*': case '+': case '?': acc.append(c); | case 0x3f: acc.append('?'); model.min = 0; model.max = 1; break; case 0x2a: acc.append('*'); model.min = 0; model.max = -1; break; case 0x2b: acc.append('+'); model.min = 1; model.max = -1; | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
return; case ',': case '|': | return model; case 0x7c: model.or = true; case 0x2c: | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
acc.append(c); | acc.append(Character.toChars(c)); | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
error("bad separator in content model", new Character(c)); return; | error("bad separator in content model", "U+" + Integer.toHexString(c)); return model; | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
if (c == ')') | if (c == 0x29) | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
case '?': case '*': case '+': acc.append(c); return; | case 0x3f: acc.append('?'); model.min = 0; model.max = 1; break; case 0x2a: acc.append('*'); model.min = 0; model.max = -1; break; case 0x2b: acc.append('+'); model.min = 1; model.max = -1; break; | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
return; | private void readElements(StringBuffer acc) throws IOException, XMLStreamException { char separator; // Parse first content particle skipWhitespace(); readContentParticle(acc); // End or separator skipWhitespace(); char c = readCh(); switch (c) { case ')': acc.append('... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.