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
Within your XML you have the following:

  <cardtitle>WAP XML Test</cardtitle>

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="." />

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">



 XSL-List info and archive:

Current Thread