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

Re: merging multiple xsl's - creates new node and igno

Subject: Re: merging multiple xsl's - creates new node and ignores CDATA tags
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 13 Nov 2007 11:09:55 GMT
Re:  merging multiple xsl's - creates new node and igno
> This do the merging, but adds an <xsl:include> node on the output as
> shown below

It pnly pits thattheer because you have explictly copied it using
<xsl:copy>
in the branch handling xsl:include, just remove that and it won't be
copied.

Why matchch on all nodes and then use an xsl:choose to distinguish
xsl:include, especially using name(0 which is likely to be slow and
potentially unreliable (as namespace prefixes  may be different)
Just use template matching.

	<xsl:template match="node()|@*">
... ideentity transfrom

and then  just have

<xsl:template match="xsl:include">
	<xsl:apply-templates/>
</xsl:template>

similarly why have

<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE </xsl:text>

rather than using doctype-system attribute on xsl:output?

> 3) Also noticed, any opening and closing CDATA tag getting ignored
CDATA tags are handled by teh XML parser before XSLt starts, the
XSLt engine does not see them at all, so there is nothing to be done.
If you are writing htmk (rather than xhtml) you can not have markup in a
script element so <![CDATA does not start a cdata section it is just
the literal characters < ! [ C D A T A [ which (should) be reported to
the javascript engine and (should) therefore trigger a javascript syntax
error. Your browser may mask that error, but there isn't an easy way to
force XSLT to make this error (unless you use disable-output-escaping
again which is the usual way of forcing XSLt to bypass XML rules.

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

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.