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 2012/07/14 11:46:34 UTC

[jira] [Created] (AXIOM-435) Consistently implement support for entity references

Andreas Veithen created AXIOM-435:
-------------------------------------

             Summary: Consistently implement support for entity references
                 Key: AXIOM-435
                 URL: https://issues.apache.org/jira/browse/AXIOM-435
             Project: Axiom
          Issue Type: Improvement
          Components: API
    Affects Versions: 1.2.13
            Reporter: Andreas Veithen
            Assignee: Andreas Veithen
            Priority: Minor


Currently (unexpanded) entity references are represented as OMText instances with type=ENTITY_REFERENCE_NODE. This is a bad choice:
* An entity reference doesn't necessarily represent character data: the expansion can e.g. produce elements. Representing it as an OMText is therefore conceptually wrong.
* There is lots of code that checks for OMText and then uses OMText#getText() under the assumption that the return value represents character data. However, for an entity reference, getText() would return the entity name.

It should also be noted that the test coverage for entity references is currently almost nonexistent. As a result, the code that handles entity references is inconsistent. E.g. OMStAXWrapper/SwitchingWrapper contains the following code:

            if ((currentEvent == START_ELEMENT)
                    || (currentEvent == END_ELEMENT)
                    || (currentEvent == ENTITY_REFERENCE)) {
                return ((OMElement) lastNode).getLocalName();
            } else {
                throw new IllegalStateException();
            }

This is obviously incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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-435) Consistently implement support for entity references

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

Hudson commented on AXIOM-435:
------------------------------

Integrated in ws-axiom-trunk #1174 (See [https://builds.apache.org/job/ws-axiom-trunk/1174/])
    AXIOM-435: Correctly support entity references that have a replacement value containing markup. (Revision 1375212)
* AXIOM-435: Ensure that OMEntityReference#getReplacementText() returns a non null value if the builder was created from a SAXSource.
* General improvements of SAXSource support. (Revision 1375203)

     Result = SUCCESS
veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/SAXOMBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/entity-reference-with-markup.xml

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/SAXOMBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/SAXOMXMLParserWrapper.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/BuilderFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/stax/XMLStreamReaderComparator.java

                
> Consistently implement support for entity references
> ----------------------------------------------------
>
>                 Key: AXIOM-435
>                 URL: https://issues.apache.org/jira/browse/AXIOM-435
>             Project: Axiom
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.14
>
>
> Currently (unexpanded) entity references are represented as OMText instances with type=ENTITY_REFERENCE_NODE. This is a bad choice:
> * An entity reference doesn't necessarily represent character data: the expansion can e.g. produce elements. Representing it as an OMText is therefore conceptually wrong.
> * There is lots of code that checks for OMText and then uses OMText#getText() under the assumption that the return value represents character data. However, for an entity reference, getText() would return the entity name.
> It should also be noted that the test coverage for entity references is currently almost nonexistent. As a result, the code that handles entity references is inconsistent. E.g. OMStAXWrapper/SwitchingWrapper contains the following code:
>             if ((currentEvent == START_ELEMENT)
>                     || (currentEvent == END_ELEMENT)
>                     || (currentEvent == ENTITY_REFERENCE)) {
>                 return ((OMElement) lastNode).getLocalName();
>             } else {
>                 throw new IllegalStateException();
>             }
> This is obviously incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] [Updated] (AXIOM-435) Consistently implement support for entity references

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

Andreas Veithen updated AXIOM-435:
----------------------------------

    Fix Version/s: 1.2.14
    
> Consistently implement support for entity references
> ----------------------------------------------------
>
>                 Key: AXIOM-435
>                 URL: https://issues.apache.org/jira/browse/AXIOM-435
>             Project: Axiom
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.14
>
>
> Currently (unexpanded) entity references are represented as OMText instances with type=ENTITY_REFERENCE_NODE. This is a bad choice:
> * An entity reference doesn't necessarily represent character data: the expansion can e.g. produce elements. Representing it as an OMText is therefore conceptually wrong.
> * There is lots of code that checks for OMText and then uses OMText#getText() under the assumption that the return value represents character data. However, for an entity reference, getText() would return the entity name.
> It should also be noted that the test coverage for entity references is currently almost nonexistent. As a result, the code that handles entity references is inconsistent. E.g. OMStAXWrapper/SwitchingWrapper contains the following code:
>             if ((currentEvent == START_ELEMENT)
>                     || (currentEvent == END_ELEMENT)
>                     || (currentEvent == ENTITY_REFERENCE)) {
>                 return ((OMElement) lastNode).getLocalName();
>             } else {
>                 throw new IllegalStateException();
>             }
> This is obviously incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] [Work started] (AXIOM-435) Consistently implement support for entity references

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

Work on AXIOM-435 started by Andreas Veithen.

