[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: Peter Flynn <peter@xxxxxxxxxxx>
Date: Mon, 5 Feb 2001 23:30:25 +2400
Re:  Detecting presence of attributes
Thanks to all those who pointed out that @foo can be used as
a standalone Boolean as well as the LH side of an =. RTFM would
have been a good idea, but being so used to the explicitness of
Omnimark I didn't actually expect XSLT to possess the feature :-)

>XT honors (a) and not (b) and that's the right behavior.

That now follows.

>To get the feature you want to have, you need to convert the node-set
>into a string first:

No, all I wanted was detection of the existence of the attribute.
I'm not clear what converting the node-set into a string achieves.

[position()]
>I don't see this either.

This looks like my xt may be out of date. Strange, I only downloaded 
it a few
weeks ago. Take a simple example: I have an attribute declared as 
ENTITIES
whose values are multiple entity names which I want output as a list 
separated by commas instead of spaces:

<xsl:for-each select="@foo">
  <xsl:value-of select="."/>
  <xsl:if test="not(position()=last)">
    <xsl:text>,</xsl:text>
  </xsl:if>
</xsl:for-each>

I'm curious to know why the output contains the entity names separated 
by spaces
instead of commas.

///Peter








 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.