You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2011/09/06 09:54:10 UTC

[jira] [Commented] (AXIOM-372) Axiom should reject attempts to create illegal namespace declarations

    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097784#comment-13097784 ] 

Hudson commented on AXIOM-372:
------------------------------

Integrated in ws-axiom-trunk #549 (See [https://builds.apache.org/job/ws-axiom-trunk/549/])
    AXIOM-372: OMFactory should throw an exception if an attempt is made to create a prefixed attribute with an empty namespace name.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestAddAttributeWithInvalidNamespace.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMAttributeWithInvalidNamespace.java


> Axiom should reject attempts to create illegal namespace declarations
> ---------------------------------------------------------------------
>
>                 Key: AXIOM-372
>                 URL: https://issues.apache.org/jira/browse/AXIOM-372
>             Project: Axiom
>          Issue Type: Bug
>          Components: API, DOOM, LLOM
>    Affects Versions: 1.2.12
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> According to the Namespaces in XML 1.0 (Second Edition) specification, it is illegal to bind a namespace prefix to the empty namespace URI. Only the default namespace can have an empty URI:
> "[Definition: If the attribute name matches PrefixedAttName, then the NCName gives the namespace prefix, used to associate element and attribute names with the namespace name in the attribute value in the scope of the element to which the declaration is attached. In such declarations, the namespace name may not be empty. ]"
> (Note that this constraint was dropped in the Namespaces in XML 1.1 specification)
> OMElement#declareNamespace doesn't enforce this constraint and namespace declarations that violate this requirement are silently dropped during serialization (by code in OMSerializerUtil#isAssociated). This behavior is problematic because it may result in subtle issues such as unbound namespace prefixes.
> The serialization code should throw an exception if the object model contains an invalid namespace declaration. We should also make sure that Axiom itself never generates such invalid namespace declarations. Indeed, the code in OMSerializerUtil#isAssociated has the following comment:
> "Cannot associate a prefix with an unqualifed name. However sometimes axiom creates a fake prefix name if xmns="" is not in effect."
> If this is true, then Axiom needs to be fixed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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