error when using the <indexterm type=""> addition

I have the following document: <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="http://docbook.org/xml/5.1/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <?xml-stylesheet type="text/xsl" href="../xslt/fo/Falterbuechlein.xsl"?> <book xmlns="http://docbook.org/ns/docbook" xml:lang="de" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1"> <info> <title>Falter in Urseetal 2018</title> <subtitle/> <author> <personname> <surname>Kleine</surname> </personname> <address> <city>Lenzkirch</city> </address> <email>bernhard.kleine@gmx.net</email> </author> </info> <preface> <title>Vorwort</title> </preface> <chapter> <title>Tagfalter</title> <sect1 xml:id="Hesperiidae"> <title>Hesperiidae<indexterm type="science"><primary>Hesperiidae</primary></indexterm> — Dickkopffalter<indexterm> <primary>Dickkopffalter</primary></indexterm></title> <sect2> <title>Kleiner Würfeldickkopffalter</title><indexterm><primary>Kleiner Würfeldickkopffalter</primary></indexterm> <para> <emphasis role="bold">Pyrgus malvae</emphasis><indexterm type="science"><primary>Pyrgus malvae</primary></indexterm> </para> <para>Flugzeit: Mitte April bis Mitte Juli</para> </sect2> </sect1> </chapter> <index type="science"> <title>Wissenschaftliches Namesverzeichnis</title> </index> <index/> </book> Transforming this with FOP gives an error:
The process 'Apache FOP' ended with code: 1. The error was: ERROR - net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) ERROR - Exception org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source) at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source) at org.apache.fop.cli.Main.startFOP(Main.java:186) at org.apache.fop.cli.Main.main(Main.java:217) Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source) at net.sf.saxon.event.ContentHandlerProxy.startContent(Unknown Source) at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:213) at net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOutputter.java:721) at net.sf.saxon.event.ReceivingContentHandler.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:427) at net.sf.saxon.event.Sender.send(Sender.java:138) at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:383) ... 4 more Caused by: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58) at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:173) at com.sun.proxy.$Proxy4.idNotUnique(Unknown Source) at org.apache.fop.fo.FObj.checkId(FObj.java:202) at org.apache.fop.fo.FObj.startOfNode(FObj.java:183) at org.apache.fop.fo.flow.Block.startOfNode(Block.java:144) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:337) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179) ... 21 more
Commenting the lines <!-- <index type="science"> <title>Wissenschaftliches Namesverzeichnis</title> </index>--> gets rid of the error, but the scientific names are not separated in the index from the German ones. The construction is according to page 312 of Docbook XSLT by Bob Stayton. What did I wrong? Regards Bernhard -- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Hi Bernhard, Try setting the stylesheet parameter 'autolink.index.see' to zero. When that parameter is set to 1 (the default), then the stylesheet generates an id on each primary entry in the index so that any "see" entries can link to them. When you have multiple indexes that repeat terms (as in your case), then duplicate ids are generated and FOP fails. This is a known bug and should be fixed in the next release of the stylesheets. In the meantime, set that parameter to zero and forego the automatic linking of "see" entries in your index. Bob Stayton Sagehill Enterprises bobs@sagehill.net On 8/6/2018 6:04 AM, Bernhard Kleine wrote:
I have the following document:
<?xml version="1.0" encoding="UTF-8"?> <?xml-model href="http://docbook.org/xml/5.1/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <?xml-stylesheet type="text/xsl" href="../xslt/fo/Falterbuechlein.xsl"?> <book xmlns="http://docbook.org/ns/docbook" xml:lang="de" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1"> <info> <title>Falter in Urseetal 2018</title> <subtitle/> <author> <personname> <surname>Kleine</surname> </personname>
<address> <city>Lenzkirch</city> </address> <email>bernhard.kleine@gmx.net</email> </author> </info> <preface> <title>Vorwort</title>
</preface> <chapter> <title>Tagfalter</title> <sect1 xml:id="Hesperiidae"> <title>Hesperiidae<indexterm type="science"><primary>Hesperiidae</primary></indexterm> — Dickkopffalter<indexterm> <primary>Dickkopffalter</primary></indexterm></title> <sect2> <title>Kleiner Würfeldickkopffalter</title><indexterm><primary>Kleiner Würfeldickkopffalter</primary></indexterm> <para> <emphasis role="bold">Pyrgus malvae</emphasis><indexterm type="science"><primary>Pyrgus malvae</primary></indexterm> </para> <para>Flugzeit: Mitte April bis Mitte Juli</para> </sect2> </sect1> </chapter> <index type="science"> <title>Wissenschaftliches Namesverzeichnis</title> </index> <index/>
</book>
Transforming this with FOP gives an error:
The process 'Apache FOP' ended with code: 1. The error was: ERROR - net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) ERROR - Exception org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source) at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source) at org.apache.fop.cli.Main.startFOP(Main.java:186) at org.apache.fop.cli.Main.main(Main.java:217) Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(Unknown Source) at net.sf.saxon.event.ContentHandlerProxy.startContent(Unknown Source) at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:213) at net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOutputter.java:721) at net.sf.saxon.event.ReceivingContentHandler.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:427) at net.sf.saxon.event.Sender.send(Sender.java:138) at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:383) ... 4 more Caused by: org.apache.fop.fo.ValidationException: Property ID "ientry-d5e19" (found on "fo:block") previously used; ID values must be unique within a document! (Siehe Position 3:20133) at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58) at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:173) at com.sun.proxy.$Proxy4.idNotUnique(Unknown Source) at org.apache.fop.fo.FObj.checkId(FObj.java:202) at org.apache.fop.fo.FObj.startOfNode(FObj.java:183) at org.apache.fop.fo.flow.Block.startOfNode(Block.java:144) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:337) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179) ... 21 more
Commenting the lines
<!-- <index type="science"> <title>Wissenschaftliches Namesverzeichnis</title> </index>-->
gets rid of the error, but the scientific names are not separated in the index from the German ones. The construction is according to page 312 of Docbook XSLT by Bob Stayton. What did I wrong?
Regards
Bernhard
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com,www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Am 06.08.2018 um 19:51 schrieb Bob Stayton:
Hi Bernhard,
Try setting the stylesheet parameter 'autolink.index.see' to zero.
When that parameter is set to 1 (the default), then the stylesheet generates an id on each primary entry in the index so that any "see" entries can link to them. When you have multiple indexes that repeat terms (as in your case), then duplicate ids are generated and FOP fails. This is a known bug and should be fixed in the next release of the stylesheets. In the meantime, set that parameter to zero and forego the automatic linking of "see" entries in your index.
Bob Stayton Sagehill Enterprises bobs@sagehill.net
Dear Bob, that actually gives a tranformation. However, the type=science index is the same as the non-typed one. Very strange! btw Did you see the other question about page-breaks? I will be eager to change anything you propose. Regards Bernhard -- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Ah, yes, I forgot that there are other issues with selection of indexterms when customized indexes are used. The issues are known and are being worked on, but there is no solution released yet. The next release of the stylesheets should work properly, but I don't have a date for that yet. I don't recall the issue about page breaks. Bob Stayton Sagehill Enterprises bobs@sagehill.net On 8/6/2018 11:12 AM, Bernhard Kleine wrote:
Am 06.08.2018 um 19:51 schrieb Bob Stayton:
Hi Bernhard,
Try setting the stylesheet parameter 'autolink.index.see' to zero.
When that parameter is set to 1 (the default), then the stylesheet generates an id on each primary entry in the index so that any "see" entries can link to them. When you have multiple indexes that repeat terms (as in your case), then duplicate ids are generated and FOP fails. This is a known bug and should be fixed in the next release of the stylesheets. In the meantime, set that parameter to zero and forego the automatic linking of "see" entries in your index.
Bob Stayton Sagehill Enterprises bobs@sagehill.net
Dear Bob, that actually gives a tranformation. However, the type=science index is the same as the non-typed one. Very strange!
btw Did you see the other question about page-breaks?
I will be eager to change anything you propose.
Regards Bernhard -- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com,www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (2)
-
Bernhard Kleine
-
Bob Stayton