docbook-apps

Expand all | Collapse all

DocBook assembly processing: "no namespace bound to prefix d" + 'info' element contents ignored

  • 1.  DocBook assembly processing: "no namespace bound to prefix d" + 'info' element contents ignored

    Posted 06-12-2013 08:57
    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



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

    Posted 06-12-2013 15:26
    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
    >
    >
    >