With DocBook XML, you are supposed to be able to create profiles to conditionalize text as documented in /usr/share/doc/docbook-style-xsl-<version>/doc/tools/profiling.html. However, of the three default profiling XSL stylesheets in /usr/share/sgml/docbook/xsl-stylesheets/html/ (all three start with profile-), only profile-chunk.xml works, and even it produces runtime errors. Sample command: xsltproc -stringparam "profile.arch" "x86-common;x86-base" /usr/share/sgml/docbook/xsl-stylesheets/html/profile-chunk.xsl sample.xml Summary: 1) profile-chunk.xml produces HTML files with proper conditionalization, but gives the following output: runtime error: file /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl line 239 element apply-templates xsltApplyOneTemplate: loop found ??? try increasing xsltMaxDepth (--maxdepth) Templates: #0 name * name head.keywords.content #1 name * name head.keywords.content #2 name * name head.keywords.content #3 name * name head.keywords.content #4 name * name head.keywords.content #5 name * name head.keywords.content #6 name * name head.keywords.content #7 name * name head.keywords.content #8 name * name head.keywords.content #9 name * name head.keywords.content #10 name * name head.keywords.content #11 name * name head.keywords.content #12 name * name head.keywords.content #13 name * name head.keywords.content #14 name * name head.keywords.content Variables: Writing ch01.html for chapter(ch-setup-sgml-catalog) runtime error: file /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl line 239 element apply-templates xsltApplyOneTemplate: loop found ??? try increasing xsltMaxDepth (--maxdepth) Templates: #0 name * name head.keywords.content #1 name * name head.keywords.content #2 name * name head.keywords.content #3 name * name head.keywords.content #4 name * name head.keywords.content #5 name * name head.keywords.content #6 name * name head.keywords.content #7 name * name head.keywords.content #8 name * name head.keywords.content #9 name * name head.keywords.content #10 name * name head.keywords.content #11 name * name head.keywords.content #12 name * name head.keywords.content #13 name * name head.keywords.content #14 name * name head.keywords.content Variables: Writing bk01.html for book(index) no result for sample.xml 2) profile-docbook.xsl produces no HTML files and gives: runtime error: file /usr/share/sgml/docbook/xsl-stylesheets/html/profile-docbook.xsl line 219 element apply-templates xsltApplyOneTemplate: loop found ??? try increasing xsltMaxDepth (--maxdepth) Templates: #0 name * name head.keywords.content #1 name * name head.keywords.content #2 name * name head.keywords.content #3 name * name head.keywords.content #4 name * name head.keywords.content #5 name * name head.keywords.content #6 name * name head.keywords.content #7 name * name head.keywords.content #8 name * name head.keywords.content #9 name * name head.keywords.content #10 name * name head.keywords.content #11 name * name head.keywords.content #12 name * name head.keywords.content #13 name * name head.keywords.content #14 name * name head.keywords.content Variables: no result for sample.xml 3) profile-onechunk.xsl produces HTML files thar are not properly conditionalized and gives: runtime error: file /usr/share/sgml/docbook/xsl-stylesheets/html/profile-docbook.xsl line 219 element apply-templates xsltApplyOneTemplate: loop found ??? try increasing xsltMaxDepth (--maxdepth) Templates: #0 name * name head.keywords.content #1 name * name head.keywords.content #2 name * name head.keywords.content #3 name * name head.keywords.content #4 name * name head.keywords.content #5 name * name head.keywords.content #6 name * name head.keywords.content #7 name * name head.keywords.content #8 name * name head.keywords.content #9 name * name head.keywords.content #10 name * name head.keywords.content #11 name * name head.keywords.content #12 name * name head.keywords.content #13 name * name head.keywords.content #14 name * name head.keywords.content Variables: no result for sample.xml [tfox@ijin profiling]$ ls sample.xml [tfox@ijin profiling]$ xsltproc -stringparam "profile.arch" "x86-common;x86-base" /usr/share/sgml/docbook/xsl-stylesheets/html/profile-onechunk.xsl sample.xml Writing index.html for book(index)
Created attachment 89841 [details] sample DocBook XML file with profiles
This seems to have been a problem with libxslt/libxml2; the current rawhide package behave okay.
With docbook-style-xsl-1.60.1-1, libxslt-1.0.30-2, and libxml2-2.5.7-2: 1) profile-docbook.xsl outputs correctly profiled HTML to stdout 2) profile-chunk.xsl outputs correctly profiled HTML in chunks 3) profile-onechunk.xsl produces HTML with all content instead of just the content I specified to include (and it produces a Next link even though the output is one page, but that is a different bug ;-) ) Looks like profile-onechunk.xsl is still broken.
Confirmed, and it's still broken in 1.61.0 upstream.
Reported upstream.
Tracked upstream as: https://sourceforge.net/tracker/index.php?func=detail&aid=736399&group_id=21935&atid=373747