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

Re: attribute test

Subject: Re: attribute test
From: Spencer Tickner <spencertickner@xxxxxxxxx>
Date: Thu, 15 Sep 2005 12:03:38 -0800
spencer tickner
Sorry, Think I jumped the gun there,

The line above did not quite do what I expected. With the same 3 xml
documents above I used:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- Pseudo xsl -->
<xsl:template match="/">
<html>
<body>
<xsl:if test="not(/Root/foo/@att!='hi')">
 	<xsl:apply-templates/>
</xsl:if>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

The third document outputted information when it should not have.. Any
other thoughts, did I mess something up?

Spencer


On 9/15/05, Spencer Tickner <spencertickner@xxxxxxxxx> wrote:
> Perfect, Thanks a lot Joris
>
> On 9/15/05, Joris Gillis <roac@xxxxxxxxxx> wrote:
> > Tempore 20:28:26, die 09/15/2005 AD, hinc in
xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Spencer Tickner
<spencertickner@xxxxxxxxx>:
> >
> > > This should be a relatively simple solution but my mind ain't quite
> > > working right today and google isn't being good to me.
> > >
> > > I'm looking to test if any elements of a certain type do NOT have an
> > > attribute with a specific value in an entire xml doc. For instance.
> > >
> > > <!-- Pseudo xsl -->
> > > <xsl:template match="/">
> > > <xsl:if test="<!-- if all the foo elements in the doc only contain the
> > > attribute att with a value of hi, don't output -->">
> > >   <xsl:apply-templates/>
> > > </xsl:if>
> > > </xsl:template>
> >
> > "not(/Root/foo/@att!='hi')"

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.