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:template match="A|ACRONYM|ADDRESS|APPLET|AREA|B|BASE|BASEFONT|BDO|BGSOUND|BIG|BLOCKQU OTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|COMMENT|DD|DEL|DFN| DIR|DIV|DL|DT|EM|EMBED|FIELDSET|FONT|FORM|FRAME|FRAMESET|HEAD|Hn|HR|HTML|I|I FRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|LISTING|MAP|MARQUEE|MEN U|META|NEXTID|NOBR|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTION|P|PARAM|PLAINTEXT|PRE| Q|RT|RUBY|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TBODY| TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VAR|WBR|XML|XMP"> <xsl:apply-templates /> </xsl:template> or <xsl:template match="*"> <xsl:apply-templates /> </xsl:template> 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 http://www.bayes.co.uk/xml XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Using XHTML generated with W3C, Wendell Piez | Thread | RE: Using XHTML generated with W3C, Thorbjørn Ravn Ander |
RE: Using XHTML generated with W3C, Kay Michael | Date | parameter count in xsl:number, Paul Terray |
Month |