[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Specifying xml source in xsl stylesheet
Gregory Propf wrote:
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"/> J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|