Re: [xml] XInclude and xml:base attribute



Hi,

thanks for beeing so fast,

Daniel Veillard wrote:
  Hum, strange. The xml:base attribute is not added if libxml2 expect
not adding it to have the exact same effect, and basically doesn't do
it if the XIncluded resource is in the same "directory" as the
document doing the include.

yes, the XIncluded resource is in the same "directory" as the document doing
the include. 

  I can't see why your code would change that behaviour compared to
xmllint

Sorry, after some experiments I've checked that my code and xmllint do always
the same. My problem was with the file paths: 

It seems that xml:base is not added if the document source is a bare file name
("in.xml"), and it's added if the source has directories ("dir/in.xml"), even
if the XIncluded resource is in the same directory ("dir/included.xml").  

For practical purposes this means that xml:base will be added often when
processing XML documents. 

I'd like to disable the xml:base attribute addition (even if the included
resource is in a different directory) because after performing the XInclude
processing with libxml2 I need to validate the resulting document against a XML
Schema using another library: the xml:base attributes (which can appear in any
element) make the document not valid. I think this is a common problem with
XInclude processing followed by validation.     

Is there any way to control / disable the "xml:base" addittion?

Manuel




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