projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3695af4
)
Added function document.transformToDoc.
author
Anders S. Mortensen
<sondberg@indexdata.dk>
Thu, 27 Sep 2007 09:15:48 +0000
(09:15 +0000)
committer
Anders S. Mortensen
<sondberg@indexdata.dk>
Thu, 27 Sep 2007 09:15:48 +0000
(09:15 +0000)
js/pz2.js
patch
|
blob
|
history
diff --git
a/js/pz2.js
b/js/pz2.js
index
1804103
..
dc06e87
100644
(file)
--- a/
js/pz2.js
+++ b/
js/pz2.js
@@
-1,5
+1,5
@@
/*
/*
-** $Id: pz2.js,v 1.57 2007-09-14 09:46:49 jakub Exp $
+** $Id: pz2.js,v 1.58 2007-09-27 09:15:48 sondberg Exp $
** pz2.js - pazpar2's javascript client library.
*/
** pz2.js - pazpar2's javascript client library.
*/
@@
-751,6
+751,19
@@
DOMDoc.parseXmlFromString = function ( xmlString )
return doc;
}
return doc;
}
+DOMDoc.transformToDoc = function (xmlDoc, xslDoc)
+{
+ if ( window.XSLTProcessor ) {
+ var proc = new XSLTProcessor();
+ proc.importStylesheet( xslDoc );
+ return proc.transformToDocument(xmlDoc);
+ } else if ( window.ActiveXObject ) {
+ return document.parseXmlFromString(xmlDoc.transformNode(xslDoc));
+ } else {
+ alert( 'Unable to perform XSLT transformation in this browser' );
+ }
+}
+
// DOMElement
Element_removeFromDoc = function (DOM_Element)
// DOMElement
Element_removeFromDoc = function (DOM_Element)