[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to display only certain nodes
Scott Zagar wrote: > <xsl:template match="/"> > <table width="90%" cellpadding="1" cellspacing="1" border="0"> > <xsl:apply-templates /> > </table> > </xsl:template> The xsl:apply-templates instruction is saying to go process all the children of the node currently being processed (the current node is the root node, in this case). Either your Topic element is in this set of children, or you it is being picked up by the default templates. The default template for elements just contains <xsl:apply-templates/>. The default template for text nodes makes a copy of the node. You can override this template by matching "text()", but the better option is to stop the descent into that part of the tree in the first place. Change your <xsl:apply-templates/> above to go from the root node straight to the Message element nodes. <xsl:apply-templates select="Topic/Message"/> - Mike _____________________________________________________________________________ mike j. brown, software engineer at | xml/xslt: http://skew.org/xml/ webb.net in denver, colorado, USA | personal: http://hyperreal.org/~mike/ 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
|