OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] Description/signal/properties links in html pages (generated using xsltproc) not working

Hi Vishnu,

On Dienstag, 5. Mai 2020 13:06:16 CEST Vishnu Motghare wrote:
> [...]
> Thanks for correcting me, I observed that docbook xml
> (docbook-net.Corp.MyApp.Frobber.xml) generated by gdbus-codegen has
> Docbook V4.1.2, So I change my-doc.xml accordingly.
> {{{
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
>                "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; [
> ]>
> }}}

Wait a minute. :) So you have a document which is DocBook 5.0 and the 
generated one which is DocBook 4. Is that right?

If the answer is yes, then you should avoid mixing both versions. Better 
transform the generated DocBook 4 document with another step into DocBook 5. 
Use the db5-upgrade.xsl stylesheet and apply it to the generated source. Get 
the stylesheet from here:


Another alternative would be to use DocBook 4.5. That probably depends on your 
use case which one is better suited.

Either way, the crucial point here is to be *consistent*! :-)

> [...]
> > Can you add it and see if that works? If that doesn't help, watch for any
> > error messages.
> I checked for error using xmlint , which throws following error ,
> which I fixed it & then tried above solution. It didn't  work
> {{{
> $ xmllint --noout --xinclude --postvalid --noent my-doc.xml
> my-doc.xml:9: element part: validity error : Element part content does
> not follow the DTD, expecting (beginpage? , partinfo? , (title ,
> subtitle? , titleabbrev?) , partintro? , (appendix | chapter | toc |
> lot | index | glossary | bibliography | article | preface | refentry |
> reference)+), got (partintro title refentry )
> Document my-doc.xml does not validate
> }}}

Well, that's probably the reason when mixing different versions. So better 
check the input.

> I checked the .html file generated by xsltproc & found that following
> code generated for shortcut  (description, signal ..)
> [...]

The stylesheets depend on a valid DocBook document (be it DocBook 4 or 5 
doesn't matter much). So you can stop here and go back to the original 

It's easy: Never transform a document which isn't valid. If the source isn't 
valid, you can't rely our output. There is this famous saying: Garbage in, 
garbage out. ;-)

Hope that gives you some ideas.

  Thomas Schraitle

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]