Comparing version 0.5.1 to 0.5.2
# Changes | ||
## 0.5.0 | ||
## 0.5.2 | ||
- Add rudimentary XInclude support. | ||
- Add type definitions. | ||
@@ -7,0 +7,0 @@ ## 0.4.4 |
@@ -35,3 +35,3 @@ // Generated by CoffeeScript 2.5.1 | ||
if (node.namespaceURI === xincludeNS && node.localName === 'include' && (resolve != null)) { | ||
href = node.getAttribute('href'); | ||
href = node.getAttributeNS(xincludeNS, 'href'); | ||
if (href != null) { | ||
@@ -38,0 +38,0 @@ [xml, next] = resolve(href); |
{ | ||
"name": "cruftless", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Yet another simple way to parse and generate XML", | ||
"main": "lib/cruftless.js", | ||
"types": "./cruftless.d.ts", | ||
"files": [ | ||
"lib/" | ||
"lib/", | ||
"cruftless.d.ts" | ||
], | ||
@@ -9,0 +11,0 @@ "scripts": { |
@@ -354,7 +354,3 @@ ```javascript --hide | ||
resolve = (href) => { | ||
if (href === "bla.xml") { | ||
return ["<bla/>", resolve]; | ||
} else { | ||
return ["<missing/>", resolve]; | ||
} | ||
return ["<bla/>", resolve]; | ||
}; | ||
@@ -361,0 +357,0 @@ template = parse( |
@@ -446,7 +446,3 @@ <!-- | ||
resolve = (href) => { | ||
if (href === "bla.xml") { | ||
return ["<bla/>", resolve]; | ||
} else { | ||
return ["<missing/>", resolve]; | ||
} | ||
return ["<bla/>", resolve]; | ||
}; | ||
@@ -463,13 +459,3 @@ template = parse( | ||
Note that the resolve function is expected to resolve the href within a context | ||
and then return both the XML _and_ a new resolve function that is capable fo | ||
resolving hrefs from within the context of the resolved file. In this case, | ||
we're not really doing that. In fact, this resolver will **always** return the | ||
same snippet of XML, but it doesn't require a lot of imagination to figure out | ||
how to turn this resolver into something sensible. | ||
If you are not passing the resolve function, then it will simply leave the | ||
xinclude unharmed. | ||
---- | ||
Markdown generated from [./README.js.md](./README.js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) |
65156
19
1133
459