[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] variable matching...


Subject: RE: [xsl] variable matching...
From: Jarno.Elovirta@xxxxxxxxx
Date: Mon, 8 Dec 2003 14:04:02 +0200

Hi,

> <xsl:template match="$stage">

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

 > I think this is not allowed, but was wondering if
> there was a way (xslt2 acceptable) to do this kind

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

> of thing?  I suppose instead of variables or parameters,
> a secondary xml file would be another option.
> 
> Obviously I don't want to just do:
> <xsl:template match="sd|stagedir">
> <stage><xsl:apply-templates/></stage>
> </xsl:template>
> because sometimes one file will use an element name
> that conflicts with another file's use of it.

Can you use the ancestors to make the matches unumbiquous?

  <xsl:template match="scene/sd | scn/stagedir">

Cheers,

Jarno - Hocico: Forgotten Tears (Live out-take)

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



Current Thread
Keywords
xml