Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2005, 09:29 AM
Authorized User
 
Join Date: Jun 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling templates from other documents.

I have been trying to trying to call a template from another document. however, all of my attempts have fails. I have tried all variations of:
<xsl:call-template name="document('shapes.xml')/t4">
    <xsl:with-param name="bar" select="$bar"/>
</xsl:call-template>

Obviously, shapes.xml is the document that i am trying to access, and 't4' is the template that i am trying to use. If anyone has any hints pleas let me know! Thanks in advance to anyone that can help!

 
Old July 11th, 2005, 10:04 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You are making pretty wild guesses, which is not a good way to learn a language. Find a book or tutorial that suits your style, and follow it.

You want

<xsl:include href="shapes.xml">

then

<xsl:call-template name="t4"/>

I'm assuming here that shapes.xml is a stylesheet.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
clustering documents iralala Java Databases 0 September 21st, 2008 11:31 PM
Protect my documents Tech4U ASP.NET 1.0 and 1.1 Professional 2 July 6th, 2006 11:32 PM
Calling other templates migake XSLT 4 April 24th, 2006 06:48 AM
comparision of two documents anuradhad Access VBA 0 July 22nd, 2004 12:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.