OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML Schema: What does <include schemaLocation="" />mean?

On Wed, 11 Mar 2020 20:38:42 +0530, Mukul Gandhi wrote:
> On Wed, Mar 11, 2020 at 5:00 PM Costello, Roger L. <costello@mitre.org>
> wrote:
>> Today, by accident, I omitted the value of schemaLocation in an
>> xs:include, i.e.,
>>     <xs:include schemaLocation="" />


>> Is there a use case for doing so?
> I don't think that, there is any legitimate use case for such a statement.
> I'd be happy to be corrected with right concepts, of course.

I believe that it's technically legal because circular includes are 
legal. That is, in the common(-er) case, schema A includes schema B 
includes schema C includes schema A. Import one, and you get them all, 
a technique to insure completeness (circular include-s can also be more 
or less accidental, because (for instance) you've developed a large set 
of schemas that has several 'profiles,' each starting with a different 
schema document, and there's a collection of things that each of them 
pull in). They commonly occur as schema collections grow over time. The 
specification says that the parser has to recognize the occurrence of 
the cycle, and ignore the circularity.

I've always considered schema A includes schema B includes schema A as 
the tightest cycle, but this is simply the degenerate case. It's 
allowed because it's pointless to forbid it; the schema parser has 
already been told "when circularity is detected, parse each included 
document only once".

Amelia A. Lewis                    amyzing {at} talsever.com
There are two major products that came out of Berkeley: LSD and BSD
Unix.  We don't believe this to be a coincidence.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS