[
Lists Home |
Date Index |
Thread Index
]
xsl:attribute is an instruction that is executed at run-time to create
attribute nodes in the result tree. You can't expect it to be executed at
compile time to modify the stylesheet!
The solution to parameterizing the URI resolution for xsl:import in Java is
to write a URIResolver. In .NET, there is a similar facility called the
XmlResolver. I'm not aware of any equivalent for MSXML3.
Michael Kay
> -----Original Message-----
> From: Gerben Rampaart [mailto:gerben@netmatch.nl]
> Sent: 11 August 2004 13:27
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] XSLT: Variable href in <xsl:import>
>
> I have a big (and I mean BIG) xslt which I split up in about 6 parts
> which all hold templates that are pretty much related to each other.
> But, I am not ruling out that those stylesheets will shift
> directories a
> couple of times (in my VS.NET project) and on top of that I just don't
> like hardcoded relative paths in my xslt.
>
> For this reason, we have centered all the path information in one file
> (the web.config for all you VS programmers out there) and
> with a simple
> configuration in there, we change the path for a xslt for the entire
> application.
>
> Except, that darn <xsl:import> tag won't cooperate, It won't accept
> extensionobject method returns, no param values, no nothing.
>
> Summary:
>
> This:
>
> <xsl:import>
> <xsl:attribute
> name="href">http://MyWebPage/MyXslt.xslt</xsl:attribute>
> </xsl:import>
>
> Or this:
>
> <xsl:import>
> <xsl:attribute name="href"><value-of name="$MyParam"
> /></xsl:attribute>
> </xsl:import>
>
> doesn't work.
>
> How do I make that import tag have a variable path?
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
|