[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Specifying xml source in xsl stylesheet

Subject: Re: Specifying xml source in xsl stylesheet
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Fri, 25 Apr 2003 01:26:15 +0200
specifying xml in xsl
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.