Re: [xsl] Is it possible to nest templates? If not, how to combine the output of two templates into one?

Subject: Re: [xsl] Is it possible to nest templates? If not, how to combine the output of two templates into one?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 3 Mar 2008 16:50:43 GMT
> xsl2: I also have another xml file that has attributes such as product
> name and version that I want to be able to include when processing the
> xml topics in 1. I have created a separate stylesheet to do this. 

the stylesheet that you posted should produce an empty document as
nothing is output to the result tree, it does have a couple of
xsl:message commands that should make messages with some values.

> When I try to nest templates, it does not work. 
You can not nest templates. (It's not clear what it could mean even if
it were allowed)

> When I try to include this stylesheet with another template, index.xml
> gets overwritten and becomes blank.
as posted index.xml should be blank in any case.

> If I don't use template match="/", nothing works.  
You'd need to be more specific aboyt what you did, and what went wrong.


> Xsl1. This is what I'm trying to do and it does not work. How do I not
> use template match="/"? How do I include one template within another?

You haven't posted a complete stylesheet in this case, or said what
transform it is trying to do.

It isn't clear why you need two stylesheets at all, or how you have
tried to combine them.

Why do you need the first stylesheet at all?

David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread