ArrayIndexOutOfBounds when parsing an XML Fragment.
---------------------------------------------------

         Key: XERCESJ-1135
         URL: http://issues.apache.org/jira/browse/XERCESJ-1135
     Project: Xerces2-J
        Type: Bug
  Components: SAX  
    Versions: 2.7.1    
 Environment: Windows, Linux....
    Reporter: Radu Coravu
    Priority: Minor


We try to parse the following fragment using an XMLReader :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main Document Type//EN" 
"http://www.tei-c.org/Guidelines/DTD/tei2.dtd"; [
<!ENTITY % TEI.prose 'INCLUDE'>
<!ENTITY % TEI.linking 'INCLUDE'>
<!ENTITY % TEI.figures 'INCLUDE'>
<!ENTITY % TEI.analysis 'INCLUDE'>
<!ENTITY % TEI.XML 'INCLUDE'>
<!ENTITY % ISOlat1 SYSTEM 
'http://www.tei-c.org/Entity_Sets/Unicode/iso-lat1.ent'>
%ISOlat1;
<!ENTITY % ISOlat2 SYSTEM 
'http://www.tei-c.org/Entity_Sets/Unicode/iso-lat2.ent'>
%ISOlat2;


Sample source code:

    XMLReader reader = new org.apache.xerces.parsers.SAXParser();
    reader.setEntityResolver(new EntityResolver() {
        public InputSource resolveEntity(String publicId, String systemId) {
            return new InputSource(new StringReader(""));
        }    
    });
    reader.parse(new InputSource(new StringReader(toCheck)));

Where "toCheck" is the XML fragment pasted above.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to