| Author |
Why aren't DENSITY & DISTANCE text displayed?
|
John Wetherbie
Rancher
Joined: Apr 05, 2000
Posts: 1441
|
|
Hi, all! I just want to get something clear about default template rules. I have the following XML file and XSL stylesheet: When I do the transformation I get a table that displays the name, mass, radius, and day of Mercury. What I am wondering is why doesn't the text data for the density & the distance get generated outside the table? Is this because the template for PLANET explicitly states what to do so that the density and distance elements aren't even looked at? I guess my question is if you have a template or templates for a node (with a match attr) will this prevent the default template rule from being applied to sibling nodes even if they fail the match test? I just want to be very clear on how default template rules get applied. The example XML & XSL files are based on the examples in Inside XSLT by Steven Holzner. Thanks, John
|
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
|
 |
Mapraputa Is
Leverager of our synergies
Sheriff
Joined: Aug 26, 2000
Posts: 10065
|
|
I guess my question is if you have a template or templates for a node (with a match attr) will this prevent the default template rule from being applied to sibling nodes even if they fail the match test? I believe so. If you want to allow child nodes processing, add <xsl:apply-templates/> at the end of the template <xsl:template match="PLANET"> <TR> <TD><xsl:value-of select="NAME"/></TD> ... <xsl:apply-templates/> </TR> </xsl:template> and see all default templates at work  [ March 17, 2002: Message edited by: Mapraputa Is ]
|
Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
|
 |
 |
|
|
subject: Why aren't DENSITY & DISTANCE text displayed?
|
|
|