You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2006/02/14 06:01:10 UTC
[jira] Resolved: (XERCESJ-1135) ArrayIndexOutOfBounds when parsing
an XML Fragment.
[ http://issues.apache.org/jira/browse/XERCESJ-1135?page=all ]
Michael Glavassevich resolved XERCESJ-1135:
-------------------------------------------
Resolution: Fixed
When the document ends abruptly in the middle of the DOCTYPE declaration the scanner was incorrectly recognizing this as the end of a parameter entity which eventually leads to the exception. Should be fixed in SVN now. Thanks for reporting.
> 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
> Assignee: Michael Glavassevich
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org