[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Discovering the joys of xsl:include
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: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|