docbook-apps

  • 1.  Error in chunk-common.xsl ?

    Posted 05-22-2008 21:35
    Hi

    I'm trying to use the html/chunk.xsl stylesheet with .NET's XSLT
    processor ( http://techblog.julianhidalgo.com/2008/05/17/transforming-docbook-to-html-in-net/
    ), but I get an error in line 51 of chunk-common.xsl:

    System.Xml.Xsl.XslLoadException: An 'xsl:apply-imports' element can
    only occur within an 'xsl:template' element with a 'match' attribute,
    and cannot occur within an 'xsl:for-each' element. An error occurred
    at E:\docbook-xsl-ns-1.73.2\html\chunk-common.xsl(51,5).

    This is the problematic code
    <xsl:template name="process-chunk-element">
    <xsl:param name="content">
    <xsl:apply-imports/> <-------- Error
    </xsl:param>

    If you open the file with Visual Studio you'll see this same error
    happens in 9 other places (and there are a bunch of other errors too).
    Is anyone experiencing this problem? Is it an issue with .NET's
    implementation or in the stylesheet? Any clue about what could be
    wrong or how to fix it?

    Thanks in advance
    Julián



  • 2.  Re: [docbook-apps] Error in chunk-common.xsl ?

    Posted 05-23-2008 10:05
    Julian Hidalgo wrote:

    > Is anyone experiencing this problem? Is it an issue with .NET's
    > implementation or in the stylesheet? Any clue about what could be
    > wrong or how to fix it?

    Yes, this is known bug and divergence from XSLT recommendation in .NET
    XSLT processor. Ask Microsoft for fix. If they have enough request then
    they might to decide to really fix it.

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------