Hi,
I have a Java extension to XXE that formats xincluded data based on some
meta-data deducted from the xpointer. Taking the VATrates.html example from
XXE's tutorial, let's say I create an xinclude as follows:
<xi:include href="xxe-pro-4_6_1/doc/user/tutorial/VATrates.html"
xpointer="austria_vat" xmlns:xi="http://www.w3.org/2001/XInclude" />
(yes, I'm still using XXE 4.6.1 but it seems the API hasn't changed in 5.4
for the issue I have. If it has, then it'd be a good reason for me to
upgrade!)
My @xpointer actually uses the xpointer() scheme, and my code uses the
@xpointer value to deduct meta-data. In this example, let's say I'd extract
"austria".
To obtain the @xpointer value, I have the following code:
import com.xmlmind.xml.xinclude.XInclude;
import com.xmlmind.xml.doc.Constants;
[...]
// get the XInclude definition
final XInclude xinclude = (XInclude) dataElement
.getProperty(Constants.INCLUSION_PROPERTY);
// get the xpointer attribute
final String xpointer = xinclude.xpointer;
This works fine as long as xi:include is part of the document being edited.
If it is part of another document, which is itself xincluded from the
document being edited, then the variable xinclude is null. The javadoc for
Constants.INCLUSION_PROPERTY[1] is indeed clear about this:
This property is set on the nodes *directly* included in a document.
Fine. Now how can I obtain the XInclude object for *indirectly* included
nodes, then?
Thanks in advance,
Benoit
[1]
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xml/doc/Constants.html#INCLUSION_PROPERTY
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support