RE: [xsl] escape an <xsl: template function

Subject: RE: [xsl] escape an <xsl: template function
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 7 Feb 2003 15:51:03 -0500
[Dean Hiller]
> I am sure this is in the archives and I couldn't find it.  If someone 
> could just point me to a link, I would appreciate it.  I 
> didn't see it 
> in the FAQ either.
> I want to take an XML document and generate a stylesheet from 
> it using 
> another stylesheet.  This means, I want to put things like 
> the following 
> "in the output"
> <xsl:template match="something that came from XML doc"> 
> </xsl:template>
> It is well-formed unlike the <br>'s of html which xslt can't handle. 
>  Can xsl not handle this too?
> How do I go about doing this?

Yes, you surmise rightly, xslt can generate stylesheets as output.  You
have to alias the "xsl" namespace so that the processor does not get
confused between its own "xsl" namespace and the namespace intended for
the output.  You should be able to find out more in the FAQs. - look for

You would of course be constructing xpath expressions to build
templates, something like this (xsm: is the alias I will use that is
destined to represent the xslt namespace in the output document) -

<xsl:template match='source-doc-element-1'>
	<!-- following is a template that will appear in the output
document -->
	<xsm:template match='{name()}'>
		-- template content here --


Tom P

 XSL-List info and archive:

Current Thread