|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: why doesn't 'self::NODE' work?
At 09:33 AM 4/15/2003, you wrote:
In addition to the other answers you have received, let me add a few things. First of all, your template is not returning the results you see. It may very well not even be called. Instead, your results are being returned by the xslt default template, which returns the text content of an element of there are no other templates available. You do have to take some care when applying medicine like this as a debugging technique: it's strong stuff, overriding the default processing of *any* element not otherwise matched by a template, so it'll suppress output also from higher in the tree if there are nodes there not matched with templates of their own. Use with caution. Better: understand the underlying principles behind what Tom is doing -- 1. There exist default templates that play a role even if you don't see them 2. These can be overridden with defaults of your own as a method of discerning, sometimes, what's really going on. For example, it's sometimes helpful to use a diagnostic template like this (assuming non-standard HTML output is okay for testing purposes ;-) ... <xsl:template match="*">
<blink>
<xsl:value-of select="local-name()"/>
</blink>
<xsl:apply-templates/>
</xsl:template>which will litter the output with the names of nodes not matched by templates of their own (and therefore caught by this one). (With apologies for the <blink> -- you know what I mean.) Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








