[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@xxxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|