This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: MSXML variables and DOCTYPE
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: MSXML variables and DOCTYPE
- From: Jonathan Marsh <jmarsh at microsoft dot com>
- Date: Thu, 23 Mar 2000 07:25:47 -0800
- Reply-To: xsl-list at mulberrytech dot com
You can pass in parameters using the addParameter method on the XSLProcessor
object. This is documented in the SDK downloadable from
http://msdn.microsoft.com/downloads/webtechnology/xml/msxml.asp.
The docs include this JScript example, which is easily translated into
VBScript:
Using a variable in XSL:
<xsl:stylesheet xmlns:xsl="...">
<xsl:param name="myBaseName" />
...
<xsl:value-of select="$myBaseName" />
...
</xsl:stylesheet>
Using a variable in JScript:
var myVariable = 5;
//...load XML, XSL, and create xslTemplate here
var myProc = myTemplate.createProcessor():
myProc.input = xmldoc;
myProc.addParameter(myVariable, "myBaseName");
//now you can perform the transformation.
> -----Original Message-----
> From: Simon.Heathfield@esoft-global.com
> [mailto:Simon.Heathfield@esoft-global.com]
> Sent: Thursday, March 23, 2000 3:48 AM
> To: XSL-List@mulberrytech.com
> Subject: RE: MSXML variables and DOCTYPE
>
>
>
> DOCTYPE does work, there was a problem in the entity set that
> xml authority
> did
> not complain about (I need to look at it). This caused MSXML
> to give an
> unrelated
> error message seeming to indicate that the DOCTYPE defn was
> unrecognised. So
> my fault
> really.
>
> I have downloaded the latest MSXML and variables and
> parameters do indeed
> work. However
> I cannot find any information on passing the parameters into the xsl
> stylesheet (initially
> I want to do it from ASP VBScript).
>
> Any ideas?
>
> ----------
> Simon Heathfield
> IPS Technical Manager
> ESOFT Global Ltd
>
>
> CONFIDENTIAL
> The contents of this email and any attachements may be
> confidential. It is intended for the named recipient(s).
> If you are not the named recipient please notify the sender
> immediately and do not disclose the contents to any other
> person or make any copies.
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list