Richard Hamilton | 1 Jun 2012 03:24
Favicon
Gravatar

Re: toc customization question

Tim,

I'm not 100% sure what you're trying to do, but it looks like you're trying to control what levels in the
structure get TOCs. This is controlled through a parameter called generate.toc, and you shouldn't need
to customize any templates to assign TOCs at various levels in the structure.

You can find a description of how to set generate.toc in Bob Stayton's book. Here is a link to the pertinent section:

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

If I'm missing something, and you need to do something more, you will find a complete description of TOC
customization in that same section.

I hope that helps.

Best Regards,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton <at> xmlpress.net

On May 31, 2012, at 1:42 PM, Tim Arnold wrote:

> hi, I have one particular section in which I would like to omit the
> table of contents.
> I want the section to appear in the chapter table of contents, just
> not have a toc generated on this section.
> 
(Continue reading)

Bob Stayton | 1 Jun 2012 05:28

Re: New namespacing in DocBook XSL 1.77.0 titlepage customization for FO causing problems

This problem with template/titlepage.xsl is fixed in the latest snapshot build, so you 
no longer need to set the $ns param for fo stylesheet customizations.  If you use it 
for xhtml, you still do.

Bob Stayton
Sagehill Enterprises
bobs <at> sagehill.net

----- Original Message ----- 
From: "Dermot O'Halloran" <dermot.ohalloran <at> gmail.com>
To: <docbook-apps <at> lists.oasis-open.org>
Sent: Thursday, May 31, 2012 4:23 AM
Subject: [docbook-apps] New namespacing in DocBook XSL 1.77.0 titlepage customization 
for FO causing problems

>
> Hi,
>
> The titlepage spec file I use for FO output no longer works in DocBook XSL
> 1.77.0. The first two pages in the resulting PDF (i.e. the title page and
> copyright page) appear blank. From what I can see, the only relevant change
> is in the template/titlepage.xsl stylesheet which now uses the fo namespace.
> So even if I just have a spec file containing the following line I'll get
> the blank pages:
>
> <t:titlepage t:element="book" t:wrapper="fo:block"/>
>
> Any ideas?
>
> Rgds, Dermot
(Continue reading)

David Cramer | 1 Jun 2012 06:44
Gravatar

Re: Missing Xerces Classpath definition in DocBook XSL 1.77.0 Webhelp Sample


Hi Dermot,
You do need to point to xercesImpl but you need to do that in the
build.properties file:

# Modify the follosing so that they point to your local
# copy of the jars indicated:
# * Saxon 6.5 jar
# * Xerces 2: xercesImpl.jar
# * xml-commons: xml-apis.jar
xslt-processor-classpath=/usr/share/java/saxon-6.5.5.jar
xercesImpl.jar=/usr/share/java/xercesImpl.jar
xml-apis.jar=/usr/share/java/xml-apis.jar

The xincludes are then resolved at the profiling stage:

...
<xslt
 in="${input-xml}"
 out="${xincluded-profiled.xml}"
 style="../profiling/profile.xsl">
 <sysproperty
key="org.apache.xerces.xni.parser.XMLParserConfiguratio		
value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
...

Note that <sysproperty> is an ant 1.8.x feature, so be sure you're
using the correct version of ant.

It's important that the xincludes be resolved during the profiling
(Continue reading)

Frank Arensmeier | 1 Jun 2012 09:35
Picon

docbook stylesheets 1.77.0 - webhelp

Dear all.

Yesterday I tried to build webhelp from the new stylesheets 1.77.0 There seems to be a bug in the file
"build.xml". Around line 30 it says:

[...]
<target name="chunk" depends="clean">

        <mkdir dir="${output-dir}"/>
        <tempfile destdir="${output-dir}" deleteonexit="true" property="xincluded-profiled.xml"/>
        <tempfile destdir="${output-dir}" deleteonexit="true" property="dummy.html"/>
        <xslt
          in="${input-xml}"
            out="${xincluded-profiled.xml}"
            style="../profiling/profile.xsl">
[...]

Notice the relative path "../profiling/profile.xsl". This causes an error if the custom build file is not
in the same directory as the build file from the source distribution. Changing that attribute to
something like "${extensions.dir}/../profiling/profile.xsl" worked for me.

