|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: escape an <xsl: template function
[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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








