Re: [xsl] Using for-each w/ page-sequence results in "NC105 ID already exists in this document" error

Subject: Re: [xsl] Using for-each w/ page-sequence results in "NC105 ID already exists in this document" error
From: Abel Braaksma <>
Date: Thu, 20 Sep 2007 15:54:44 +0200
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="/">
                  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>

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