This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Referencing a schema
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Referencing a schema
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 15 Mar 2001 19:32:46 GMT
- References: <20010315190956.16685.qmail@awcst169.netaddress.usa.net>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> My question is can I use
> a variable to reference a schema?
As far as XSL is concerned the SchemaLocation attribute is just some
random attribute in the result tree, so no special rules apply to that.
So yes you can generate that with any XPath expression, including
variables.
Specifically...
<xsl:param name="schema-loc" select="'default location"'"/>
...
<xsl:template match="whatever">
<ORGANIZATION xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="{$schema-loc}">
...
then you can set the parameter to the current location before calling
this stylesheet.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list