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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] DocBook assembly processing: "no namespace bound to prefix d" + 'info' element contents ignored


Hi Graeme,
Actually, you could also get those error messages if you process an assembly using the default namespace syntax but with the non-namespaced version of the DocBook XSL. That is more likely what has happened here. Since assembly is a DocBook 5 construct, you should use the *ns* version of the stylesheets.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

--------------------------------------------------
From: "Bob Stayton" <bobs@sagehill.net>
Sent: Wednesday, June 12, 2013 8:25 AM
To: <graeme@heliocentrik.net>; <docbook-apps@lists.oasis-open.org>
Subject: Re: [docbook-apps] DocBook assembly processing: "no namespace bound to prefix d" + 'info' element contents ignored

I'm not completely clear on what your file looks like, but if you are using a d: prefix on your elements, it must be declared as a namespace prefix or any XML parser will flag it as an error.

DocBook assembly elements, as part of DocBook 5, are expected to be in the DocBook namespace. You can do that with or without a namespace prefix, using either:

<assembly xmlns="http://docbook.org/ns/docbook";>

or

<d:assembly xmlns:d="http://docbook.org/ns/docbook";>

The first defines the default namespace for all elements to be DocBook, while the latter uses a prefix. Most people prefer the first version so they don't need to remember to add the prefix to every element.

(However, in XSL stylesheets, the match attributes *must* use the prefix syntax, as the default namespace in a stylesheet defines the output.)

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

--------------------------------------------------
From: <graeme@heliocentrik.net>
Sent: Wednesday, June 12, 2013 1:57 AM
To: <docbook-apps@lists.oasis-open.org>
Subject: [docbook-apps] DocBook assembly processing: "no namespace bound to prefix d" + 'info' element contents ignored

Hi there,
A (possibly embarrassing newbie) question regarding DocBook assembly
processing.

When I process an assembly document with assemble.xsl verison 1.78.1, I
get the following error:

d:assembly : no namespace bound to prefix d
d:structure : no namespace bound to prefix d
d:module : no namespace bound to prefix d
d:resources : no namespace bound to prefix d
d:resource : no namespace bound to prefix d
error
xsltCompileStepPattern : no namespace bound to prefix d
compilation error: file
/Users/graeme/Downloads/docbook-xsl-1.78.1/assembly/assemble.xsl line 42
element template
xsltCompilePattern : failed to compile 'd:info'

Seemingly, the only way to fix it is to add the namespace
'xmlns:d="http://docbook.org/ns/docbook";' to the top-level element. Am I
missing something, or is the stylesheet broken?

I'm using xsltproc on Mac OS X, version information as follows:

Using libxml 20708, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt
815
libxslt 10126 was compiled against libxml 20708
libexslt 815 was compiled against libxml 20708


Thanks,

Graeme

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org





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