Altova Mailing List Archives


RE: [xsl] How to test a substring in an XSL:IF

From: "Julian Reschke" <julian.reschke@------>
To:
Date: 7/26/2002 1:49:00 PM
FAQ.

"WD-XSL" is not XSLT and doesn't support XPath.

Upgrade. See FAQ on http://www.netcrubible.com.

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Gyan Jadal
> Sent: Friday, July 26, 2002 11:45 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] How to test a substring in an XSL:IF
>
>
> Tried that . Got the following error ..
> Error Type:
> msxml3.dll (0x80004005)
> Unknown method. -->contains(name<--()='Save')
>
>
> ----- Original Message -----
> From: "Thomas Bayer" <bayer@xxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Friday, July 26, 2002 3:37 PM
> Subject: AW: [xsl] How to test a substring in an XSL:IF
>
>
> > Hi,
> > contains is a XPath function and not in XSL or XSLT Namespace. You use
> XPath
> > functions inside attributes. Try:
> >
> > <xsl:when test="contains(name(),'save')">
> >
> >
> > Thomas Bayer
> > Orientation in Objects
> > http://www.oio.de
> >
> > > -----Urspr&uuml;ngliche Nachricht-----
> > > Von: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]Im Auftrag von
> Gyan Jadal
> > > Gesendet: Freitag, 26. Juli 2002 22:16
> > > An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Betreff: [xsl] How to test a substring in an XSL:IF
> > >
> > >
> > >  All,
> > >   I checked in the existing forums but couldn't get a specific answer
> for
> > >   this.
> > >   I am trying to test if a string pattern exists in the elements name
> tag
> > >   How do I search for a substring in a main string value.?
> > >
> > >   I am using the following namespace "http://www.w3.org/TR/WD-xsl"
> > >   which does not support 'contains' function.
> > >
> > >   My code :
> > >   <xsl:when test=".[name='Save']">
> > >
> > >   The name may contain "Save Customer"
> > >   I want to test if the name contains 'Save' ..
> > >
> > >   Help is appreciated.
> > >
> > >
> > >
> > >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> > >
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.