Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Update
xerces-j2
scan-pseudo-attribute.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File scan-pseudo-attribute.patch of Package xerces-j2
--- xerces/src/org/apache/xerces/impl/XMLScanner.java 2013/07/03 18:25:06 1499505 +++ xerces/src/org/apache/xerces/impl/XMLScanner.java 2013/07/03 18:29:43 @@ -542,7 +542,7 @@ // document is until we scan the encoding declaration // you cannot reliably read any characters outside // of the ASCII range here. -- mrglavas - String name = fEntityScanner.scanName(); + String name = scanPseudoAttributeName(); XMLEntityManager.print(fEntityManager.getCurrentEntity()); if (name == null) { reportFatalError("PseudoAttrNameExpected", null); @@ -599,6 +599,35 @@ } // scanPseudoAttribute(XMLString):String /** + * Scans the name of a pseudo attribute. The only legal names + * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'. + * + * @return the name of the pseudo attribute or <code>null</code> + * if a legal pseudo attribute name could not be scanned. + */ + private String scanPseudoAttributeName() throws IOException, XNIException { + final int ch = fEntityScanner.peekChar(); + switch (ch) { + case 'v': + if (fEntityScanner.skipString(fVersionSymbol)) { + return fVersionSymbol; + } + break; + case 'e': + if (fEntityScanner.skipString(fEncodingSymbol)) { + return fEncodingSymbol; + } + break; + case 's': + if (fEntityScanner.skipString(fStandaloneSymbol)) { + return fStandaloneSymbol; + } + break; + } + return null; + } // scanPseudoAttributeName() + + /** * Scans a processing instruction. * <p> * <pre>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor