This is nothing to do with keys.
You're heading towards a meta-stylesheet: a transformation written in XSLT
that converts your abstract (or generic) stylesheet into a concrete
stylesheet. This is a perfectly feasible thing to do but you need to think
very carefully about what you are trying to achieve.
Michael Kay
-----Original Message-----
From: Bruce D'Arcus [mailto:bdarcus(_at_)myrealbox(_dot_)com]
Sent: 20 August 2004 23:11
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] keys and variables
I'm trying to understand when and how to use keys.
What I want is to a) remove all explicit xpath expressions from the
core of my stylesheets so as to allow one to use them with different
schemas (let's say TEI for bibliographic representation, vs.
MODS), and
b) make it as fast as possible.
So let's take a minimal document:
<bibs>
<book ID="1">
<title-main>First Title</title-main>
<author>John Doe</author>
</book>
<book ID="2">
<title-main>Second Title</title-main>
<author>Jane Smith</author>
</book>
</bibs>
Basically, I want the main xslt files to have expressions that are
generic: like maybe $title and $creator in this case.
Ultimately there
may be twenty or so structures so defined. To use data
defined against
a different schema, one would just change these variables or keys.
Any suggestions on how best to tackle this?
Bruce
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--