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

Var references in "match" attribute of xsl:template?

Subject: Var references in "match" attribute of xsl:template?
From: dkarr@xxxxxxxx (David M. Karr)
Date: 09 Nov 2000 09:32:48 -0800
match attribute in xsl
Despite reading tons of articles, although not having read "the book"
yet, I haven't until now actually had an opportunity to build an XSL
stylesheet.  I'm using it to generate HTML, but to display in a Java
JEditorPane, not in a browser.

In this context, I'll probably have several "similar" stylesheets.
I'm trying to build them so that duplicated code and strings are
minimized.  Each stylesheet will represent a "domain class".  Inside
the stylesheet tag content, I set a "domainClass" variable to the name
of the domain class.  Obviously, this is one line that will vary
between each stylesheet.  I use this variable in a couple of places in
the "body" of the main template.

After that I have a simple "xsl:template" which will match the "root"
of the document, and which presents a simple HTML table to list the
attributes and values of an object (from the XML data).  The name of
the root tag element is exactly the same as the domain class.

I vaguely remember I've read that the value of the "match" attribute
of "xsl:template" cannot reference a variable in any way.  If that's
true, then I have to duplicate the domain class name in the
"domainClass" setting, and in the top-level "xsl:template" tag.  It
would be nice if I could define the domain class in a single place,
and reference it in all the places it is used.  Is there any way to do
this?

-- 
===============================================================================
David M. Karr     ; dkarr@xxxxxxxx  ; w:(425)487-8312 ; TCSI & Best Consulting
Software Engineer ; Unix/Java/C++/X ; BrainBench CJ12P (#12004)


 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.