Subject: RE: [xsl] How to display only certain nodes From: Heather Lindsay <heather.lindsay@xxxxxxxxxxxxx> Date: Wed, 13 Jun 2001 15:25:13 -0400 |
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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using DOM in XSL Document, Hahn, Kimberly | Thread | [xsl] grouping and selecting, Earl Spencer |
Re: [xsl] How to display only certa, Mike Brown | Date | [xsl] grouping and selecting, Earl Spencer |
Month |