An anomaly in DocBook profiling came up on the Oxygen users mailing list, but it is actually a DocBook XSL issue, so I'm posting the problem and solution to the docbook-apps mailing list as well.

From: "Sorin Ristache" <[email protected]>
To: <[email protected]>
We did not use profile-docbook.xsl because it does not apply all the
profiling attribute values always correctly for complex DocBook
documents. We tested that version of profiling stylesheet on a complex
document and it allowed in the output some subsections which did not
have the profiling attribute value set as the profiling parameter of the
transformation. The profile.xsl stylesheet did not have this problem so
we used that in the Oxygen scenarios.

With Sorin's help, I tracked down the source of this problem, because it did not seem right to me that the profile-docbook.xsl stylesheet would produce a different profile from the profile.xsl stylesheet. It turns out to be an issue with customization of the DocBook HTML chunking stylesheet while profiling, and does not seem to be documented anywhere, so I'm posting the solution here for the record.

Because DocBook's chunking stylesheet relies on XSL import precedence to separate the chunking functions from the formatting functions, a customization of the chunking stylesheet requires a particular setup that imports and includes various DocBook XSL modules in a certain order. That process is described here:

http://www.sagehill.net/docbookxsl/ChunkingCustomization.html

To customize the chunking stylesheet for single-pass profiling, my book says to import "profile-docbook.xsl" instead of "docbook.xsl". But that is not sufficient for chunked output.

It is also necessary to replace the reference to "chunk-code.xsl" with "profile-chunk-code.xsl" in the customization file. The difference is that chunk-code.xsl matches on the original document nodeset, while profile-chunk-code.xsl matches on the profiled node set. If this substitution is not made, then the profiling won't work correctly for customized chunked output.

I'll add this information to the next edition of my book.

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Sorin Ristache" <[email protected]>
To: <[email protected]>
Sent: Monday, June 06, 2011 6:39 AM
Subject: Re: [oXygen-user] R: Additional XSLTstylesheet in docbooktransformation


Hello,

We did not use profile-docbook.xsl because it does not apply all the
profiling attribute values always correctly for complex DocBook
documents. We tested that version of profiling stylesheet on a complex
document and it allowed in the output some subsections which did not
have the profiling attribute value set as the profiling parameter of the
transformation. The profile.xsl stylesheet did not have this problem so
we used that in the Oxygen scenarios.


Regards,
Sorin


Jirka Kosek wrote:
On 6.6.2011 12:03, Adrian Buza wrote:


Oxygen 12.2 added out-of-the-box support for DocBook
profiling(conditional text) in the default transformation scenarios.
This means that in the default transformation scenarios two stylesheets
are applied to the original XML file: a generic profiling
stylesheet(${frameworks}/docbook/xsl/profiling/profile.xsl) and the
specific transformation stylesheet(e.g. PDF:
${frameworks}/docbook/xsl/fo/docbook_custom.xsl).


I'm just curious -- is there any reason why you haven't used
profile-docbook.xsl instead, which does profiling and actual
transformation in a single step?

Jirka
_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to