[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problems with displaying node
Hi, I guess you need to use something like this. It prints contents of all <para> nodes, whose "invisible" attribute is not equal to 'yes'. <xsl:template match="/document"> <xsl:for-each select="para"> <xsl:if test="not(@invisible = 'yes')"> <xsl:value-of select="." /> </xsl:if> </xsl:for-each> </xsl:template> Regards, Mukul --- Bertrand Sauviat <bsauviat@xxxxxxxxxxxxxx> wrote: > In my XML, I have some <para> with an attribute or > not. I want use this > attribute to make a test. If the attribute is != > null then I don't want to > display the contains of <para>. > > Here is my XML: > > <document> > <para name="introduction"> > Contains of the introduction > </para> > > <para name="author" invisible="yes"> > Name of the author > </para> > > <para name="para1"> > Contains of the para1 > </para> > > <para name="interpara" invisible="yes"> > Contains of the interpara > </para> > > </document> > > In my XSL, I have make some condition on the > @invisible like this: > > <xsl:template match="//para"> > <xsl:if test="//para/@invisible!='yes'"> > <xsl:value-of select="//para"/> > </xsl:if> > </xsl:template> > > But the output is binary..and don't take into a > count my attribute.. > Thanks for help > __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|