|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How to display only certain nodes
You want: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" indent="no"/> <xsl:template match="/"> <table width="90%" cellpadding="1" cellspacing="1" border="0"> <xsl:apply-templates select="Message"/> </table> </xsl:template> <xsl:template match="Message"> ... HTML to display the message ... </xsl:template> </xsl:stylesheet> By using just <xsl:apply-templates/> you are applying templates to all elements in the document. If you do not write an <xsl:template ...> for any existing element then the default template is applied which is printing out the values of the elements. -----Original Message----- From: Scott Zagar [mailto:scottz@xxxxxxxxxxxxx] Sent: Wednesday, June 13, 2001 2:45 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: How to display only certain nodes <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" indent="no"/> <xsl:template match="/"> <table width="90%" cellpadding="1" cellspacing="1" border="0"> <xsl:apply-templates /> </table> </xsl:template> <xsl:template match="Message"> ... HTML to display the message ... </xsl:template> </xsl:stylesheet> 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








