Subject: Re: [xsl] variable question From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 10 Nov 2004 16:01:51 -0500 |
In XSLT 1.0 the only way to do this would be by using a stylesheet to generate your stylesheet.
Ugh.
Maybe Mike or Jeni or someone can suggest an easier way to do this in XSLT 2.0.
Maybe use a key?
I'm confused (again!). I'm basically trying to rework some of my code, in part based around Geert's suggestions, but I can't really see how to do what I'm wanting to do (which is to be able to work on content from external files). It seems, for example, that I cannot use a key on content I want to access via the doc function.
<xsl:template match ...> <xsl:variable name="key-value" select="[your key value]"/> <!-- ... now changing context to the bibrecord document --> <xsl:for-each select="$bibrecord"> <!-- ... now changing context to the key-retrieved element inside the bibrecord doc --> <xsl:for-each select="key('biblio', $key-value"> ... do your thing ... </xsl:for-each> </xsl:for-each> </xsl:template>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] variable question, Bruce D'Arcus | Thread | Re: [xsl] variable question, Bruce D'Arcus |
Re: [xsl] variable question, Bruce D'Arcus | Date | Re: [xsl] build a select clause or , Geert Josten |
Month |