Dear all,
My example (in attachment) employs xi:include elements to include other xml 
files.
The example is constituted by a main.xml file which includes another file 
(include1.xml) stored in a subfolder, called include1.
include1.xml, in turn, includes another xml file (include2.xml) stored in a 
subfolder of include1 which is called include2.
Overall, the example consists of four folder levels and only the last file, 
include4.xml, contains data.

When I import main.xml in baseX, I obtain the following result:

<main xmlns:xi="http://www.w3.org/2001/XInclude";>
  <level1 xml:base="./include1/include1.xml">
    <level2 xml:base="./include1/include2/include2.xml">
      <level3 xml:base="./include2/include3/include3.xml">
        <level4 xml:base="./include3/include4/include4.xml">
          <data>0</data>
          <data>1</data>
        </level4>
      </level3>
    </level2>
  </level1>
</main>

The xml tree is correct, but I have doubts about the value of the attribute 
xml:base.
In particular:
- level1: I think that the value of xml:base  ( i.e. ./include1/include1.xml) 
is correct.
- level2: xml:base  value is correct if its meaning is a path relative to the 
root file. Otherwise, if xml:base is supposed to store a path relative to the 
current file, then it should be  ./include2/include2.xml.
- level3: This seems to be not correct, neither as an absolute path, nor as a 
relative path. I think it should be  ./include1/include2/include3/include3.xml 
as a path relative to the root file or ./include3/include3.xml as a path 
relative to the current file.
- level4: Same as level3.

What do you think? Am I missing something? What are the specifications for the 
value of xml:base?
Thank you,
Marco Randazzo

<<attachment: test0.zip>>

Reply via email to