Sha256: 21f6cf6a5fa2b6fa61cd964ad361428429835fb9ca057b6792d205e7dbfb0b83

Contents?: true

Size: 809 Bytes

Versions: 14

Compression:

Stored size: 809 Bytes

Contents

/** @class Use a style sheet to transform XML. Requires Rhino. */
function Transformer(xsl) { //like: var t = new Transformer("data/teststyle.xsl");
	var xsltFile = new Packages.java.io.File(xsl);
	var xsltSource = new Packages.javax.xml.transform.stream.StreamSource(xsltFile);
	this.transformer = Packages.javax.xml.transform.TransformerFactory.newInstance().newTransformer(xsltSource);
}

Transformer.prototype.transform = function(xml, out) { //like: t.transform("data/testdata.xml", "data/testout.txt");
	var xmlFile = new Packages.java.io.File(xml);
	var resFile = new Packages.java.io.File(out);
	var xmlSource = new Packages.javax.xml.transform.stream.StreamSource(xmlFile);
	var result = new Packages.javax.xml.transform.stream.StreamResult(resFile);
	this.transformer.transform(xmlSource, result);
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sproutcore-0.9.1 jsdoc/app/Transformer.js
sproutcore-0.9.0 jsdoc/app/Transformer.js
sproutcore-0.9.12 jsdoc/app/Transformer.js
sproutcore-0.9.10 jsdoc/app/Transformer.js
sproutcore-0.9.11 jsdoc/app/Transformer.js
sproutcore-0.9.13 jsdoc/app/Transformer.js
sproutcore-0.9.2 jsdoc/app/Transformer.js
sproutcore-0.9.5 jsdoc/app/Transformer.js
sproutcore-0.9.4 jsdoc/app/Transformer.js
sproutcore-0.9.3 jsdoc/app/Transformer.js
sproutcore-0.9.8 jsdoc/app/Transformer.js
sproutcore-0.9.9 jsdoc/app/Transformer.js
sproutcore-0.9.7 jsdoc/app/Transformer.js
sproutcore-0.9.6 jsdoc/app/Transformer.js