This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Chunk transformation error
- From: Bob Stayton <bobs at sco dot com>
- To: Jeffery Biss <jeff at marco-inc dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Thu, 6 Nov 2003 10:37:35 -0800
- Subject: Re: [docbook-apps] Chunk transformation error
- References: <3FA9C8D0.9010401@marco-inc.com>
On Wed, Nov 05, 2003 at 10:06:40PM -0600, Jeffery Biss wrote:
> Hello All,
>
> I am trying to use the chunk style sheet and get this error message:
>
> "g:\docbook-xsl-1.62.4\html\chunk.xsl(0,0): The xsl:apply-imports
> instruction may only occur within an xsl:template instruction with a
> match attribute, and may not occur within an xsl:for-each instruction.
> Error occurred during compilation of included or imported stylesheet
> 'chunk-common.xsl'."
>
> Can anyone offer any advise or information so I can use chunk.xsl? I
> looked through the files and am not well versed enough to find the problem.
>
> I am using Wattle software's XMLWriter which uses the MSXML engine
> (currently 4.0 SP2). Their tech support told me the error message is
> generated by the MSXML engine.
Very interesting. It does appear that the stylesheet
is violating the XSLT spec, because it is using
xsl:apply-imports in a template that is called and
not matched (see the XSLT spec section 5.6).
I'd like to know why the other processors didn't flag
this as an error.
You could try copying the template named chunk-element-content
from html/chunk-common.xsl to your customization layer
and modifying the default value for the content parameter:
Change:
<xsl:template name="chunk-element-content">
<xsl:param name="prev"/>
<xsl:param name="next"/>
<xsl:param name="nav.context"/>
<xsl:param name="content">
<xsl:apply-imports/>
</xsl:param>
To:
<xsl:template name="chunk-element-content">
<xsl:param name="prev"/>
<xsl:param name="next"/>
<xsl:param name="nav.context"/>
<xsl:param name="content"/>
My reading of the stylesheets shows that, with one exception,
this template is always called with the content parameter
set, so making the default null should be no problem.
The one exception is in the separate chunktoc.xsl customization
that is used to manually chunk content.
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.