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/08/16 04:44:14 UTC

[jira] Commented: (XERCESJ-1178) Error getting prefix for an attribute with no namespace

    [ http://issues.apache.org/jira/browse/XERCESJ-1178?page=comments#action_12428306 ] 
            
Michael Glavassevich commented on XERCESJ-1178:
-----------------------------------------------

>From a post I made on on j-dev list on 08/14/2006:

In my opinion we should be storing the element and attribute namespace URIs from the SAX events and returning them instead of looking them up from the namespace context. This isn't just for performance reasons. It's possible that an attribute reported by the SAX parser may have a namespace but no prefix (for instance if it was defaulted from an XML schema). In such a case the namespace context look-up won't even work.

> Error getting prefix for an attribute with no namespace
> -------------------------------------------------------
>
>                 Key: XERCESJ-1178
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1178
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: StAX
>    Affects Versions: 2.8.0
>            Reporter: Lucian Holland
>
> The initialElementAttrs()  method of SAXXMLStreamReader sets the prefix of attributes to null if it finds no colon in the attribute name; the problem with this is that getAttributeNamespace() uses this prefix when looking up the namespace uri with a call to getNamespaceURI on the NamespaceContextImpl, and this method throws an IllegalArgumentException if null is passed in. 

-- 
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