Subject: Re: [xsl] Specifying xml source in xsl stylesheet From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Fri, 25 Apr 2003 01:26:15 +0200 |
Is there any way to hard-code the xml file to be parsed by a particular xsl stylesheet? I want to associate a menu.xml file with a menu.xsl stylesheet and then be able to include the menu.xsl in another xsl file. The idea is to have the same menu always available for multiple files.
You can try the trick which reads XML data from the style sheet: <xsl:stylesheet ... xmlns:menu="http://whatever.urk/templates/menu"> <menu:data> <!-- your menu XML here --> </menu:data>
<xsl:variable name="menudata" select="document('')/xsl:stylesheet/menu:data"/>
You can use $menudata to refer to your menu XML data, for example <xsl:apply-templates select="$menudata/menu/menuitem"/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Specifying xml source in xsl , Gregory Propf | Thread | [xsl] Xinclude with Xalan 2.4, Gregory Propf |
[xsl] Specifying xml source in xsl , Gregory Propf | Date | Re: [xsl] silly (c) symbol. How to , malcolm macaulay |
Month |