You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2011/07/16 19:51:59 UTC

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

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


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

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068894#comment-13068894 ] 

Andreas Veithen commented on AXIOM-372:
---------------------------------------

Although XML 1.1 allows writing a namespace declaration such as xmlns:p="", this actually doesn't bind the empty namespace name to the prefix, but instead undeclares the prefix, i.e. "p" is no longer a valid prefix in the scope where this declaration appears. Although the same syntax is used in both cases, adding a namespace declaration to bind a prefix to a (non empty) namespace URI and adding a namespace declaration to undeclare a prefix are two fundamentally different operations from the point of view of the application, and it would make sense to implement them using two different methods. Therefore the proposed solution is as follows:

1. Let OMElement#declareNamespace(String, String) and OMElement#declareNamespace(OMNamespace) throw an exception if an attempt is made to bind the empty namespace name to a prefix (instead of or in addition to throwing an exception in the serialization code). This has the additional advantage of simplifying the identification of code that (accidentally) attempts to create an invalid namespace binding.

2. Add a new method undeclarePrefix(String) to OMElement that allows creating a namespace declaration that undeclares a prefix (and which meant to be used only by XML 1.1 aware code).

> 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


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

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068923#comment-13068923 ] 

Andreas Veithen commented on AXIOM-372:
---------------------------------------

As a corollary of the above, neither XML 1.0 nor XML 1.1 allows creating prefixed elements or attributes with an empty namespace name. When attempting to create such invalid information items, the current behavior of OMFactory is inconsistent: in some cases, the prefix is silently dropped, in other cases the invalid information item is actually created, resulting in problems during serialization. This should be changed so that an exception is thrown by the relevant methods in OMFactory.

> 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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069165#comment-13069165 ] 

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

Integrated in ws-axiom-trunk #448 (See [https://builds.apache.org/job/ws-axiom-trunk/448/])
    AXIOM-372: Make sure that an exception is thrown if an attempt is made to bind a prefix to the empty namespace name.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDeclareNamespaceInvalid.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestSetNamespaceInvalid.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.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/TestDeclareNamespaceInvalid2.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDeclareNamespaceInvalid1.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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ 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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068886#comment-13068886 ] 

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

Integrated in ws-axiom-trunk #443 (See [https://builds.apache.org/job/ws-axiom-trunk/443/])
    AXIOM-372: Started to add a section about illegal namespace declarations to the user guide (not yet finished).

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/src/docbkx/userguide.xml


> 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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069780#comment-13069780 ] 

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

Integrated in ws-axiom-trunk #453 (See [https://builds.apache.org/job/ws-axiom-trunk/453/])
    AXIOM-372: Finalized the work started in r1149140.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069090#comment-13069090 ] 

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

Integrated in ws-axiom-trunk #447 (See [https://builds.apache.org/job/ws-axiom-trunk/447/])
    AXIOM-372: Added OMElement#undeclarePrefix(String).

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUndeclarePrefix.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/AXIOMXPath.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestFindNamespaceURIWithPrefixUndeclaring.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.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-api/src/main/java/org/apache/axiom/om/OMElement.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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066504#comment-13066504 ] 

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

Integrated in ws-axiom-trunk #438 (See [https://builds.apache.org/job/ws-axiom-trunk/438/])
    AXIOM-372: Report attempts to create illegal namespace declarations.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDeclareNamespaceInvalid.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/util/OMSerializerUtil.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAPBuilderHelper.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-api/src/main/java/org/apache/axiom/om/OMElement.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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069516#comment-13069516 ] 

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

Integrated in ws-axiom-trunk #452 (See [https://builds.apache.org/job/ws-axiom-trunk/452/])
    Fixed an issue with OMElement#setText(QName) revealed by the change in AXIOM-372.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestSetTextQNameWithEmptyPrefix.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestSetTextQNameWithoutNamespace.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-api/src/main/java/org/apache/axiom/om/OMElement.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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069546#comment-13069546 ] 

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

Integrated in Axis2 #863 (See [https://builds.apache.org/job/Axis2/863/])
    Fixed another namespace issue revealed by AXIOM-372.

veithen : 
Files : 
* /axis/axis2/java/core/trunk/modules/saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java
* /axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/SOAPElementTest.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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069978#comment-13069978 ] 

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

Integrated in ws-axiom-trunk #454 (See [https://builds.apache.org/job/ws-axiom-trunk/454/])
    AXIOM-372: Finalized the user guide section about illegal namespace bindings.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/src/docbkx/userguide.xml


> 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


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068963#comment-13068963 ] 

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

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

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.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-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/OMElementCreator.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-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.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


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

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIOM-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIOM-372.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.13

> 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
>             Fix For: 1.2.13
>
>
> 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