Subject: [xsl] Searching for a particular node From: Brian Moynihan <BMoynihan@xxxxxxxxxx> Date: Mon, 25 Mar 2002 10:41:41 -0000 |
Hi all, Is it possible using XSL to select a node based on a particular value ... for example in the following xml, I want to select the <entity> node with an id of 'e14'. My question is, how do I accomplish this with XSL using @id? XSL: <xsl:template match="tree"> <xsl:apply-templates select="entity"/> </xsl:template> <xsl:template match="entity"> XML: <entity id="e12"> <description>Reports</description> <oncontextmenu></oncontextmenu> <image>images/book.gif</image> <imageOpen>images/bookOpen.gif</imageOpen> <contents> <entity id="e13"> <description>Income</description> <oncontextmenu></oncontextmenu> <image>images/paper.gif</image> <imageOpen>images/paper.gif</imageOpen> <contents> </contents> </entity> <entity id="e14"> <description>Expenses</description> <oncontextmenu></oncontextmenu> <image>images/paper.gif</image> <imageOpen>images/paper.gif</imageOpen> <contents> </contents> </entity> </contents> </entity> Thanks, Brian. ********************************************************************** Privileged, confidential and/or copyright information may be contained in this e-mail. This e-mail is for the use only of the intended addressee. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy, forward, disclose or otherwise use it or any part of it in any way whatsoever. To do so is prohibited and may be unlawful. If you receive this e-mail by mistake please advise the sender immediately by using the reply facility in your e-mail software. Orygen (Ireland) Limited may monitor the content of e-mails sent and received via its network for the purposes of ensuring compliance with its policies and procedures. This message is subject to and does not create or vary any contractual relationship between Orygen (Ireland) Limited and you. ********************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] svg from java method, Fischer Tibor | Thread | Re: [xsl] Searching for a particula, Arief |
Re: [xsl] how to use data in other , David Carlisle | Date | RE: [xsl] svg from java method, Andy Joslin |
Month |