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.or
g/ns/docbook" and you'll be good to go.
Jim
-----Original Message-----
From: Jason Addison [mailto:jraddison gmail.com]
Sent: Monday, July 16, 2007 4:03 PM
To: docbook-apps lists.oasis-open.org
Subject: [docbook-apps] emacs nXML and DocBook V5.0CR5
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.doc
book.org/xml/5.0CR5/rng/)
file: ./testdoc.xml
<<<<<<<<<<<<<
<?xml version="1.0"
encoding="UTF-8"?>
<article xmlns="http://docbook.or
g.ns/docbook"
xmlns l=&qu
ot;http://www.w3.org/
1999/xlink" version="pto">
<info>
<title>My Titles</title>
</info>
<sect1>
<title>Section One</title>
<sect2>
<title>Section One One</title>
<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>
</article>
>>>>>>>>>>>>>
file: ./schema.xml
<<<<<<<<<<<<<
<?xml version="1.0"?>
<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"&g
t;
<uri resource="testdoc.xml"
uri="./docbook.rnc"/>
</locatingRules>
>>>>>>>>>>>>>
from file: ./docbook.rnc
<<<<<<<<<<<<<
...
s:ns [ prefix = "s" uri = "http://www.a
scc.net/xml/schematron" ]
s:ns [ prefix = "svg" uri = "http://www.w3.org/20
00/svg" ]
s:ns [ prefix = "xlink" uri = "http://www.w3.org/
1999/xlink" ]
# DocBook V5.0CR5
# See http://docbook.org/ns/d
ocbook
# 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
...
>>>>>>>>>>>>>
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|