Re: [xsl] Detecting presence of attributes

Subject: Re: [xsl] Detecting presence of attributes
From: Peter Flynn <peter@xxxxxxxxxxx>
Date: Mon, 5 Feb 2001 23:30:25 +2400
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.

>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 
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)">

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


 XSL-List info and archive:

Current Thread