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: Referencing a schema



>  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


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