xsl-list
[Top] [All Lists]

Moded Templates

2003-01-06 11:44:17
Hello:

After looking at the spec ( http://www.w3.org/TR/xslt#modes ) and searching
the "biglist", I could not find the answer to my question. Besides a
"qualified name" what other values can be used when specifying a mode, is
there a way to define a template using an 'or' (|) or a wildcard (*), for
example, I want template A, B, and C to be used all the time but only need
template D & E when the specific mode is needed. What I'm trying to
accomplish is minimize the number of stylesheets I create- I want 1
stylesheet to contain all the functionality versus having multiple
stylesheets (with duplicated code).

So the XSL would look something like this:

<xsl:template match="A" mode="*">
...
</xsl:template>

or

<xsl:template match="A" mode="(A|B|C)">
...
</xsl:template>

<xsl:template match="B" mode="*">
...
</xsl:template>

<xsl:template match="C" mode="*">
...
</xsl:template>

<xsl:template match="D" mode="MODE_X">
...
</xsl:template>

<xsl:template match="E" mode="MODE_Y">
...
</xsl:template>

Thanks!

Will Lopez
EDS - Health & Insurance Application Solution Centre
MS C3-1C-37
5400 Legacy Drive
Plano, TX 75024 
( phone: +01-972-604-3372 (834-3372)
/  william(_dot_)lopez(_at_)eds(_dot_)com
8 www.eds.com 

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



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