This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Multiple Input Sources


>If you happen to be using MSXML (which still doesn't support
>the "document()" function) you can pass the parsed DOM of
>other XML sources as parameters programmatically.

Alternatively, (if you are using the technology preview of MSXML) you can
code the following script to emulate the document() function:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:state="http://www.vbxml.com/state"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes"/>

<msxsl:script language="VBScript" implements-prefix=
"state">'<![CDATA[
function document(url)
set xmlDoc=createObject("MSXML2.DOMDocument")
xmlDoc.async=false
xmlDoc.load url
set document=xmlDoc
end function

']]></msxsl:script>
</xsl:stylesheet>

To retrieve a document stream into a variable you'd then use: 

<xsl:variable name="doc"><xsl:copy-of
select="state:document('http://www.myServer.com/myXMLDoc.xml')"/>

This example is taken from the "Direct Add to Output Via Script in XSL
Transform" article at:
http://www.inquiry.com/techtips/xml_pro/answer.asp?pro=xml_pro&docID=4790

Hope that helps,
Bill


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]