| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = '11.1.1.js'; |
| 8 |
|
| 9 |
START("11.1.1 - Attribute Identifiers"); |
| 10 |
|
| 11 |
x = |
| 12 |
<alpha> |
| 13 |
<bravo attr1="value1" ns:attr1="value3" xmlns:ns="http://someuri"> |
| 14 |
<charlie attr1="value2" ns:attr1="value4"/> |
| 15 |
</bravo> |
| 16 |
</alpha> |
| 17 |
|
| 18 |
TEST_XML(1, "value1", x.bravo.@attr1); |
| 19 |
TEST_XML(2, "value2", x.bravo.charlie.@attr1); |
| 20 |
|
| 21 |
correct = new XMLList(); |
| 22 |
correct += new XML("value1"); |
| 23 |
correct += new XML("value2"); |
| 24 |
TEST(3, correct, x..@attr1); |
| 25 |
|
| 26 |
n = new Namespace("http://someuri"); |
| 27 |
TEST_XML(4, "value3", x.bravo.@n::attr1); |
| 28 |
TEST_XML(5, "value4", x.bravo.charlie.@n::attr1); |
| 29 |
|
| 30 |
correct = new XMLList(); |
| 31 |
correct += new XML("value3"); |
| 32 |
correct += new XML("value4"); |
| 33 |
TEST(6, correct, x..@n::attr1); |
| 34 |
|
| 35 |
q = new QName(n, "attr1"); |
| 36 |
TEST(7, correct, x..@[q]); |
| 37 |
|
| 38 |
correct = new XMLList(); |
| 39 |
correct += new XML("value1"); |
| 40 |
correct += new XML("value3"); |
| 41 |
correct += new XML("value2"); |
| 42 |
correct += new XML("value4"); |
| 43 |
TEST(8, correct, x..@*::attr1); |
| 44 |
|
| 45 |
TEST_XML(9, "value1", x.bravo.@["attr1"]); |
| 46 |
TEST_XML(10, "value3", x.bravo.@n::["attr1"]); |
| 47 |
TEST_XML(11, "value3", x.bravo.@[q]); |
| 48 |
|
| 49 |
END(); |