Subject: RE: [xsl] Discovering the joys of xsl:include From: "Tim Watts" <timw@xxxxxxx> Date: Tue, 24 Apr 2001 14:15:56 +1000 |
Hi Lukus, I can't see an xsl:include in your stylesheet, but the <xsl:import href="header.xsl" /> should be immediatly under the <xsl:stylesheet>tag. (currently it is in a template) For example, in a stylesheet I happen to have open at the moment, it is writen like so... <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:include href="document.xsl"/> <xsl:include href="common.xsl"/> <xsl:template match="/"> ... </xsl:template> etc. The imports and includes must be defined before the templates. Best of luck, Tim Watts :) -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Lukas Svoboda Sent: Tuesday, 24 April 2001 1:52 PM To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx' Subject: [xsl] Discovering the joys of xsl:include Hi, just trying to get xsl:includes working, but keep getting "Keyword xsl:import may not be used here" Using MSXML3 btw. My Main XSL is: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:template match="/"> <xsl:import href="header.xsl" /> ... </xsl:template> <xsl:template match="product"> <html> <body> ... </body> </html> </xsl:template> <xsl:template match="product_id"> ... </xsl:template> <xsl:template match="product_title"> ... </xsl:template> <xsl:template match="product_description"> ... </xsl:template> </xsl:stylesheet> My Include XSL is: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:template match="/"> <xsl:apply-templates select="page_data/header" /> </xsl:template> <xsl:template match="header"> ... </xsl:template> </xsl:stylesheet> What am I doing wrong? Take the include out and it works fine. Thanks in advance, Lukas 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: [xsl] Discovering the joys of x, Steve Muench | Thread | RE: [xsl] Discovering the joys of x, Lukas Svoboda |
Re: [xsl] Discovering the joys of x, Steve Muench | Date | RE: [xsl] Discovering the joys of x, Lukas Svoboda |
Month |