Re: [docbook-apps] WARNING: cannot add @xml:base to node set root element. Relative paths may not work.

From
Bob Stayton <>
Date
2013-05-14T16:01:41+00:00
ID
CAAA98F9247E47D891CF3268CB52DBDD@totoro
Thread
Re: [docbook-apps] WARNING: cannot add @xml:base to node set root element. Relative paths may not work.
Hi Lars,

You should get that message only when two conditions are 
met:

 

1.  You are processing a DocBook 5 document with the 
non-namespaced stylesheets.

         
or

    You are single-step profiling by using 
profile-docbook.xsl (probably your case).

 

and

 

2.  You are using xsltproc (which lacks an extension 
function to get the name of the current directory).

 

With either condition in (1), the document is preprocessed 
into an internal nodeset (a nodeset held in memory) before being processed by 
the stylesheets.  The internal nodeset loses all contact with the 
filesystem where the files originated, so the preprocessing template tries to 
add relative directory references into the internal nodeset by adding xml:base 
attributes to preserve the relative locations.  It uses an extension 
function to get the original base directory of the document, but xsltproc does 
not have a function to fetch that information, while Saxon and Xalan 
do.

 

So if you use modular doc and the modules are in various 
directories, that directory structure  information gets lost in the 
internal subset.  If your documents don't need such xml:base 
attributes, then it has no effect on your output.

 

You can avoid it by either using Saxon, or by using two-step 
profiling.

 

Bob Stayton
Sagehill Enterprises


From: Lars Vogel 

Sent: Tuesday, May 14, 2013 7:13 AM

To: DocBook Apps 

Subject: [docbook-apps] WARNING: cannot add @xml:base to node set 
root element. Relative paths may not work.

Hello, 

since a while I get the following warning during the transformation with 
the docbook distribution:

WARNING: cannot add @xml:base to node set root element.  Relative 
paths may not work.

I'm not sure what triggers this warning, a Google search resulted in hints 
about Docbook V5.0 but I'm still using Docbook 4.5.

I'm currently using the docbook-xsl-1.77.1 distribution and I think (but 
I'm not sure) that I have this warning since I upgraded from 1.76. The output 
looks ok to me, but this warning does not create a warm fussy feeling. ;-)

Any hint how to get rid of this warning? 

Best regards, Lars