[
https://issues.apache.org/jira/browse/WSCOMMONS-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485323
]
Alexander Veit commented on WSCOMMONS-140:
------------------------------------------
> ... doesn't the IllegalArgumentException seem a little broken to you?
The IllegalArgumentException should probably enforce explicit coding and ensure
fail-fast behaviour of code that uses the QName class. To me, this seems to be
a good practice.
However, in my opinion, QName shouldn't deal with prefixes at all. The
semantics of namespace qualified names is solely determined by the namespace
URI and the local name*. Prefixes come only into play when we have to process
or create a serialized form of XML. In these cases, since namespace to prefix
mappings are generally not element-local, it is more natural to handle these
mappings in separate data structures.
--
Just my 2 cents
Alex
* sometimes we may need the ancestor:: axis in an instance document, too
> org.apache.axiom.om.impl.dom.AttrImpl#getQName() fails for null namespace
> prefixes
> ----------------------------------------------------------------------------------
>
> Key: WSCOMMONS-140
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-140
> Project: WS-Commons
> Issue Type: Bug
> Reporter: Alexander Veit
> Assigned To: Glen Daniels
>
> javax.xml.namespace.QName implementations normally throw an
> IllegalArgumentException if a null namespace prefix is given as a
> construction parameter.
> See also WSCOMMONS-139.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]