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 2008/11/02 06:47:44 UTC

[jira] Assigned: (XERCESJ-1335) LSParserFilter: Rejection and skipping of nodes fails on startElement() if an element in the subtree has the same name as the filtered node

     [ https://issues.apache.org/jira/browse/XERCESJ-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich reassigned XERCESJ-1335:
---------------------------------------------

    Assignee: Michael Glavassevich

> LSParserFilter: Rejection and skipping of nodes fails on startElement() if an element in the subtree has the same name as the filtered node
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1335
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1335
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (Level 3 Load & Save)
>    Affects Versions: 2.9.1
>            Reporter: Michael Glavassevich
>            Assignee: Michael Glavassevich
>
> With an LSParserFilter, the rejection and skipping of nodes fails on startElement() if an element in the subtree has the same name as the filtered node.  This occurs because the DOM parser uses the name of the element to determine when it has reached the end of the subtree instead of the element depth.  With a recursive structure we end up breaking out in the middle of the subtree which causes the nodes below a skipped node to be attached to the wrong part of the tree.  If the node was rejected it will lead to an NPE.
> Caused by: java.lang.NullPointerException
>    at org.apache.xerces.parsers.AbstractDOMParser.setCharacterData(AbstractDOMParser.java:2578)
>    at org.apache.xerces.parsers.AbstractDOMParser.endElement(AbstractDOMParser.java:1317)
>    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:673)
>    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1645)
>    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:849)
>    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:772)
>    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
>    at org.apache.xerces.parsers.DOMParserImpl.parse(DOMParserImpl.java:937)
>    ... 3 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org