Subject: Re: [xsl] Selecting only one element using templates From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 1 Dec 2003 15:01:04 GMT |
Yeah, that's the problem I was having, until I saw that I could apply only the template I wanted using the "select" attribute in the apply-templates. <xsl:apply-templates select="fruit"> Your terminology is off here which makes me suspect you have the wrong model of what xslt's doing here. the select attribute on apply-templates does not relate directly to templates (unlike say the name attribute on call-template which refers to a named template) It selects a set of nodes from the input tree, exactly the same as other select attributes in xslt as on xsl:value-of or xsl:copy. Templates are then applied to that set of nodes, and the highest priority matching templates are applied. (Because of the default templates, it is always the case that some template will apply to each nnode in the set). The match attribute for the template that is used may or may not explictly mention the element matched (fruit here) David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Selecting only one elemen, JCS | Thread | [xsl] how do java xsl processors ha, Robert Koberg |
RE: [xsl] Passing XML data to HTML , Boyd, Eddie | Date | RE: [xsl] Passing XML data to HTML , SHEIKH Sajjad |
Month |