[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Using for-each w/ page-sequence results in "NC105

Subject: Re: Using for-each w/ page-sequence results in "NC105 ID already exists in this document" error
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 20 Sep 2007 15:54:44 +0200
Re:  Using for-each w/ page-sequence results in "NC105
Sharon_Harris@xxxxxxxxxxxxxxxxxxxx wrote:
I have all the page sequences contained within a template. I have 5 page
sequences within that template that apply to 5 different elements (cover,
disclaimer, toc, introduction, lessons). There are multiple instances of
the Lesson element but the Lesson page sequence does not start over for
each instance.

I have the page sequences contained within the following template.

<xsl:template match="/">
      <fo:root>
                  cover page sequence 1
                  disclaimer page sequence 2
                  toc page sequence 3
                  introduction page sequence 4
                  lessons page sequence 5 (contains <apply-templates
select="//Lesson" mode="Activity"/ in the Body flow>
      </fo:root>
</xsl:template>

Regarding analyzing the output, I do not get any including no output of a
fo document.

That is very weird. At the very least, you should have the fo:root element in your output, since you match the root of the input document, and any input document always has a root and matching starts with that one.



But you do not mention how this template actually looks and how the apply-templates look. Furthermore, you briefly mention select="//Lesson", which is an expensive operation and selects all Lesson elements at any depth in your document. It is usually far better to give a precise specification, or at least a depth specification, something like this: select="*/*/*/Lesson" if the Lesson elements are four levels (children)


More on //Lesson: are you sure that the input document does not contain any namespaces? Did you set your xpath-default-namespace to someting not matching the namespace in the source document? But still, these hints are usesless as long as you do not have *any* output at all. Please run a minimum stylesheet, with only the headers, and only one matching template for the root level of the input and see if you can get output. I.e, the following should output "Hello world":

<xsl:template match="/">Hello world</xsl:template>


Cheers, -- Abel Braaksma

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.