[xsl] xsltproc complains about xsl:sort

Subject: [xsl] xsltproc complains about xsl:sort
From: Ed_Owen@xxxxxxxxxxxxxxxxxxxx
Date: Mon, 2 Aug 2004 17:09:14 -0700
I'm using XSLT to transform some XML output from Doxygen into WordML,
Microsoft's XML schema for Word documents.

I've been using Altova's XMLSpy to create the XSLT and to do the actual
transform.

This works great, but I am seeing some weird things where certain elements
that appear in the source XML tree once are getting processed twice.

For a sanity check, I tried to do the transformation using xsltproc
instead. When I did that, I got the following run-time error for just about
every occurrence of <xsl:sort> in my XSLT:

      runtime error: file sce-rt2.xslt line 218 element sort
      xsl:sort : improper use this should not be reached

XMLSpy has no such trouble, and I'm fairly certain everything is
well-formed and happy. Here's the offending line 218 and surrounding from
my XSLT:

      <xsl:for-each select="sectiondef/memberdef">
            <xsl:sort select="name"/>
                  <w:tr>
                        <w:tblPrEx><w:tblCellMar><w:top w:w="0"
w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/></w:tblCellMar></w:tblPrEx>
      [snip]
                        <xsl:value-of select="@id"/>
      [snip]
                        <w:t><xsl:value-of select="name"/></w:t>
                        <xsl:apply-templates select="briefdescription"/>
                  </w:tr>
      </xsl:for-each>

The xml file being transformed is rather large (1.5 MB), but not incredibly
so. With XMLSpy, the resulting XML file runs 6 MB+ (yay WordML).

I'm running Windows 2000. This happens with both xsltproc 1.1.7 and 1.1.8.

Any ideas or similar experiences would be appreciated. I've checked the
various archives and bug lists and don't see this documented (or I missed
it).

thanks,
Ed

Current Thread