Sha256: ec20444a8dc1f16ab4a14ddd534f5abb59d37bb4406809e2ef832d41630c580c

Contents?: true

Size: 1.22 KB

Versions: 45

Compression:

Stored size: 1.22 KB

Contents

require(__dirname).test(
  { strict : true
  , opt : { xmlns: true }
  , expect :
    [ [ "error", "Unbound namespace prefix: \"unbound:root\"\nLine: 0\nColumn: 15\nChar: >"]
    , [ "opentag", { name: "unbound:root", uri: "unbound", prefix: "unbound", local: "root"
        , attributes: {}, ns: {}, isSelfClosing: true } ]
    , [ "closetag", "unbound:root" ]
    ]
  }
).write("<unbound:root/>");

require(__dirname).test(
  { strict : true
  , opt : { xmlns: true }
  , expect :
    [ [ "opennamespace", { prefix: "unbound", uri: "someuri" } ]
    , [ "attribute", { name: 'xmlns:unbound', value: 'someuri'
      , prefix: 'xmlns', local: 'unbound'
      , uri: 'http://www.w3.org/2000/xmlns/' } ]
    , [ "opentag", { name: "unbound:root", uri: "someuri", prefix: "unbound", local: "root"
          , attributes: { 'xmlns:unbound': {
              name: 'xmlns:unbound'
            , value: 'someuri'
            , prefix: 'xmlns'
            , local: 'unbound'
            , uri: 'http://www.w3.org/2000/xmlns/' } }
      , ns: { "unbound": "someuri" }, isSelfClosing: true } ]
    , [ "closetag", "unbound:root" ]
    , [ "closenamespace", { prefix: 'unbound', uri: 'someuri' }]
    ]
  }
).write("<unbound:root xmlns:unbound=\"someuri\"/>");

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
ela-4.1.6 node_modules/sax/test/xmlns-unbound-element.js
ela-4.1.5 node_modules/sax/test/xmlns-unbound-element.js
ela-4.1.4 node_modules/sax/test/xmlns-unbound-element.js
ela-4.1.3 node_modules/sax/test/xmlns-unbound-element.js
ela-4.1.2 node_modules/sax/test/xmlns-unbound-element.js
ela-4.1.1 node_modules/sax/test/xmlns-unbound-element.js
ela-4.1.0 node_modules/sax/test/xmlns-unbound-element.js
ela-4.0.0 node_modules/sax/test/xmlns-unbound-element.js
ela-3.4.3 node_modules/sax/test/xmlns-unbound-element.js
ela-3.4.2 node_modules/sax/test/xmlns-unbound-element.js
ela-3.4.0 node_modules/sax/test/xmlns-unbound-element.js
ela-3.3.1 node_modules/sax/test/xmlns-unbound-element.js
ela-3.3.0 node_modules/sax/test/xmlns-unbound-element.js
ela-3.2.0 node_modules/sax/test/xmlns-unbound-element.js
ela-3.1.1 node_modules/sax/test/xmlns-unbound-element.js
ela-3.1.0 node_modules/sax/test/xmlns-unbound-element.js
ela-3.0.0 node_modules/sax/test/xmlns-unbound-element.js
ela-2.0.0 node_modules/sax/test/xmlns-unbound-element.js
ela-1.1.0 node_modules/sax/test/xmlns-unbound-element.js
stylus-source-0.54.5 vendor/node_modules/sax/test/xmlns-unbound-element.js