Subject: Re: [xsl] Using for-each w/ page-sequence results in "NC105 ID already exists in this document" error From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 19 Sep 2007 17:35:17 -0400 |
I am unable to generate a PDF file using a for-each loop before a page sequence if I am using IDs.I am using XSLT 1.0 and Apache FOP.
I have a couple of page sequences defined. In 1 page sequence, I have a TOC with IDs that point to elements that are outputted in a 2nd page sequence.
The 2nd page sequence is for Lessons and starts with a for-each loop calling a Lesson element that will output all the lesson content within the body of the Lesson page sequence. However, I encounter the following error: "NC105 ID already exists in this document".
I have unique ID prefixes specified in all Lesson children elements that are to be listed in the TOC so I am unsure why the IDs are repeated for each instance of the Lesson element.
I have tried creating the Lesson page sequence without using a for-each loop and merely using <apply-templates select="//Lesson" mode="activity">
and this outputs fine except that the page sequence instructions do not repeat for every instance of the Lesson element. For example, I specify that the 1st page of each lesson should not have a header but only the 1st instance of the Lesson element has no header displaying but all other Lesson element instances have a header on the 1st page. But I do not run into the issue that the IDs are not unique for each instance of a Lesson element.
Am I correct in thinking that in order to get the page sequence to start over for each instance of the Lesson element, that I need to have a for-each statement before the page sequence?
If so, how do I ensure the IDs are unique for every instance of the Lesson element?
-- Upcoming public training: UBL and code lists Oct 1/5; Madrid Spain World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using for-each w/ page-se, Wendell Piez | Thread | Re: [xsl] Using for-each w/ page-se, Sharon_Harris |
Re: [xsl] Using for-each w/ page-se, Wendell Piez | Date | [xsl] Jscript in XSL, Vankadaru.Gupta |
Month |