Subject: Re: [xsl] Check for duplicate @id's - collection() From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 19 Jul 2008 11:44:44 -0400 |
I have a project were I take about 800 files and transform them into one .fo document (create a pdf). The files are authored independent of each other (stand alone) which are validated against a schema (independently). If there is a duplicate @id attribute, the validator will tell me. However, the @ids need to be unique across all files processed by the collection function. If they are not, my resulting .fo will have duplicate @ids, which cause FOP to halt.
Assuming the current node is the element with the @id attribute, the unique anchor in the FO tree is created using something along the lines of:
Assuming you are at the element that is making the reference with @idref and you have a DTD declaration for the ID property of the target element, the link is created using:
... or you can just move your context to the element with the @id attribute and do:
I am looking for a way to (query or xslt 2.0) to check for duplicate @id's values across all files with the collection function. This would be a pre-production check.
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 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 Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Check for duplicate @id', Philip Vallone | Thread | RE: [xsl] Check for duplicate @id', Philip Vallone |
RE: [xsl] Check for duplicate @id', Michael Kay | Date | RE: [xsl] Check for duplicate @id', Philip Vallone |
Month |