Subject: RE: Conditional branching on string attribute in IE5?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 31 Dec 2002 10:38:34 -0000
|
The function contains() is defined in the XSLT language. The default
processor in IE5 only handles the WD-xsl language, which is a Microsoft
implementation of an early 1998 working draft of XSLT. To use XSLT
functionality, you will need to install MSXML3. See the MSXML FAQ at
http://www.netcrucible.com/
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> drsystems@xxxxxxxx
> Sent: 30 December 2002 03:14
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Conditional branching on string attribute in IE5?
>
>
> Hi,
>
> This is for IE5. For an XML file like:
> <xml>
> <info path="abc.txt">
> <info path="abc.jpg">
> </xml>
>
> I want to check the value of xml/info/path,
> and if it contains a .jpg or .gif extension,
> generate an img node, else generate an
> href node.
>
> I tried the following:
> ..
> <xsl:for-each select="xml/info">
> <xsl-if test="contains(@path,'.jpg')">
> <xsl-element name="a">
> ..
> and got an error, "Unknown method contains(@".
>
> What is the right way to do this for IE5?
> Upgrade to IE6 is not an option :-(
> This is urgent, and I am stuck at this.
> Please help out a new XSL enthusiast! :)
>
> Thanks,
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|