This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Problems with <xsl:template match...> in style sheet
- From: "Joerg Heinicke" <joerg dot heinicke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 25 Jan 2002 20:57:08 +0100
- Subject: Re: [xsl] Problems with <xsl:template match...> in style sheet
- References: <A3AA9CEF24D21144A461F10C82A7AAA516BF92@cceexc22.americas.cpqcorp.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
In a stylesheet there are always built-in templates, which output the text
of <DATA_SET1>. To avoid this add an empty template <xsl:template
match="DATA_SET1"/>.
Regards,
Joerg
----- Original Message -----
From: "Magick, Brian" <Brian.Magick@COMPAQ.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Friday, January 25, 2002 8:34 PM
Subject: [xsl] Problems with <xsl:template match...> in style sheet
> I'm applying a style sheet to an XML file that contains the following
> hierarchy:
>
> <DOCUMENT>
> <DATA_SET1>
> <DATA>
> <DATA>
> <DATA>
> ......
> <DATA_SET1>
> <DATA_SET2>
> <DATA>
> <DATA>
> <DATA>
> <DATA_SET2>
> <DOCUMENT>
>
> The style sheet outputs the DATA_SET2 node and formats it into tables.
>
> At the beginning of the template I use <xsl:template match="DATA_SET2">
> to get the second data set, and the ouput formats correctly into the
> tables and rows, BUT, the stylesheet is also "throwing up" the entire
> DATA_SET1 as text only right before the DATA_SET2 tables begin.
>
> This is strange behavior that I cannot explain. I've tried changing the
> match parameters to "DOCUMENT/DATA_SET2" and it still spits out the
> entire DATA_SET1 before it formats my DATA_SET2 into tables and rows.
>
> Any suggestions?
>
> Brian Magick
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list