xsl-list
[Top] [All Lists]

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

2003-12-08 14:40:13
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(_at_)isogen(_dot_)com
www.isogen.com


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