Re: [xsl] Attempt to Select from the Top of Document No Worky

Subject: Re: [xsl] Attempt to Select from the Top of Document No Worky
From: "W. Eliot Kimber" <eliot@xxxxxxxxxx>
Date: Mon, 08 Dec 2003 15:40:13 -0600
Kyle Partridge wrote:


Maybe the reason is that // doesn't work inside of my existing query (ws:p), but what can I do to get the values I'm looking for?

It would probably be cleaner and easier to use a key table to access each of the styles, e.g.:


<xsl:key name="styles" use="name" match="textStyle"/>

You can then dereference the style with a simple key() function:

<xsl:for-each select="key('styles', string(@style)">
  ...
</xsl:for-each>

Of course, you should really do check to make sure the style reference is good before blindly processing it.

Cheers,

Eliot

--
W. Eliot Kimber
Innodata Isogen
eliot@xxxxxxxxxx
www.isogen.com


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



Current Thread