[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xslt template match

Subject: Re: xslt template match
From: Brandon Ibach <brandon.ibach@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Jul 2011 01:20:42 -0400
Re:  xslt template match
If I have understood your requirement correctly, try...

<xsl:template match="ITEM[not(TYPE)]"> do something </xsl:template>

or, equivalently...

<xsl:template match="ITEM[count(TYPE) = 0]"> do something </xsl:template>

-Brandon :)


On Fri, Jul 1, 2011 at 12:44 AM, Senthilukvelaan
<skumaravelan@xxxxxxxxxxxxxx> wrote:
> Hi All,
> I have a question in conditional match template. I want to call a
> template like below when there is no child node called "TYPE" does not
> exists condition also.
> Please help me how do I do that? " TYPE " node is dynamic element in
> the input xml. It might exist or not.
>
> I have both templates in my xslt.
>  <xsl:template match="ITEM[TYPE='ONLINE']">
> do something
>  </xsl:template>
>
>  <xsl:template match="ITEM">
> do another think
>  </xsl:template>
>
>
> Please help.
>
> Thanks
> Senthil

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.