This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Detecting presence of attributes
- To: <xsl-list at lists dot mulberrytech dot com>, "'Dimitre Novatchev'" <dnovatchev at yahoo dot com>
- Subject: RE: [xsl] Detecting presence of attributes
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Mon, 5 Feb 2001 14:07:37 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> >Your xsl:for-each below always selects just one node ( an element has
> >not more than one attribute with a given name)
>
> No, the attribute is declared as ENTITIES, not ENTITY. There are
> multiple entity names in the attribute value, separated by spaces.
The attribute type is not visible in the XPath tree model and has no effect
on the way a stylesheet is processed (unless the type is ID, which affects
the id() function).
Splitting up an ENTITIES value is therefore the same as processing any other
space-separated string, it can be done using a recursive named template
using the substring-before() and substring-after() functions, or using the
tokenize() extension function present in Saxon and Xalan.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list