xsl-list
[Top] [All Lists]

Re: Selecting only those nodes whos attibutes contain a given substring

2005-04-12 07:36:24
<xsl:if test="*[contains(@class, 'menublock-selected-')]">
  <xsl:apply-templates/>
</xsl:if>

Just tested it with Saxon 8.3.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




Peter Hickman <peter(_at_)semantico(_dot_)com> 
04/12/2005 09:26 AM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
cc

Subject
[xsl] Selecting only those nodes whos attibutes contain a given substring






I am having to write some XSLT that needs to decide if it needs to 
recurse into the contents of the current mode. Basically I am at a node 
and I only want to recurse into it if at least one of the child nodes 
has an attribute called "class" who's value contains the sub string 
"menublock-selected-". Otherwise I am going to skip this node.

The XML is part of an open source project so there is little chance of 
patching it up.

Any ideas?


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>