I would like a portable solution to creating a multiply nested XML document using XInclude. I am using <xi:include href="foo.xml">
elements and taking the input from a stream. So far this fails (I am using XOM which has its own XIncluder) which reports it cannot find the base URL for the href
. I am wondering if this is a general problem (see XercesDOMParser and XIncludes ). If so are there general workarounds?
can XInclude be used on stream input?
140 views Asked by peter.murray.rust At
1
A relative URI like
foo.xml
is useless without the context of a base URI with which to work out that e.g. if the base URI ishttp://example.net/bar/baz.xml
then the absolute URI of the resource ishttp://example.net/bar/foo.xml
.This base URI can come from:
xml:base
<base />
element in XHTML duplicatesxml:base
unnecessarily and with less flexibility, but is required for compatibility with HTML4.01 and earlier).