1 load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js", "build/js/parse.js");
3 var dir = arguments[1];
5 var c = parse( read(arguments[0]) );
11 function output( c, n ) {
12 var json = Object.toJSON( c );
14 writeFile( dir + "/data/jquery-" + n + "-json.js", json );
15 writeFile( dir + "/data/jquery-" + n + "-jsonp.js", "docsLoaded(" + json + ")" );
17 Object.toXML.force = { desc: 1, code: 1, before: 1, result: 1 };
19 var xml = Object.toXML( n == "docs" ? { method: c } : c, "docs" );
21 xml = xml.replace("<docs>", "<docs version='" + read("version.txt").slice(0,-1) + "'>");
23 writeFile( dir + "/data/jquery-" + n + "-xml.xml",
24 "<?xml version='1.0' encoding='ISO-8859-1'?>\n" + xml );
26 writeFile( dir + "/" + ( n == "docs" ? "index" : n ) + ".xml",
27 "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
28 "<?xml-stylesheet type='text/xsl' href='style/" + n + ".xsl'?>\n" + xml