Subject: RE: MSXSL ignoring the mode attribute
From: "Michael Leditschke" <mike@xxxxxxxxxxx>
Date: Tue, 2 Jul 2002 20:43:40 +1000
|
Thanks Andrew. I forgot to try MSXSL with the -u option for 3.0
but as you indicate, it works ok.
Regards
Michael
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Andrew Welch
> Sent: Tuesday, 2 July 2002 8:22 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: MSXSL ignoring the mode attribute
>
>
>
> MSXML3 and Saxon produce the same (correct) result, MSXML4 fails to
> recognise the mode. I would report this as a bug to Microsoft. (the
> debug handles follow the correct path, but the output doesnt(!))
>
> I know that some ms techies are on the list, so they may pick this up
>
> cheers
> andrew
>
>
> -----Original Message-----
> From: Michael Leditschke [mailto:mike@xxxxxxxxxxx]
> Sent: 02 July 2002 07:38
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: MSXSL ignoring the mode attribute
>
>
> I am running saxon 6.5.2 and MSXSL/MSXML 4.0.
>
> I have the following xml file
>
> <HTMLContents>
> <table>
> <font face="Courier">Some text</font>
> </table>
> </HTMLContents>
>
> and the following stylesheet
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="HTMLContents">
> <root>
> <xsl:call-template name="ProcessSection"/>
> </root>
> </xsl:template>
> <xsl:template name="ProcessSection" match="font" mode="Section">
> <xsl:choose>
> <xsl:when test="@face='Courier'">
> <InFont>Section mode</InFont>
> </xsl:when>
> <xsl:otherwise>
> <xsl:apply-templates mode="Section"/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
> <xsl:template match="font">
> <InFont>No mode</InFont>
> </xsl:template>
> </xsl:stylesheet>
>
> Saxon (I think correctly) produces
>
> <root>
> <InFont>Section mode</InFont>
> </root>
>
> The default template has been recursively applied
> in Section mode until the template matching font
> in Section mode is reached, and the output produced.
>
> However, MSXSL produces
>
> <root>
> <InFont>No mode</InFont>
> </root>
>
> suggesting that the mode has been lost somewhere along
> the line.
>
> Is my analysis correct? Is anyone aware of this being a known
> bug in MSXML 4.0?
>
>
>
> If I change the stylesheet to
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="HTMLContents">
> <root>
> <xsl:apply-templates mode="Section"/>
> </root>
> </xsl:template>
> <xsl:template match="font" mode="Section">
> <InFont>Section mode</InFont>
> </xsl:template>
> <xsl:template match="font">
> <InFont>No mode</InFont>
> </xsl:template>
> </xsl:stylesheet>
>
> Both produce
>
> <root>
> <InFont>Section mode</InFont>
> </root>
>
> as expected, so it appears to be tied in with the use of call-template.
>
> Regards
> Michael
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|