[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: applying the same template to multiple tags

Subject: Re: applying the same template to multiple tags
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2000 00:13:14 +0100
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@xxxxxxxxxxxxxxxx


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.