UNPKG

963 BJavaScriptView Raw
1require(__dirname).test(
2 { xml : "<xml:root xmlns:xml='ERROR'/>"
3 , expect :
4 [ ["error"
5 , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n"
6 + "Actual: ERROR\n"
7 + "Line: 0\nColumn: 27\nChar: '"
8 ]
9 , [ "attribute"
10 , { name: "xmlns:xml"
11 , local: "xml"
12 , prefix: "xmlns"
13 , uri: "http://www.w3.org/2000/xmlns/"
14 , value: "ERROR"
15 }
16 ]
17 , [ "opentag"
18 , { name: "xml:root"
19 , uri: "http://www.w3.org/XML/1998/namespace"
20 , prefix: "xml"
21 , local: "root"
22 , attributes:
23 { "xmlns:xml":
24 { name: "xmlns:xml"
25 , local: "xml"
26 , prefix: "xmlns"
27 , uri: "http://www.w3.org/2000/xmlns/"
28 , value: "ERROR"
29 }
30 }
31 , ns: {}
32 }
33 ]
34 , ["closetag", "xml:root"]
35 ]
36 , strict : true
37 , opt : { xmlns: true }
38 }
39)
40