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

Re: xsl:include blues..

Subject: Re: xsl:include blues..
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 13 Feb 2001 11:19:42 GMT
Re:  xsl:include blues..
> I am not sure why the above doesn't work, but I assume its because the
> templates must be well-formed? So the question is, how can I include the
> same "header" and "footer" 

Yes, that is one way to phrase it but another is to say that XSLT does
not deal with the string representation of an XML file, but with a tree
representation. 

You say you want to have <html> added at one place and </html> added
somewhere else, but that is talking about characters in the string
that represents the XML document.

If you think in terms of the node tree you'll see that there is just one
item, the HTML element node, so it can only be added at one place.
The template that adds the html node can then call a named template that
adds a body element node (and all its children) that has been included
from your xsl:include file.

You could do the same with a footer, but if your "footer" is </body></html>
then that isn't a footer at all that syntax will be generated when the
result tree is serialised as the html and body nodes were added to the
result tree by your initial template.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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.