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

RE: Filtering using XSL

Subject: RE: Filtering using XSL
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 11 Feb 2000 09:21:45 -0000
filtering using xsl
The following stylesheet does something with your input, but you still
haven't explained your requirements clearly enough for us to know whether
it's the output you want.

<xsl:transform
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 version="1.0"
>

<xsl:template match="Main">
<Main><xsl:apply-templates/></Main>
</xsl:template>

<xsl:template match="Chapter[@Value='false']"/>

<xsl:template match="Chapter[@Value='true']">
<Chapter Value="true"><xsl:apply-templates/></Chapter>
</xsl:template>


</xsl:transform>	 

> -----Original Message-----
> From: tmmet tvp [mailto:tmmet@xxxxxxxxxxx]
> Sent: 10 February 2000 19:17
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: RE: Filtering using XSL
> 
> 
> Thanks for your Mail...Ok...I'll start from scratch....
> My XML file is as follows...
> <Main>
>   <Chapter Value = "false">
>      <Chapter Value = "false">
>         <Chapter Value = "true"/>
>      </Chapter>
>   </Chapter>
> <Chapter Value = "false">
>     <Chapter Value = "true"/>
> </Chapter>
> <Chapter Value = "true"/>
> </Main>
> 
> I want to filter out all Chapters(including 
> children/descendants) with Value 
> = "false".
> So,I've to get only Main which contains Chapters(direct 
> children/descendants,children of Chapters) with Value = "true" after 
> transformation...
> In my xsl file,I tried the following possibilities...
> 
> 1.  <xsl:template match = "Main//Chapter[@Value = 'false']"/>
> 2. <xsl:template match = "Main[not(.//Chapter[@Value = 'false'])]"/>
> 
> Any ideas/suggestions will be graetly helpful for me...
> Thanks in advance...
> 
> 
> 
> 
> 
> 
> 
> 
> >From: Kay Michael <Michael.Kay@xxxxxxx>
> >Reply-To: xsl-list@xxxxxxxxxxxxxxxx
> >To: "'xsl-list@xxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxx>
> >Subject: RE: Filtering using XSL
> >Date: Thu, 10 Feb 2000 18:50:21 -0000
> >
> > > It is filtering all the direct children Chapters of Main
> > > which has attribute value = 'true'.
> >
> >I think you need to make it clear whether you are using the word 
> >"filtering"
> >to mean "filtering through" or "filtering out".
> >
> >You probably need to go back to basics: show us a source 
> document and a
> >stylesheet, show us the output you want and the output you 
> are getting, and
> >tell us what processor you are using.
> >
> >Mike Kay
> >
> >
> >  XSL-List info and archive:  
http://www.mulberrytech.com/xsl/xsl-list

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


 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

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.