xsl-list
[Top] [All Lists]

Re: [xsl] .Net compiledTransform

2006-11-20 06:12:39
Rick Roen wrote:
I'm confused by the results I am getting from VB.Net 2005
XslCompiledTransform.

I have the complete XSLT documents below, but it boils down to this:

Source doc:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Report>
      <ReportInfo>
              <CompanyName>Renee's Garden LLC</CompanyName>
              <ReportName>Cookbook sales report</ReportName>
              <OtherInfo>10/01/2006 to 10/31/2006</OtherInfo>
              <OtherInfo>Report date 11/20/2006 6:29:11 AM</OtherInfo>
      </ReportInfo>
      <Columns>
              <column align="left">Invoice no</column>
              <column align="left">Invoice date</column>
              <column align="left">Item no</column>
              <column align="left">Description</column>
              <column align="right">Total shipped</column>
              <column align="right">Order count</column>
              <column align="right">Cost</column>
      </Columns>
... other tags left out for brevity

Transformed by:

      <xsl:template match="Columns" mode="colgroup">
              <colgroup>
                      <xsl:for-each select="column">
                              <col>
                                      <xsl:attribute name="align"
select="@align"/>
                              </col>
                      </xsl:for-each>
              </colgroup>
      </xsl:template>



XSL does not permit '<xsl:attribute name="align" select="@align"/>' -
the select attribute does not apply here. (See:
http://www.w3.org/TR/xslt#creating-attributes)
You probably want to use either
<xsl:attribute name="align">
  <xsl:value-of select="@align/>
</xsl:attribute name="align">

or the attribute value template:

<col align="{(_at_)align}"/>

HTH,

        # r

-- 
Ronan Klyne
Business Collaborator Developer
Tel: +44 (0)870 163 2555
ronan(_dot_)klyne(_at_)groupbc(_dot_)com
www.groupbc.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--