Hi Tom,
What you say is exactly what I supposed...
Anyway, many thanks for your help!
Talk to you soon,
j3d.
Thomas Schraitle wrote:
Hi Giuseppe,
Am Samstag, 27. Oktober 2007 12:59:04 schrieb Giuseppe Greco:
With DocBook 4.x I used a preamble like this
?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<article lang="en">
...
</article>
... while with DocBook 5.x I should use something like this
<article
xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:lang="en">
...
</article>
In the first XML snippet
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" is the real
physical location of the DocBook DTD and all the stuff works fine.
With DocBook 5.x things change... is there a way to associate
"http://docbook.org/ns/docbook" with the physical location of the
DocBook schema in a tool-independent way (as with DocBook DTD)?
I am not 100% sure but from what I've read there is no need for such a
mechanism. In [2] there is an explanation why there is no similar method
in RELAX NG:
»In fact, RELAX NG does not define any mechanism for associating a
document with a RELAX NG schema. Although it is useful to be able to
specify rules for determining the schema to be used to validate a
particular document, this problem is not specific to RELAX NG.
Validation is just one of many processes that can be applied to
an XML document. For example, a user may wish to perform XInclude
processing or XSLT processing. A user may wish to perform validation
before or after any of these other processes. The problem of
associating a schema with a document is really just a special case
of the problem of associating processing with a document. What is
needed is a solution that can specify a series of processes to be
applied to a document.«
Applied to DocBook, it's more a problem of how you call your favorite
validation tool. The Transition Guide[2] just gives an example how to
run the msv validator:
java -Xss512K -jar /path/to/relames.jar \
/path/to/docbook.rng \
document.xml
Hope that answers your question. :)
Best wishes,
Tom
--- References:
[1] http://www.thaiopensource.com/relaxng/design.html#section:17
[2] http://www.docbook.org/docs/howto/#validators
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]