public class TestAddAttributeWithMaskedNamespaceDeclaration extends AxiomTestCase
OMElement.addAttribute(OMAttribute)
correctly generates a
new namespace declaration if an equivalent namespace declaration exists but is masked.
The test attempts to create the following XML:
<a xmlns:p="urn:ns1"> <b xmlns:p="urn:ns2"> <c xmlns:p="urn:ns1" p:attr="test"/> </b> </a>It only explicitly creates the namespace declarations on <a> and <b>. When adding the attribute to <c>, Axiom must generate a new namespace declaration because the declaration on <a> is masked by the one on <b>.
Note that because of WSTX-202, Axiom will not be able to serialize the resulting XML.
metaFactory, TEST_PARSER_CONFIGURATION
Constructor and Description |
---|
TestAddAttributeWithMaskedNamespaceDeclaration(OMMetaFactory metaFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
runTest() |
assertConsumed, getChildrenCount, getNumberOfOccurrences
addTestProperty, getTestProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, setUp, tearDown, toString
public TestAddAttributeWithMaskedNamespaceDeclaration(OMMetaFactory metaFactory)
protected void runTest() throws Throwable
runTest
in class TestCaseEx
Throwable
Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.