List Info

Thread: Stripping namespace from DocBook 5 document




Stripping namespace from DocBook 5 document
user name
2007-07-19 14:30:08
When I "compile" my DocBook file from within
emacs's nxml mode:

    -*- mode: compilation; default-directory:
"~/public_html--Hayek.name/" -*-
    Compilation started at Thu Jul 19 20:58:29

    make -k html
    env XML_CATALOG_FILES=/etc/xml/catalog 
        xsltproc 
            --output book.html 
            _xsl/html--docbook.xsl 
            book.xml
    Stripping namespace from DocBook 5 document.
    WARNING: cannot add xml:base to node set root
element.  Relative paths may not work.
    Processing stripped document.

    Compilation finished at Thu Jul 19 20:58:31

I'm getting a few strange messages:

    Stripping namespace from DocBook 5 document.
    WARNING: cannot add xml:base to node set root
element.  Relative paths may not work.
    Processing stripped document.

This is how my document starts:

    <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook
XML 5.0CR4//EN" "http://www.oasis-open.org/docbook/xml/5.0CR4/d
td/docbook.dtd" >

    <article version="5.0"
class="techreport" xmlns="http://docbook.or
g/ns/docbook" xmlnsl=&qu
ot;http://www.w3.
org/1999/xlink">

I am sure I did not get those messages, when I used DocBook
4.5,
only when I migrated to DocBook 5, I introduced "that
namespace stuff"
and I started getting these messages.

Maybe I haven't gotten it entirely right ...


How serious shall I take those 3 messages?
And what impact do they really have?
Can I get rid of a few of them?

I mean, I only introduced "that namespace stuff",
so that nxml mode wouldn't mourn at me
and so that the document complies to what I found at

    http://www.oasis-open.org/docbook/specs/doc
book-5.0b6-spec-wd-01.html

which looks to me (according to http://www.o
asis-open.org/docbook/specs/)
like the latest document on DocBook 5.

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Stripping namespace from DocBook 5 document
user name
2007-07-22 14:48:15
Hi,
Those messages are expected, given your setup.  In DocBook5,
elements are 
in the docbook namespace, as you specified in your document
root element. 
The original XSL stylesheets are not written for elements in
that 
namespace.  When the stylesheet detects a root element in
the docbook 
namespace, it first builds a copy of the document in memory
while stripping 
the namespace from the elements.  Then it processes the
copy.

If you want to eliminate that message, then process with the
docbook-xsl-ns 
(namespace-aware) version of the stylesheets.  That is in a
separate 
download on the SourceForge site.  In general, I would
recommend that set 
for processing DocBook5 documents.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: <Jochen+oasis-openHayek.name>
To: <docbook-appslists.oasis-open.org>
Sent: Thursday, July 19, 2007 12:30 PM
Subject: [docbook-apps] Stripping namespace from DocBook 5
document


> When I "compile" my DocBook file from within
emacs's nxml mode:
>
>    -*- mode: compilation; default-directory: 
> "~/public_html--Hayek.name/" -*-
>    Compilation started at Thu Jul 19 20:58:29
>
>    make -k html
>    env XML_CATALOG_FILES=/etc/xml/catalog 
>        xsltproc 
>            --output book.html 
>            _xsl/html--docbook.xsl 
>            book.xml
>    Stripping namespace from DocBook 5 document.
>    WARNING: cannot add xml:base to node set root
element.  Relative 
> paths may not work.
>    Processing stripped document.
>
>    Compilation finished at Thu Jul 19 20:58:31
>
> I'm getting a few strange messages:
>
>    Stripping namespace from DocBook 5 document.
>    WARNING: cannot add xml:base to node set root
element.  Relative 
> paths may not work.
>    Processing stripped document.
>
> This is how my document starts:
>
>    <!DOCTYPE article PUBLIC "-//OASIS//DTD
DocBook XML 5.0CR4//EN" 
> "http://www.oasis-open.org/docbook/xml/5.0CR4/d
td/docbook.dtd" >
>
>    <article version="5.0"
class="techreport" 
> xmlns="http://docbook.or
g/ns/docbook" 
> xmlnsl=&qu
ot;http://www.w3.
org/1999/xlink">
>
> I am sure I did not get those messages, when I used
DocBook 4.5,
> only when I migrated to DocBook 5, I introduced
"that namespace stuff"
> and I started getting these messages.
>
> Maybe I haven't gotten it entirely right ...
>
>
> How serious shall I take those 3 messages?
> And what impact do they really have?
> Can I get rid of a few of them?
>
> I mean, I only introduced "that namespace
stuff", so that nxml mode 
> wouldn't mourn at me
> and so that the document complies to what I found at
>
>    http://www.oasis-open.org/docbook/specs/doc
book-5.0b6-spec-wd-01.html
>
> which looks to me (according to http://www.o
asis-open.org/docbook/specs/)
> like the latest document on DocBook 5.
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
>
>
> 



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Stripping namespace from DocBook 5 document
user name
2007-07-23 05:37:30
Jochen+oasis-openHayek.name, 2007-07-19 21:30 +0200:

> I'm getting a few strange messages:
> 
>     Stripping namespace from DocBook 5 document.
>     WARNING: cannot add xml:base to node set root
element.  Relative paths may not work.
>     Processing stripped document.
[...]
> How serious shall I take those 3 messages?
> And what impact do they really have?

As Bob has pointed out, the "Stripping..." and
"Processing..."
messages are informative messages that indicate normal,
expected
behavior. So you can effectively ignore them.

The message about the xml:base issue is a warning. I think
it
indicates that if you have used relative paths (to images
or
whatever), they may not work as expected. But it's not an
outright
error.

> Can I get rid of a few of them?

(Also as Bob has pointed out), If you're working with
namespaced
(DocBook 5) documents, you should probably use the
docbook-xsl-ns
stylesheets. The latest releases versions of those are
here:

  http://docb
ook.sf.net/files/xsl-ns/latest

-- 
Michael(tm) Smith
http://people.w3.org/mike/

http://sideshowbarker.net/

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )