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

RE: Including tags in an xml:variable

Subject: RE: Including tags in an xml:variable
From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
Date: Tue, 3 Jul 2001 10:51:55 -0700
use xml variable
Why not just use a named template?  It automatically puts its contents into
the result tree and you don't have to fight against the language (is that
what your comment about &lt; meant?).

PC2

<xsl:template name="ColumnWidths">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="2in"/>
<fo:table-column column-width="2in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
</xsl:variable>

<fo:table>
  <xsl:call-template name="$ColumnWidths"/>
  <fo:table-body>
  ** OMITTED TABLE STUFF **
  </fo:table-body>
</fo:table>

  **  More Omitted Stuff **
<fo:table>
  <xsl:call-template name="$ColumnWidths"/>
  <fo:table-body>
  ** SOME OTHER TABLE STUFF HERE**
  </fo:table-body>
</fo:table>

-----Original Message-----
From: Huisking, Michael [mailto:MHuisking@xxxxxxxxx]
Sent: July 3, 2001 10:34
To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
Subject:  Including tags in an xml:variable


Hi.

Is there a way to define an xml:variable that contains tags such that the
tags themselves will literally be written out to the outfile on the
transformation?

I have an xsl file that I use to produce an fo file.  It contains several
tables that have the same column definitions and I'd like to be able to
declare the definition once and use it many times in the file.  For example:

<xsl:variable name="ColumnWidths">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="2in"/>
<fo:table-column column-width="2in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.5in"/>
</xsl:variable>

<fo:table>
  <xsl:value-of select="$ColumnWidths"/>
  <fo:table-body>
  ** OMITTED TABLE STUFF **
  </fo:table-body>
</fo:table>

  **  More Omitted Stuff **
<fo:table>
  <xsl:value-of select="$ColumnWidths"/>
  <fo:table-body>
  ** SOME OTHER TABLE STUFF HERE**
  </fo:table-body>
</fo:table>


Is something like this possible?  I haven't had any luck trying to use &lt
and &gt (they stay as the literals "&gt" and "&lt" in the output.)

Thanks in advance.

Michael Huisking
California ISO

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 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.