xmlns-unbound.js 611 B

123456789101112131415
  1. require(__dirname).test(
  2. { strict : true
  3. , opt : { xmlns: true }
  4. , expect :
  5. [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"]
  6. , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ]
  7. , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
  8. attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } },
  9. ns: {}, isSelfClosing: true } ]
  10. , [ "closetag", "root" ]
  11. ]
  12. }
  13. ).write("<root unbound:attr='value'/>")