[oXygen-user] RE: Docbook 5.0 Relax Schema and Xpointer Resolution
George Cristian Bina
Fri Nov 11 08:17:42 CST 2005
Hi Ray,
We will look into this, however it is not an easy task.
To understand what happens here it is how the processing is performed.
Let's assume you have an XML document master.xml and a document from
which you want to include a fragment, fragment.xml.
The Relax NG validator acts as a SAX content handler placed after the
XML parser that parses the document.
The XML parser does not know about the Relax NG validator.
The XInclude processing is done inside the XML parser
So, when the XML parser parses master.xml it will already resolve the
XInclude element and will replace it with the actual included content.
This reach the Relax NG validator. In the parsing phase there is no
schema processing involved as the XML parser does not even know about a
schema processor. In order to have a fragment from fragment.xml included
you need to know what is an ID in fragment.xml and for that you need to
parse it against a schema (but that document may not be valid against
some schema or there may be no schema associated with it). In any case,
finding the IDs in the fragment.xml requires parsing it against a schema
from the XML parser which does not know about any schema.
Now, the possible solution here will be to forget about schema and rely
on the xml:id for determining what values represent IDs in the included
document. This I think is doable but again it is not a trivial task. I
will add this on our bugzilla and we will look into it.
As a workaround for the current situation you can place the content you
want to include in a separate file and include it both from the master
document and from the fragment document. For instance if you have a para
in the fragment.xml then you can place that in a new file, xinclude that
file in fragment.xml in the place the para used to be and xinclude it
also in the master xml where you included it using xpointer.
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Ray Miller wrote:
>>> IDs are supported only when they are defined in DTDs. <<
>
> So how will the oXygen community cope with Docbook-rng schemas; surely
> oXygen has a plan other than to state nonsupport.
>
> Xinclude / XPointer is essential for many of us docbook users.
>
> Advice please.
>
> Ray
>
>
> _______________________________________________
> oXygen-user mailing list
>
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
More information about the oXygen-user
mailing list