RE: Using XHTML generated with W3C tidy.

Subject: RE: Using XHTML generated with W3C tidy.
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Fri, 8 Sep 2000 18:14:58 +0100
>>Then you need to change your template to
>><xsl:template match="//table">
>>so that you can get tables at any depth.
>Not so: match="table" matches at any depth. It just matches. Unless
>something else matches with a higher priority.

Yes very true. As long as you have an <xsl:apply-templates /> on an element
*directly* above it. So unless you want to have a template such as
<xsl:apply-templates />


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

Which would output a whole load of unwanted stuff unless you override the
default templates.

>In fact, "//table" could
>well be adding extra overhead because it checks to see whether the table
>being matched descends from the root (it does :-).

No it doesn't! It says match a table at any depth. All elements descend from
the root ;-) // does add a little overhead but unless you want to do
something like the above then you haven't any choice.

Ciao Chris

XML/XSL Portal

 XSL-List info and archive:

Current Thread