jaxp
  1. jaxp
  2. JAXP-31

XSLTC - Could not compile stylesheet

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      31

      Description

      Two transformation based on XSLT stylesheet (wordml/spreadsheetml import) that
      are shipped StarOffice/OpenOffice.org do not compile with XSLTC of 1.5.0_11 and
      1.6.0_01.
      But they are working with Xalan 2.7.0.

      The stacktrace is:

      javax.xml.transform.TransformerConfigurationException:
      Could not compile stylesheet

      at
      com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
      Source)
      at
      com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown
      Source).

        Activity

        Hide
        svanteschubert added a comment -

        Created an attachment (id=8)
        ZIP of two XSL transformations 1) \xslt\import\spreadsheetml\spreadsheetml2ooo.xsl and 2) \xslt\import\wordml\wordml2ooo.xsl

        Show
        svanteschubert added a comment - Created an attachment (id=8) ZIP of two XSL transformations 1) \xslt\import\spreadsheetml\spreadsheetml2ooo.xsl and 2) \xslt\import\wordml\wordml2ooo.xsl
        Hide
        Santiago Pericas-Geertsen added a comment -

        I have looked at the first of the two stylesheets using the latest JAXP build (1.4.1 nightly from the
        downloads section). In line 5945 of spreadsheetml2ooo.xsl you have the following expression,

        <xsl:value-of select="count(ss:Table/ss:Row + number($spannedRows))"/>

        which is making the XSLTC typechecker unhappy. I believe your intention here is:

        <xsl:value-of select="count(ss:Table/ss:Row) + number($spannedRows)"/>

        There may be some automatic conversion that XSLTC isn't implementing correctly, but if you change
        the expression as suggested above the stylesheet compiles and runs.

        Show
        Santiago Pericas-Geertsen added a comment - I have looked at the first of the two stylesheets using the latest JAXP build (1.4.1 nightly from the downloads section). In line 5945 of spreadsheetml2ooo.xsl you have the following expression, <xsl:value-of select="count(ss:Table/ss:Row + number($spannedRows))"/> which is making the XSLTC typechecker unhappy. I believe your intention here is: <xsl:value-of select="count(ss:Table/ss:Row) + number($spannedRows)"/> There may be some automatic conversion that XSLTC isn't implementing correctly, but if you change the expression as suggested above the stylesheet compiles and runs.
        Hide
        Santiago Pericas-Geertsen added a comment -

        As for the other stylesheet, wordml2ooo, the compilation fails in this call,

        <xsl:variable name="tmp" select="oleextracter:insertByName('oledata.mso', translate(text
        (),' ','' ) )"/>

        I'm not familiar with the 'oleextracter' extension element declared in this stylesheet. But, whatever it is,
        isn't supported by XSLTC or part of the XSLT 1.0 spec. Shouldn't the stylesheet use element-available() for
        portability?

        Show
        Santiago Pericas-Geertsen added a comment - As for the other stylesheet, wordml2ooo, the compilation fails in this call, <xsl:variable name="tmp" select="oleextracter:insertByName('oledata.mso', translate(text (),' ','' ) )"/> I'm not familiar with the 'oleextracter' extension element declared in this stylesheet. But, whatever it is, isn't supported by XSLTC or part of the XSLT 1.0 spec. Shouldn't the stylesheet use element-available() for portability?
        Hide
        Santiago Pericas-Geertsen added a comment -

        Fixing the stylesheet will make it work with XSLTC.

        Show
        Santiago Pericas-Geertsen added a comment - Fixing the stylesheet will make it work with XSLTC.

          People

          • Assignee:
            Santiago Pericas-Geertsen
            Reporter:
            svanteschubert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: