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

Re: variable definition reuse

Subject: Re: variable definition reuse
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Sun, 24 Mar 2002 02:07:55 -0800
meaning of last name davis
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

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.