Re: [xsl] .Net compiledTransform

Subject: Re: [xsl] .Net compiledTransform
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 20 Nov 2006 13:22:26 GMT
> What am I doing wrong in .Net?

Your stylesheet is in error for xslt 1 (which is what the .net processor
implements) so you shouldn't get any output. 


you have method="xhtml" which is a 2.0 feature you need to use
method="xml" for xslt1.

.


If I make that change then I get align="" with saxon6 (XSLT1) and
align="left/right" with saxon8 (xslt2).

The problem is another xslt2 feature that you have used (which isn't an
error in XSLT1 as you have enabled forwards compatible processing by
putting version="2.0" at the top)

	<xsl:attribute name="align" select="@align"/>
needs to be written as

	<xsl:attribute name="align">
          <xsl:value-of select="@align"/>
        </xsl;attribute>

in xslt1, although I'd write

	<col>
	<xsl:attribute name="align" select="@align"/>
	</col>

as 
  <col align="{@align}"/>

which is simpler and would work in xslt2 or xslt1.

David

Current Thread