/frank
Kasun Gajasinghe | 1 Jun 2012 10:23
Picon
Gravatar

Re: docbook stylesheets 1.77.0 - webhelp

Hi Frank,


Thanks for reporting this. We noticed this, and have already added a fix. It will be available in 1.77.1 release. While your fix works, we added it like the following way.

${ant.file.dir}/../profiling/profile.xsl

--Kasun

On Fri, Jun 1, 2012 at 1:05 PM, Frank Arensmeier <farensmeier <at> gmail.com> wrote:
Dear all.

Yesterday I tried to build webhelp from the new stylesheets 1.77.0 There seems to be a bug in the file "build.xml". Around line 30 it says:

[...]
<target name="chunk" depends="clean">

       <mkdir dir="${output-dir}"/>
       <tempfile destdir="${output-dir}" deleteonexit="true" property="xincluded-profiled.xml"/>
       <tempfile destdir="${output-dir}" deleteonexit="true" property="dummy.html"/>
       <xslt
         in="${input-xml}"
           out="${xincluded-profiled.xml}"
           style="../profiling/profile.xsl">
[...]

Notice the relative path "../profiling/profile.xsl". This causes an error if the custom build file is not in the same directory as the build file from the source distribution. Changing that attribute to something like "${extensions.dir}/../profiling/profile.xsl" worked for me.

/frank
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org




--
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe
Software Engineer; WSO2 Inc.; http://wso2.com,

Stefan Hinz | 1 Jun 2012 11:28
Picon
Favicon

1.77.0 bug with index building?

We're building customized XHTML output for OTN (Oracle Technology 
Network), for many books. Using the 1.76.1 style sheets, all works fine, 
but switching to the 1.77.0 style sheets gives an error like this:

XML_CATALOG_FILES="../../../mysqldoc-toolset//catalog.xml 
../../../mysqldoc-toolset/xsl.d/docbook-xsl-1.77.0/catalog.xml" xsltproc 
--xinclude --novalid  \
         --stringparam l10n.gentext.default.language en \
         --stringparam html.stylesheet "mysql-html.css" \
         --stringparam generate.toc "book toc,title" \
         --param chunk.section.depth 1 \
         --output user.xhtml-otn-tmp/ \
         ../../../mysqldoc-toolset/xsl.d/mysql-xhtml-otn.xsl \
         user-prepped.xml
