Subject: Re: [xsl] Template based on attribute From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 23 Feb 2004 12:10:48 -0500 |
I have a XML something like this
<customers> <cust type"LOCAL"> <data> <property id="1" name="Chasey" /> <property id="2" name="Pat" /> </data> </cust> <cust type"INTERNATIONAL"> <data> <property id="1" name="Chasey" /> <property id="2" name="Pat" /> </data> </cust> </customers> I wish to apply a different template based on the type attribute as it needs to be handled differently. ... How do I do it in XSL ?
<xsl:template match="cust[@type='LOCAL']"> ... </xsl:template>
<xsl:template match="cust[@type='INTERNATIONAL']"> ... </xsl:template>
-- Public courses: Spring 2004 world tour of hands-on XSL instruction Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO United States: Washington, DC March 15; San Francisco, CA March 22 Finland April 26; Hong Kong May 17; Germany May 24; London June 07 World-wide on-site corporate, government & user group XML training
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Template based on attribu, Rui Alberto L. | Thread | [xsl] Network diagram - node set in, cknell |
Re: [xsl] Template based on attribu, Rui Alberto L. | Date | RE: [xsl] pointed border, Andreas L. Delmelle |
Month |