Santoro, Peter | 28 Aug 13:58

questions about lxml xsd:include and xsd:import behavior

After reading http://kontrawize.blogs.com/kontrawize/2007/10/the-trouble-wit.html, I have a couple of questions about how lxml and libxml2 handle imports and includes.  I can always run some tests to figure this out for myself, but it would be nice if someone who already knows the official/correct answers could share them.

 

1) The XML Schema standard appears to leave it up to the parser to determine how to resolve importing multiple schemas from the same namespace.  Apparently, some parsers only import the first schema from a given namespace, which could lead to missing definition errors.  What is the behavior of lxml/libxml2 here?

 

2) It appears that some xml parsers incorrectly treat multiple relative includes of the same file as being different.  This behavior would cause the same file to be included more than once, causing redefinition errors.  What is the behavior of lxml/libxml2 here?

 

Thank you,

 

Peter

_______________________________________________
lxml-dev mailing list
lxml-dev <at> codespeak.net
http://codespeak.net/mailman/listinfo/lxml-dev
Stefan Behnel | 29 Aug 11:43

Re: questions about lxml xsd:include and xsd:import behavior

Hi,

the best place to ask these questions is the lixbml2 mailing list.

Stefan

Santoro, Peter wrote:
> After reading
> http://kontrawize.blogs.com/kontrawize/2007/10/the-trouble-wit.html, I
> have a couple of questions about how lxml and libxml2 handle imports and
> includes.  I can always run some tests to figure this out for myself,
> but it would be nice if someone who already knows the official/correct
> answers could share them.
>
>
>
> 1) The XML Schema standard appears to leave it up to the parser to
> determine how to resolve importing multiple schemas from the same
> namespace.  Apparently, some parsers only import the first schema from a
> given namespace, which could lead to missing definition errors.  What is
> the behavior of lxml/libxml2 here?
>
>
>
> 2) It appears that some xml parsers incorrectly treat multiple relative
> includes of the same file as being different.  This behavior would cause
> the same file to be included more than once, causing redefinition
> errors.  What is the behavior of lxml/libxml2 here?
>
>
>
> Thank you,
>
>
>
> Peter
>
> _______________________________________________
> lxml-dev mailing list
> lxml-dev <at> codespeak.net
> http://codespeak.net/mailman/listinfo/lxml-dev
>

Gmane