elena 2003/02/10 11:14:34 Modified: java/tests/dom/dom3 Test.java Log: We always attempt to find a prefix following the pattern "NS" +index (starting at 1). Previously we kept global namespace counter to find an index.. Revision Changes Path 1.7 +11 -11 xml-xerces/java/tests/dom/dom3/Test.java Index: Test.java =================================================================== RCS file: /home/cvs/xml-xerces/java/tests/dom/dom3/Test.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Test.java 31 Dec 2002 01:55:32 -0000 1.6 +++ Test.java 10 Feb 2003 19:14:34 -0000 1.7 @@ -341,18 +341,18 @@ Assertion.assert(value!=null && value.equals("http://child1"), "xmlns:NS2="+value); - value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS3"); + value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.assert(value!=null && - value.equals("http://attr2"), "xmlns:NS3="+value); + value.equals("http://attr2"), "xmlns:NS1="+value); // child3 Assertion.assert(child3.getNodeName().equals("xsl:child3"), "xsl:child3"); - value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS6"); + value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.assert(value!=null && - value.equals("http://a2"), "xmlns:NS6="+value); + value.equals("http://a2"), "xmlns:NS1="+value); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "a1"); @@ -366,15 +366,14 @@ Attr attr = child3.getAttributeNodeNS("http://a2", "attr2"); - Assertion.assert(attr != null, "NS6:attr2 !=null"); + Assertion.assert(attr != null, "NS1:attr2 !=null"); Assertion.assert(child3.getAttributes().getLength() == 5, "xsl:child3 has 5 attrs"); // child 4 Attr temp = child4.getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "xmlns"); Assertion.assert(temp.getNodeName().equals("xmlns"), "attribute name is xmlns"); - Assertion.assert(temp.getNodeValue().length() == 0, "xmlns=''"); - + Assertion.assert(temp.getNodeValue().length() == 0, "xmlns=''"); /* OutputFormat format = new OutputFormat((Document)doc); format.setLineSeparator(LineSeparator.Windows); @@ -459,18 +458,18 @@ Assertion.assert(value!=null && value.equals("http://child1"), "xmlns:NS2="+value); - value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS3"); + value = child1.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.assert(value!=null && - value.equals("http://attr2"), "xmlns:NS3="+value); + value.equals("http://attr2"), "xmlns:NS1="+value); // child3 Assertion.assert(child3.getNodeName().equals("xsl:child3"), "xsl:child3"); - value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS6"); + value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "NS1"); Assertion.assert(value!=null && - value.equals("http://a2"), "xmlns:NS6="+value); + value.equals("http://a2"), "xmlns:NS1="+value); value = child3.getAttributeNS("http://www.w3.org/2000/xmlns/", "a1"); @@ -624,6 +623,7 @@ } catch ( Exception ex ) { ex.printStackTrace(); } + System.out.println("done!"); } StringBuffer fError = new StringBuffer();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]