docbook-apps

  • 1.  emacs nXML and DocBook V5.0CR5

    Posted 07-16-2007 23:03
    I'm trying to use emacs with nXML and DocBook V5.0CR5. I am getting
    the following behavior:

    I get completion for the article tag. If I close the tag I get an
    error requesting ``xmlns="http://doc..."''. If I put that in the tag,
    like in the listing below, nxml says article is ``Unknown element''.
    C-c C-s C-w says that I am looking at the correct rnc file.

    How can I fix this? Am I using incompatible versions of tools?

    Thanks, Jason

    Fedora Core 7
    emacs 22.1.1
    nXML 20041004 (from rng-auto.el)
    from rpm:
    emacs-nxml-mode.noarch 0.20041004-5.fc7 fedora
    DocBook V5.0CR5 (downloaded from http://www.docbook.org/xml/5.0CR5/rng/)

    file: ./testdoc.xml
    <<<<<<<<<<<<<

    xmlns:xl="http://www.w3.org/1999/xlink" version="pto">
    <info>

    </info>
    <sect1>

    <sect2>

    <para>
    Xxxx xxxxxx xxxxxx xxx Xxxxxxxx Xxxx Xxxx (XXX) xxx x xxxxxx
    xx xxx. Xxxxxx xxxx xxxx xx xxxx xx xx xxxxx xxxxxxx x xxxx xxx xxxx
    xx xxxx xxxx.
    </para>
    </sect2>
    </sect1>

    >>>>>>>>>>>>>

    file: ./schema.xml
    <<<<<<<<<<<<<

    <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
    <uri resource="testdoc.xml" uri="./docbook.rnc"/>
    </locatingRules>
    >>>>>>>>>>>>>

    from file: ./docbook.rnc
    <<<<<<<<<<<<<
    ...
    s:ns [ prefix = "s" uri = "http://www.ascc.net/xml/schematron" ]
    s:ns [ prefix = "svg" uri = "http://www.w3.org/2000/svg" ]
    s:ns [ prefix = "xlink" uri = "http://www.w3.org/1999/xlink" ]
    # DocBook V5.0CR5

    # See http://docbook.org/ns/docbook

    # This file is part of DocBook V5.0CR5
    #
    # Copyright 1992-2005 HaL Computer Systems, Inc.,
    # O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
    # Corporation, Norman Walsh, Sun Microsystems, Inc., and the
    ...
    >>>>>>>>>>>>>



  • 2.  RE: [docbook-apps] emacs nXML and DocBook V5.0CR5

    Posted 07-16-2007 23:15
    Jason,

    I find that "Unknown element" usually indicates a mismatch in namespace
    between an XML file xmlns assignment and the RNC namespace declaration.

    In your case you have accidentally replaced the "/" in the default xmlns
    with a ".".

    Change to xmlns="http://docbook.org/ns/docbook" and you'll be good to go.

    Jim




  • 3.  Re: [docbook-apps] emacs nXML and DocBook V5.0CR5

    Posted 07-17-2007 00:03
    On 7/16/07, Jim Albers <jalbers@fastpilot.com> wrote:
    > Jason,
    >
    > I find that "Unknown element" usually indicates a mismatch in namespace
    > between an XML file xmlns assignment and the RNC namespace declaration.
    >
    > In your case you have accidentally replaced the "/" in the default xmlns
    > with a ".".
    >
    > Change to xmlns="http://docbook.org/ns/docbook" and you'll be good to go.
    >
    > Jim

    Thanks Jim! Works perfectly. Sorry about the dumb question.

    -Jason