Page 1 of 1

XSLT, XInclude, and XPointer

Posted: Fri Apr 23, 2010 12:19 pm
by ra0543
XInclude depends very heavily on XPointer, especially if it is to be really useful - i.e. to provide an easy way to reuse subsets of nodes in a document rather than using a transformation to generate a new document including them, since a new document of this kind then doesn't remain up-to-date if the underlying source changes (whereas one that xincludes the underlying material would).

But it seems that very many XML documents that use XInclude can't then be shown and processed in Oxygen because the support for XPointer is poor (in the external modules used); the consequence seems to be that XInclude is substantially less useful than it could be, pretty well crippled in fact.

It seems at the moment that only XSLTProc fully supports XPointer (i.e. both the massively useful xpointer() scheme as well as the rather pathetically unuseful element() one) and thus properly supports XInclude.

Of course, however, XSLTProc is only an XSLT 1.0 processor. My question is thus, is there an XSLT 2.0 processor which offers this kind of support so that documents containing xincludes with xpointer() scheme expressions can be processed with XLST 2.0 transformations? And is it yet possible even to display documents with this kind of xinclude in Oxygen without constant error messages?

Re: XSLT, XInclude, and XPointer

Posted: Fri Apr 23, 2010 3:43 pm
by george
Hi,

oXygen supports LIBXML and you can configure a validation scenario for your files that use that processor instead of the default one (Xerces-2J).
For XSLT 2.0 processing you can write a stylesheet that resolves the XIncludes/XPointer and then apply your actual processing on the result of that transformation. oXygen allows you to chain multiple stylesheets in a transformation scenario.

Best Regards,
George