This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: applying the same template to multiple tags


Eric,

>Given that I'm really stuck with about 15 different tags, and they're all
>formatted identically, I'd like to change this so that I can use the same
>template for multiple items that are formatted identically (i.e., something
>that does    <xsl:template match="menu or option or screen or...">...), so I
>don't need to change all 15 items every time someone decides they should
>look different.

You have the syntax *almost* right.  The select attribute specifies a node
set that the node you're looking at is matched against.  You want that node
set to contain all menu, option, screen etc. nodes.  You can combine node
sets using the '|' operator, so try:

  <xsl:template match="menu | option | screen | ...">
    ...
  </xsl:template>

Hope that helps,

Jeni

Dr Jeni Tennison
Epistemics Ltd * Strelley Hall * Nottingham * NG8 6PE
tel: 0115 906 1301 * fax: 0115 906 1304 * email: jeni.tennison@epistemics.co.uk


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]