[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Discovering the joys of xsl:include

Subject: RE: Discovering the joys of xsl:include
From: "Tim Watts" <timw@xxxxxxx>
Date: Tue, 24 Apr 2001 14:15:56 +1000
msxsl 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.