Subject: Re: [xsl] Trying to use fo:page-number-citation to set the initial-page-number of the next page-sequence From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 08 Jun 2012 21:21:50 -0400 |
At 2012-06-08 17:43 -0700, Underwood Michelle wrote:XSL version: 1 Vendor: Microsoft Vendor URL: http://www.microsoft.com
My question is: what will make this work, if anything?
Error: Unable to create a channel process for the channel 'Print'(2)
Nested Error: ... [4001] Failed to generate main XSL file used in Channel Assembly.
Nested Error: [4001] Failed to parse layout
Xsl:when is not allowed in this position in the stylesheet!
[4025]Filed to parse layout
Xsl:when is not allowed in this position in the stylesheet!
(And it repeats these last lines.)
Reviewing your code fragment, I'm led to believe the problem is elsewhere. I interpret the error message to be that <xsl:when> is being used not as a child of <xsl:choose>. In your code fragment, <xsl:choose> is the parent of both <xsl:when> instructions.
I grant the error message from the processor is not helping you find *which* statement is in error, but I suggest you find each <xsl:when> and check that its parent is <xsl:choose>.
Or just run this stylesheet on your stylesheet fragments to determine which fragments have the problem:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:value-of select="count(//xsl:when[not(parent::xsl:choose)])"/> </xsl:template> </xsl:stylesheet>
But you may have cut up your stylesheet inappropriately in trying to determine the fault ... I note this bizarre sequence in your fragment:
<xsl:attribute name="initial-page-number">
<xsl:value-of select="'fo:page-number-citation ref-id='TH_BlankPage' xmlns:fo='http://www.w3.org/1999/XSL/Format''"/>
</xsl:attribute>
Unrelated to your question, for performance reasons on some processors you might wish to review your use of "//" in the following:
<xsl:apply-templates select="//region[@name='ResponseFooter']" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />
...
<xsl:apply-templates select="//region[@name='ResponseBody']" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />
I hope you find this helpful.
. . . . . . . . Ken
-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Trying to use fo:page-num, G. Ken Holman | Thread | [xsl] analyze-string help?, Dan Vint |
Re: [xsl] Trying to use fo:page-num, G. Ken Holman | Date | [xsl] analyze-string help?, Dan Vint |
Month |