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

Re: Detecting presence of attributes

Subject: Re: Detecting presence of attributes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 4 Feb 2001 23:13:11 GMT
asp detecting attribute
(a) the attribute foo was specified but the value was the null string 
"", or
(b) the attribute foo was not specified at all.

yes.

If you just want to test (b) use test="@foo"

> xt does not appear to honor either.
does so.

>  Is this a bug in xt, or have 
unlikely
> I missed some additional piece of syntax.
hard to say. Are you sure the attribute isn't being defaulted by the
dtd. 

> A second problem arises with the position() function. In xt this appears
> only to work within an <xsl:for-each> loop, not in a node group
"node group" isn't a defined concept, (see the long thread on node sets
over the last week:-)

> instantiated by a match or select.
matchs don't select node set's so I don't know what you mean by that,
but position() works whenever there is a current node list, so

xxx[position()=3]

or 

<xsl:template match="xxx">
<xsl:if test="position()=3">

or various other constructs.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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.