[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: variable definition reuse
On Friday 22 March 2002 05:15, Laura Jenkins wrote: > David, > I need those variables because in the same style sheet they are used many > times and i dont want to keep doing select="exp-date" ?also some of the > variables need to be formatted and checked for a perticular value and stuff > like that. so i need them to be variables.. So no having said that can how > can i place them in a different file?? > laura <!DOCTYPE xsl:stylesheet [ <!ENTITY common-variables SYSTEM "file-with-common-variables.xml"> ]> <xsl:stylesheet ...> <xsl:template match="xxx"> &common-variables; <!-- use the variables... --> </xsl:template> </xsl:stylesheet> In file-with-common-variables.xml, you can list all of the <xsl:variable>s. No need to have a single document element at the root. The entity reference will include the file exactly as is. -- Peter Davis Detroit is Cleveland without the glitter. 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
|