Re: [xml] Identifying the source file for an xi inclusion



On Sat, 2009-01-31 at 08:12 +0100, Daniel Veillard wrote:
On Thu, Jan 29, 2009 at 01:50:52PM -0800, Marc Munro wrote:
I am processing a document which contains nested inclusions using
xi:include.  How can I tell the source file from which a given node was
included into the document?

  Not always possible, for example if you XInclude a text node, well
there is little to help. But you can use 2 things:
  xml:base attribute left by the xinclude process, if you ask for the
    base at a given included point, you may get the proper URI
    if there was room left to put the base attribute at the inclusion
    point (i.e. on an element)
  the XInclude process also turns the original xi:include element into
    an XML_XINCLUDE_START node with all attributes left and also add
    an XML_XINCLUDE_END after the included element(s)

I thought I'd try figuring out the URI the hard way and so traversed to
the XML_XINCLUDE_START node for the inclusion.  I was hoping to find the
href attribute saved there but instead find no attributes at all.

Any suggestions?

__
Marc

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]