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

RE: XSLT and unexpected text ouput?

Subject: RE: XSLT and unexpected text ouput?
From: "Brinkman, Theodore" <Theodore.Brinkman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Apr 2004 12:59:45 -0400
unexpected text in content
Sounds like the default templates are being called.  You'll probably need to do something like <xsl:template match="InsertMatchHere"/> to replace the default templates with templates which don't output anything.

For example, if I had some XML that looked like:
<root>
	<branch1>...content...</branch1>
	<othernode>...content...</othernode>
</root>

and an XSLT stylesheet which only had the following template:
<xsl:template match="branch1">
	...do stuff...
</xsl:template>

I would get all the leaf content of othernode underneath the branch1 processed output.  To avoid getting the othernode content, I would need to add an 'empty' template to override the default template, like this:
<xsl:template match="othernode"/>

	- Theo

-----Original Message-----
From: Jon Schwartz (Volt) [mailto:a-jonsch@xxxxxxxxxxxxx]
Sent: Wednesday, April 28, 2004 12:52 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  XSLT and unexpected text ouput?


I have seen this only a couple times, and without giving away our future
product can't send XML and XSLT to demonstrate it.  But I'm hoping I can
describe the general behavior and one of you will have seen this kind of
thing before.

I am converting XML to HTML.  A chunk of XML content in one branch of
the XML tree is rendered as I want it to without a problem. But at the
bottom of the HTML file - in fact after my closing </HTML> - the text
content of a series of leaf nodes in an entirely different branch of the
XML are streamed onto the end of the file.  I have checked carefully and
tried tweaking data, I have stepped through this in XSelerator - there
is no XSLT match or code which is causing this to happen.

I tried switching the order of the XML branches, so that the one I want
to render is below the other in the file.  Now the leaf content from the
unwanted branch is streamed ABOVE the HTML that I want - so the behavior
IS dependent on the order in the XML.

I am using MSXML for the transform.  Have any of you seen this before?
A workaround would be greatly appreciated.

Thanks,

Jon Schwartz

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.