Page 1 of 1

DocBook to DITA transformation error on encountering links with multiple underscores

Posted: Fri Jun 17, 2016 5:21 pm
by HelenaG-P
Hello,

When running the DocBook to DITA transformation scenario in Oxygen XML Editor 18, I've encountered the following error: "Too many nested apply-templates calls. The stylesheet may be looping." The full error:

Code: Select all

System ID: C:\Program Files (x86)\Oxygen XML Editor 18\frameworks\dita\DITA-OT\plugins\dbdita\db2dita\dbReader.xsl
Scenario: DocBook to DITA
XML file: C:\My\path\help.xml
XSL file: C:\Program Files (x86)\Oxygen XML Editor 18\frameworks\dita\DITA-OT\plugins\dbdita\db2dita\docbook2dita.xsl
Document type: DocBook 5
Engine name: Saxon-EE 9.6.0.7
Severity: fatal
Description: SXLM0001: Too many nested apply-templates calls. The stylesheet may be looping.
Start location: 2925:0
URL: http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXLM0001
I managed to track the problem down to links using underscores within the ID, for example:

Code: Select all

<link linkend="_traffic_filters">TRAFFIC window</link>
Does anyone know of a (relatively) easy way to fix this, possibly in the XSLT in the dbdita plugin?

Many thanks,
Helena

Re: DocBook to DITA transformation error on encountering links with multiple underscores

Posted: Tue Jun 21, 2016 1:54 pm
by Radu
Hi Helena,

The Docbook to DITA scenario is mostly oriented towards converting Docbook 4 documents. You seem to be converting a Docbook 5 document.
If you write us an email (support@oxygenxml.com) I could try to give you some fixes for the conversion stylesheet.

Also as a possible workaround you can publish the Docbook document to a single XHTML, open it in a web browser, select all, copy and then paste the content to a DITA topic opened in Oxygen in the Author visual editing mode. This should allow Oxygen to perform some dynamic conversion of the content to DITA.

Regards,
Radu

Re: DocBook to DITA transformation error on encountering links with multiple underscores

Posted: Tue Jun 21, 2016 4:55 pm
by HelenaG-P
Hi Radu,

Thank you for your quick reply! Indeed, Docbook 4 vs Docbook 5 was the problem. Adding the new namespace declarations and updating <ulink> to <link> and @id to @xml:id in dbReader.xsl seemed to have fixed the problem - valid DITA output is now generated, with correct, working links.

Many thanks and kind regards,
Helena

Re: DocBook to DITA transformation error on encountering links with multiple underscores

Posted: Wed Jun 22, 2016 7:58 am
by Radu
Hi Helena,

Oh, I see that you fixed this on your side :)
If you want to share you can send your XSLT changes to support@oxygenxml.com
I made similar changes (but not sure if they are identical with yours) on my side so that future users of the conversion process will no longer encounter similar problems.

Regards,
Radu

Re: DocBook to DITA transformation error on encountering links with multiple underscores

Posted: Wed Jun 22, 2016 12:00 pm
by HelenaG-P
Done :)

Regards,
Helena