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

RE: escape an <xsl: template function

Subject: RE: escape an <xsl: template function
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 7 Feb 2003 15:51:03 -0500
escape in xsl
[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
"xsl:namespace-alias".

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 --
	</xsm:template>
</xsl:template>

Cheers,

Tom P


 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.