> Consistently implement support for entity references
> ----------------------------------------------------
>
>                 Key: AXIOM-435
>                 URL: https://issues.apache.org/jira/browse/AXIOM-435
>             Project: Axiom
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.14
>
>
> Currently (unexpanded) entity references are represented as OMText instances with type=ENTITY_REFERENCE_NODE. This is a bad choice:
> * An entity reference doesn't necessarily represent character data: the expansion can e.g. produce elements. Representing it as an OMText is therefore conceptually wrong.
> * There is lots of code that checks for OMText and then uses OMText#getText() under the assumption that the return value represents character data. However, for an entity reference, getText() would return the entity name.
> It should also be noted that the test coverage for entity references is currently almost nonexistent. As a result, the code that handles entity references is inconsistent. E.g. OMStAXWrapper/SwitchingWrapper contains the following code:
>             if ((currentEvent == START_ELEMENT)
>                     || (currentEvent == END_ELEMENT)
>                     || (currentEvent == ENTITY_REFERENCE)) {
>                 return ((OMElement) lastNode).getLocalName();
>             } else {
>                 throw new IllegalStateException();
>             }
> This is obviously incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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-435) Consistently implement support for entity references

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

Hudson commented on AXIOM-435:
------------------------------

Integrated in ws-axiom-trunk #1173 (See [https://builds.apache.org/job/ws-axiom-trunk/1173/])
    AXIOM-435: Added factory methods to create entity references programmatically. (Revision 1375176)

     Result = SUCCESS
veithen : 
Files : 
* /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/factory/OMDOMFactory.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-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMEntityReference.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMEntityReferenceWithNullParent.java

                
> Consistently implement support for entity references
> ----------------------------------------------------
>
>                 Key: AXIOM-435
>                 URL: https://issues.apache.org/jira/browse/AXIOM-435
>             Project: Axiom
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.14
>
>
> Currently (unexpanded) entity references are represented as OMText instances with type=ENTITY_REFERENCE_NODE. This is a bad choice:
> * An entity reference doesn't necessarily represent character data: the expansion can e.g. produce elements. Representing it as an OMText is therefore conceptually wrong.
> * There is lots of code that checks for OMText and then uses OMText#getText() under the assumption that the return value represents character data. However, for an entity reference, getText() would return the entity name.
> It should also be noted that the test coverage for entity references is currently almost nonexistent. As a result, the code that handles entity references is inconsistent. E.g. OMStAXWrapper/SwitchingWrapper contains the following code:
>             if ((currentEvent == START_ELEMENT)
>                     || (currentEvent == END_ELEMENT)
>                     || (currentEvent == ENTITY_REFERENCE)) {
>                 return ((OMElement) lastNode).getLocalName();
>             } else {
>                 throw new IllegalStateException();
>             }
> This is obviously incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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-435) Consistently implement support for entity references

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

Hudson commented on AXIOM-435:
------------------------------

Integrated in ws-axiom-trunk #1126 (See [https://builds.apache.org/job/ws-axiom-trunk/1126/])
    AXIOM-435: Correct implementation of entity references. (Revision 1366205)

     Result = SUCCESS
veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMEntityReference.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-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/dom/DOMMetaFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/OMFactoryEx.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/SAXOMBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/OMXMLReader.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/DOMCompatibilityTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTestCase.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializerTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/DOMXMLStreamReader.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/factory/SAXOMXMLParserWrapper.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/pom.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCloneNode.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateEntityReference.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/EntityReferenceImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMEntityReferenceImpl.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/PushOMBuilder.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/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-parent/pom.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/AxiomTestCase.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/ConformanceTestCase.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromDOMSource.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromSAXSource.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/SAXSerializer.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetSAXSource.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestClone.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement2.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/faultreason/TestGetTextWithCDATA.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/badsoap/soap11/entity-reference.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/badsoap/soap12/entity-reference.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/pom.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/XMLAssertEx.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/conformance/ConformanceTestFile.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/entity-reference-external-subset.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/entity-reference-internal-subset.xml
* /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/entref.dtd

                
> Consistently implement support for entity references
> ----------------------------------------------------
>
>                 Key: AXIOM-435
>                 URL: https://issues.apache.org/jira/browse/AXIOM-435
>             Project: Axiom
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Currently (unexpanded) entity references are represented as OMText instances with type=ENTITY_REFERENCE_NODE. This is a bad choice:
> * An entity reference doesn't necessarily represent character data: the expansion can e.g. produce elements. Representing it as an OMText is therefore conceptually wrong.
> * There is lots of code that checks for OMText and then uses OMText#getText() under the assumption that the return value represents character data. However, for an entity reference, getText() would return the entity name.
> It should also be noted that the test coverage for entity references is currently almost nonexistent. As a result, the code that handles entity references is inconsistent. E.g. OMStAXWrapper/SwitchingWrapper contains the following code:
>             if ((currentEvent == START_ELEMENT)
>                     || (currentEvent == END_ELEMENT)
>                     || (currentEvent == ENTITY_REFERENCE)) {
>                 return ((OMElement) lastNode).getLocalName();
>             } else {
>                 throw new IllegalStateException();
>             }
> This is obviously incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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