[XSL-LIST Mailing List Archive Home]
Re: [xsl] partial attribute matching
Subject: Re: [xsl] partial attribute matching|
From: "cking" <cking@xxxxxxxxxx>
Date: Tue, 17 Aug 2004 21:57:31 +0200
if I understand you correctly, you could use the starts-with function:
<xsl:variable name="section" select="'http://www.somedomain.com/section/'"/>
<xsl:if test="/html/head/page_url[starts-with(@url, $section)]">
Tuesday, August 17, 2004 9:41 PM ARiley@xxxxxxxxxxxxxxx wrote:
> I have an xml file that contains:
> <page_url url="http://www.somedomain.com/section/page.html" />
> and a corresponding xsl fragment:
> <xsl:if test="
> do something different
> What I'm trying to accomplish is to apply a template to an entire 'url'
> section but this doesn't appear to work. What's the preferred way of
> testing for a partial attribute match?