OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] XPointer resolution


Hi Bergfrid,

So you are using Docbook 5 (Relax NG based) and have xpointers which point to a certain ID defined in the target file using xml:id, right?

One possibility of why this works in Oxygen would be the fact that we have several patches to the Xerces library we are using. One of them in particular was made to treat "xml:id" as an ID attribute even if it is not defined as such in the associated schema. The thing is that Xerces does not understand the grammar in RelaxNG schemas so it cannot determine on its own if a certain attribute is of type "ID".

Actually we posted a bug on the Xerces bugs list 7 years ago and it's still not fixed in their code:

https://issues.apache.org/jira/browse/XERCESJ-1113

One thing you could try would be to add in your class path from the "OXYGEN_INSTALL_DIR" both the "xercesImpl.jar" and the "oxygen.jar" and make sure the "oxygen.jar" is first added in the classpath (so that its Xerces patches are used).

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 5/7/2014 1:30 PM, Bergfrid Skaara wrote:
We have a fully functional doc environment with DocBook 5 and oXygen XML
Editor, and I am trying to set up the corresponding java commands for an
automated build system. I have combed the DocBook XSL book for anything
related to xincludes and xpointers, but I still do not get why it works
from oXygen and not from the command line.

Error message: org.xml.sax.SAXParseException [...] Reason: XPointer
resolution unsuccessful

I have the full command line shown in example  23.5 "XIncludes and XML
catalogs with Saxon and Xerces" on page 376.

Specs:
Saxon 6.5.5, Xerces 2.11.0, oXygen XML Editor 15.1, DocBook xsl 1.78.1
with customization layer and custom rng schema.

I use the basic xpointer attribute with fragment references to xml:id in
the hrefed file. Because this is DB5, there is no schema in the DOCTYPE.
But according to p46 in DocBook XML TCL, xml:id is already mapped to
type ID and "you do not have to worry about fragment references failing
due to lack of schema". After all it does work in the oXygen
transformation, so why not on the command line with the same tools ?

Rewriting all xpointers to place this in separate files is not an
option, as our source is highly modular and singlesourced with lots of
reuse across documents.

Any advice, whether solutions or further reading, are welcome.

Bergfrid Skaara


--



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]