xsl-list
[Top] [All Lists]

RE: variable matching...

2003-12-08 05:29:28
On Mon, 8 Dec 2003 Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com wrote:

Hi,

<xsl:template match="$stage">

  <xsl:template mathc="*[name() = $stage]">

I hadn't thought of that.  If that works, then that is
the way I'll try.

What if I have a document where the stage directions are
given in two different ways and I want to match both...
can I do:
<xsl:variable name="stage">sd|stagedir</xsl:variable>

Or does that mean that <xsl:template match="*[name() = $stage]">
will just look for an element named "sd|stagedir"?

Have you got an WXS for the different vocabularies? Do you substitution 
groups?

Nope, for the most part each one is individualistic.

Can you use the ancestors to make the matches unumbiquous?
  <xsl:template match="scene/sd | scn/stagedir">

Probably, but this would have so many different possibilities that
it wouldn't be worth it.  i.e. I'd have to change it for each file
(perhaps).

Thanks for the suggestions Jarno,

-James

---
Dr James Cummings, Oxford Text Archive, 
James(_dot_)Cummings(_at_)ota(_dot_)ahds(_dot_)ac(_dot_)uk

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



<Prev in Thread] Current Thread [Next in Thread>