../../../mysqldoc-toolset/tools/add-index-navlinks.pl 
user.xhtml-otn-tmp/*.html
Cannot find top of index 0, file user.xhtml-otn-tmp/ix01.html
make: *** [user.xhtml-otn] Fehler 25 (German for "error 25")

This is reproducible for all our books. It might not be a bug in the 
1.77.0 style sheets, but rather something in our customization layer 
that must be adapted to work with the new style sheets. However, I'm at 
a loss how to start debugging this.

Any pointers appreciated, and of course I can provide our customized 
xhtml-otn style sheet if necessary to track down the problem.

--

-- 
Cheers,

Stefan Hinz <stefan.hinz <at> oracle.com>, MySQL Documentation Manager

Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc

ORACLE Deutschland B.V.&  Co. KG
Registered Office: Riesstr. 25, 80992 Muenchen, Germany
Commercial Register: Local Court Of Munich, HRA 95603
Managing Director: Jürgen Kunz

General Partner: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher
Thomas Schraitle | 1 Jun 2012 13:25
Picon

Re: 1.77.0 bug with index building?

Hi Stefan,

On Fri, 01 Jun 2012 11:28:12 +0200
Stefan Hinz <stefan.hinz <at> oracle.com> wrote:

> We're building customized XHTML output for OTN (Oracle Technology 
> Network), for many books. Using the 1.76.1 style sheets, all works
> fine, but switching to the 1.77.0 style sheets gives an error like
> this:
> 
> XML_CATALOG_FILES="../../../mysqldoc-toolset//catalog.xml 
> ../../../mysqldoc-toolset/xsl.d/docbook-xsl-1.77.0/catalog.xml"
> xsltproc --xinclude --novalid  \
>          --stringparam l10n.gentext.default.language en \
>          --stringparam html.stylesheet "mysql-html.css" \
>          --stringparam generate.toc "book toc,title" \
>          --param chunk.section.depth 1 \
>          --output user.xhtml-otn-tmp/ \
>          ../../../mysqldoc-toolset/xsl.d/mysql-xhtml-otn.xsl \
>          user-prepped.xml
> ../../../mysqldoc-toolset/tools/add-index-navlinks.pl 
> user.xhtml-otn-tmp/*.html
> Cannot find top of index 0, file user.xhtml-otn-tmp/ix01.html
> make: *** [user.xhtml-otn] Fehler 25 (German for "error 25")

I've searched for the string "Cannot find top" in the stylesheets and
couldn't find it. I even grepped the complete SVN repository with the
same result. So I guess it might be somewhere in your Makefiles or Perl
scripts.

To debug it further, grep/search for this string in your build
mechanics. Maybe you can locate it there. Another option could be to
try remake[1] instead of make. It's an "improved error reporting,
tracing, and a debugger for make". Frank, my colleague, uses it to
debug his Makefiles. The output is a bit... challenging to read, but it
could give you some important hints.

Hope this helps. :)

-----
[1] http://bashdb.sourceforge.net/remake/

--

-- 
Gruß/Regards,
    Thomas Schraitle
Tim Arnold | 1 Jun 2012 15:18
Picon
Gravatar

Re: toc customization question

Hi Dick,
Thanks, I have been reading that section, but it's not that I want to
control the toc on every section, just one section that has a
particular attribute. My question wasn't clear that I do want section
tocs, just not for this particular section.

As far as I can tell, I can't put selectors in the generate.toc
parameter. Here is what I have:
<xsl:param name="generate.toc">book toc
    part toc
    preface toc
    chapter toc
    appendix toc
    section toc
  </xsl:param>

And if it were possible I would do this:
<xsl:param name="generate.toc">book toc
    part toc
    preface toc
    chapter toc
    appendix toc
    section[not( <at> userlevel='syntax')] toc
  </xsl:param>

so that all sections except that particular one gets the toc
generated. That's the reason for my attempt to override the template
for that section with mode='toc' (in my previous message).

I don't understand why my override template is not having an effect.
thanks,
--Tim

On Thu, May 31, 2012 at 9:24 PM, Richard Hamilton <hamilton <at> xmlpress.net> wrote:
> Tim,
>
> I'm not 100% sure what you're trying to do, but it looks like you're trying to control what levels in the
structure get TOCs. This is controlled through a parameter called generate.toc, and you shouldn't need
to customize any templates to assign TOCs at various levels in the structure.
>
> You can find a description of how to set generate.toc in Bob Stayton's book. Here is a link to the pertinent section:
>
> http://www.sagehill.net/docbookxsl/TOCcontrol.html
>
> If I'm missing something, and you need to do something more, you will find a complete description of TOC
customization in that same section.
>
> I hope that helps.
>
> Best Regards,
> Dick Hamilton
> -------
> XML Press
> XML for Technical Communicators
> http://xmlpress.net
> hamilton <at> xmlpress.net
>
>
>
> On May 31, 2012, at 1:42 PM, Tim Arnold wrote:
>
>> hi, I have one particular section in which I would like to omit the
>> table of contents.
>> I want the section to appear in the chapter table of contents, just
>> not have a toc generated on this section.
>>
>> The section has the attribute userlevel='syntax'. I tried the
>> following template but it had no effect I could see (the toc showed up
>> on the section). I thought it would not generate the toc in the
>> specified section and produce a single level toc for chapters (i.e. a
>> toc of the top-level sections in the chapter):
>>
>> <xsl:template match="d:section[ <at> userlevel='syntax']" mode="toc">
>>    <xsl:param name="toc-context" select="." />
>>    <xsl:if test="local-name($toc-context) = 'chapter'">
>>      <xsl:call-template name="subtoc">
>>        <xsl:with-param name="toc-context" select="$toc-context"/>
>>        <xsl:with-param name="nodes" select="foo"/>
>>      </xsl:call-template>
>>    </xsl:if>
>>  </xsl:template>
>>
>> How can I omit the toc for section[ <at> userlevel='syntax'] and still have
>> the section listed in the chapter toc?
>>
>> thanks,
>> --Tim
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
>> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
>>
>
Stefan Seefeld | 1 Jun 2012 15:34

Re: toc customization question

On 06/01/2012 09:18 AM, Tim Arnold wrote:
> Hi Dick,
> Thanks, I have been reading that section, but it's not that I want to
> control the toc on every section, just one section that has a
> particular attribute. My question wasn't clear that I do want section
> tocs, just not for this particular section.

Allow me to jump in with a somewhat related request:

I have run into other situations where I'd like to be able to control
ToC generation explicitly. For example: In DocBook Slides, I'd like to
generate a ToC for each foilgroup (and highlight the current position).
So far I have done this by customizing the appropriate xsl templates.
However, I think it would be very convenient for authors to be able to
explicitly request a toc at a given place, for example using a "<toc>"
element, akin to "<index>". (This could be further tuned by adding
attributes to indicate whether this should be a toc for the local
subtree, or a global one.)

Does this sound reasonable ? I will cross-post this to the docbook list,
too, as it is essentially a request for the DB grammar itself.

Thanks,
        Stefan

--

-- 

      ...ich hab' noch einen Koffer in Berlin...
Stefan Hinz | 1 Jun 2012 15:46
Picon
Favicon

Re: 1.77.0 bug with index building?

Hallo Thomas,

Good catch, thanks a lot!

In fact, the "cannot find top" string comes from one of our Perl (!) 
scripts that analyzes index terms to create an index navigation bar for 
long indexes, like the one you can see on 
http://dev.mysql.com/doc/refman/5.5/en/ix01.html.

Not sure why the script works flawlessly with the 1.76.1 style sheets 
but dies with the 1.77.0 ones, but this should be fairly easy to find 
out. If our findings yield anything of general interest, I'll post it to 
this list. Of course, I'll also do so in case this still turns out to be 
a 1.77.0 bug.

Again, thanks much for your reply, and schönes Wochenende!

Cheers,

Stefan

On 01.06.2012 13:25, Thomas Schraitle wrote:
> Hi Stefan,
>
> On Fri, 01 Jun 2012 11:28:12 +0200
> Stefan Hinz<stefan.hinz <at> oracle.com>  wrote:
>
>> We're building customized XHTML output for OTN (Oracle Technology
>> Network), for many books. Using the 1.76.1 style sheets, all works
>> fine, but switching to the 1.77.0 style sheets gives an error like
>> this:
>>
>> XML_CATALOG_FILES="../../../mysqldoc-toolset//catalog.xml
>> ../../../mysqldoc-toolset/xsl.d/docbook-xsl-1.77.0/catalog.xml"
>> xsltproc --xinclude --novalid  \
>>           --stringparam l10n.gentext.default.language en \
>>           --stringparam html.stylesheet "mysql-html.css" \
>>           --stringparam generate.toc "book toc,title" \
>>           --param chunk.section.depth 1 \
>>           --output user.xhtml-otn-tmp/ \
>>           ../../../mysqldoc-toolset/xsl.d/mysql-xhtml-otn.xsl \
>>           user-prepped.xml
>> ../../../mysqldoc-toolset/tools/add-index-navlinks.pl
>> user.xhtml-otn-tmp/*.html
>> Cannot find top of index 0, file user.xhtml-otn-tmp/ix01.html
>> make: *** [user.xhtml-otn] Fehler 25 (German for "error 25")
>
> I've searched for the string "Cannot find top" in the stylesheets and
> couldn't find it. I even grepped the complete SVN repository with the
> same result. So I guess it might be somewhere in your Makefiles or Perl
> scripts.
>
> To debug it further, grep/search for this string in your build
> mechanics. Maybe you can locate it there. Another option could be to
> try remake[1] instead of make. It's an "improved error reporting,
> tracing, and a debugger for make". Frank, my colleague, uses it to
> debug his Makefiles. The output is a bit... challenging to read, but it
> could give you some important hints.
>
> Hope this helps. :)
>
>
> -----
> [1] http://bashdb.sourceforge.net/remake/
>

--

-- 
Cheers,

Stefan Hinz <stefan.hinz <at> oracle.com>, MySQL Documentation Manager

Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc

ORACLE Deutschland B.V.&  Co. KG
Registered Office: Riesstr. 25, 80992 Muenchen, Germany
Commercial Register: Local Court Of Munich, HRA 95603
Managing Director: Jürgen Kunz

General Partner: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher

Gmane