|
Subject: Re: [xsl] Searching for a particular node From: "Arief" <arief@xxxxxxxxxxxx> Date: Mon, 25 Mar 2002 18:02:48 +0700 |
try this, ... regarding to your xml.
<xsl:template match="entity/contents">
<xsl:apply-templates select="./entity[@id = 'e14']"/>
</xsl:template>
<xsl:template match="contents/entity[@id = 'e14']">
----- Original Message -----
From: "Brian Moynihan" <BMoynihan@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, March 25, 2002 5:41 PM
Subject: [xsl] Searching for a particular node
> 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
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Searching for a particular no, Brian Moynihan | Thread | RE: [xsl] Searching for a particula, Elovirta Jarno (NBI/ |
| RE: [xsl] svg from java method, Fischer Tibor | Date | Re: [xsl] Working with 2 namespaces, Andreas Schlegel |
| Month |