Subject: Re: [xsl] variable definition reuse From: Peter Davis <pdavis152@xxxxxxxxx> Date: Sun, 24 Mar 2002 02:07:55 -0800 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] variable definition reuse, David Carlisle | Thread | Re: [xsl] variable definition reuse, Laura Jenkins |
Re: [xsl] XSL-based report engines?, David B. Bitton | Date | Re: [xsl] one line of xml to indent, Peter Davis |
Month |