Subject: Re: applying the same template to multiple tags From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Fri, 28 Jul 2000 00:13:14 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
applying the same template to multi, Eric Taylor | Thread | RE: applying the same template to m, Kay Michael |
RE: Importing stylesheets Precedenc, Steven Livingstone | Date | Re: Would you use Cocoon to a big p, Robert Koberg |
Month |