Subject: RE: Problems with IE 5.0 and examples in the XSL spec From: David Schach <davidsch@xxxxxxxxxxxxx> Date: Mon, 5 Apr 1999 13:06:08 -0700 |
IE5 doesn't support the attribute template syntax {}. You need to rewrite your template <xsl:template match="photograph"> <img src="{image}" alt="{desc}"> <xsl:apply-templates/> </xsl:template> using the xsl:attribute element. <xsl:template match="photograph"> <xsl:attribute name = "src"><xsl:value-of select = "image" /></xsl:attribute> <xsl:attribute name = "alt"><xsl:value-of select = "desc" /></xsl:attribute> <xsl:apply-templates/> </xsl:template> -----Original Message----- From: Thomas Weholt [mailto:u970130@xxxxxxxxxxxxx] Sent: Monday, April 05, 1999 1:08 PM To: xsl-list@xxxxxxxxxxxxxxxx Subject: Problems with IE 5.0 and examples in the XSL spec Hi, I`m trying to learn more advanced xsl by using some of the examples in the xsl-spec, but almost nothing works. I`m trying to sort elements, process elements according to content of their attributes etc. Are these things supported in IE 5.0 at all? What I`m looking for is something like this : Ex 1. A XML-document like this : <employees> <employee> <firstname>Linus</firstname> <lastname>Torvalds</lastname> </employee> </employees> with an output like this : <b>Torvalds, Linus</b> Ex 2. A XML-document like this : <programmers> <programmer os="Linux"> <firstname>Linus</firstname> <lastname>Torvalds</lastname> </programmer> <programmer os="Microsoft"> <firstname>Bill</firstname> <lastname>Gates</lastname> </programmer> </programmers> and a stylesheet that only shows programmers that work in Linux, perhaps something like this : Programmers working on "Linux" : Linus Torvalds --------------------------------------------------------------- It seems as if the {@attribute}- and {element}-part is also buggy. The specs say I can do something like <photograph> <image>penguin.jpg</image> <desc>A cute little penguin.</desc> </photograph> and use a template like this <xsl:template match="photograph"> <img src="{image}" alt="{desc}"> <xsl:apply-templates/> </xsl:template> to produce this : <img src="penguin.jpg" alt="A cute little penguin."> but nothing works in IE 5.0 I`m using the final release of IE. HELP!!!! Thomas Weholt ---------------------------------------------- eMail : u970130@xxxxxxxxxxxxx HTTP://bolinux1.hit.no/~u970130 Phone : +47 - 92 09 59 68 ---------------------------------------------- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Problems with IE 5.0 and exampl, John E. Simpson | Thread | Problems with IE 5.0 and examples i, Thomas Weholt |
Re: Problems with IE 5.0 and exampl, John E. Simpson | Date | Re: Attribute_Formatting, Jonathan Borden |
Month |