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

RE: How dynamic is XSL?

Subject: RE: How dynamic is XSL?
From: Ben Robb <Ben@xxxxxxxxxx>
Date: Thu, 10 Aug 2000 19:28:55 +0100
RE: How dynamic is XSL?
Within your XML you have the following:

<card>
  <cardid>index</cardid>
  <cardtitle>WAP XML Test</cardtitle>
...
</card>

Your "apply-templates" sees the cardid and cardtitle tags, and, failing to
find a matching template, moves on. However, there is also a default
template for text elements, which has the form of:

<xsl:template match="text()">
	<xsl:value-of select="." />
</xsl:template>

This prints out the value of any text elements it finds.

So, either negate the default by putting this line in:

<xsl:template match="text()"/>

or, specify empty templates for <cardid> and <cardtitle>

<xsl:template match="cardid"/>
<xsl:template match="cardtitle"/>


or, if you can play with the DTD/ Schema of the incoming XML, make it so
that it has the following structure (which is probably the best solution):

<card id="index" title="WAP XML Test">
	...
</card>

Rgs,

Ben
 


 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.