1
function XSLPOOL(cache) {
2
if (typeof cache == "undefined") this.use_cache = false;
3
this.use_cache = cache;
5
this.cache = new Array();
8
XSLPOOL.prototype.ProcessXML = function(xmldoc, attr, error) {
10
if (attr.handler) attr.handler(null, attr.attr, error);
11
else adei.ReportError(error);
16
var htmldoc = xsltApply(attr.xsltdoc, xmldoc);
17
attr.handler(htmldoc, attr.attr);
19
xsltApply(attr.xsltdoc, xmldoc, attr.attr);
23
XSLPOOL.prototype.ApplyXSLT = function(xsltdoc, xmlurl, handler, attr) {
24
var xattr = new Object;
27
xattr.handler = handler;
29
xattr.xsltdoc = xsltdoc;
31
if (typeof xmlurl == "object") {
32
this.ProcessXML(xmlurl, xattr);
35
function (xmldoc, attr, error) {
36
attr.self.ProcessXML(xmldoc, attr, error)
41
XSLPOOL.prototype.ProcessXSLT = function(xsltdoc, attr) {
43
this.cache[attr.xslt] = xsltdoc;
46
return this.ApplyXSLT(xsltdoc, attr.xmlurl, attr.handler, attr.attr);
49
XSLPOOL.prototype.Load = function(xslt, xmlurl, handler, attr) {
50
if (typeof this.cache[xslt] != "undefined") {
51
return this.ApplyXSLT(this.cache[xslt], xmlurl, handler, attr);
54
var xattr = new Object;
56
xattr.handler = handler;
59
xattr.xmlurl = xmlurl;
61
loadXSLT("xslt/" + xslt + ".xsl",
62
function (xsltdoc, self) { xattr.self.ProcessXSLT(xsltdoc, xattr) },