|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Processing xsl within an included document
Brooks,
It appears you may be confusing two different features offered by XSLT: * when you need access to another document besides your primary source, you can access it by using the document() function * if you want to modularize your stylesheet, you have two top-level instructions, xsl:import and xsl:include, that can be used If header.xsl provides code (a set of templates) that you want your stylesheet to use, you should be using xsl:import or xsl:include. You'd use document() only if you wanted to query into it or process some or all of it as *input* to your process. Assuming your case falls into the former category, you could adjust your code as follows: --- main.xsl --- <xsl:include href="include/header.xsl"/> ... [in your template] <xsl:variable name="testvar" select="'hello'" /> <xsl:call-template name="make-header"> <xsl:with-param name="value" select="$testvar"/> </xsl:call-template> Boring main stuff --- include/header.xsl ---
<xsl:template name="make-header">
<xsl:param name="value"/>
<page>
<header>
<h1><xsl:value-of select="$value" /></h1>
</header>
</page>
</xsl:template>I hope that helps, Wendell At 01:33 PM 10/13/2004, you wrote: I know that this is something of a FAQ, and I apologize. But I've searched the list archives and googled until the "g" key on my keyboard begged for mercy, and I'm still stuck. ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|

Cart








