Here is my understanding of the following statement:

3461 1. from the locations identified by the import statement(s) for the namespace. Locations MUST NOT 3462 be searched recursively in order to locate artifacts (i.e. only a one-level search is performed).

Let's say we have 3 contributions: C1, C2 and C3.

Case 1:

C1: import namespace="http://ns1"; location="C2"
C2: export namespace="http://ns1";
C3: export namespace="http://ns1";

To resolve an XML artifact (for example, an XSD type {http://ns1}Type1) for C1, we first try C2 (as indicated by the @location). If C2 contains the XSD Type {http://ns1}Type1, use it. Otherwise try C1. When C2 is searched, only the top-level artifacts within C2 are checked. I think that's the behavior we have in ModelResolvers.

Case 2:

C1: import namespace="http://ns1";
C2: export namespace="http://ns1";
C3: export namespace="http://ns1";

The @location is not present, then C2 and C3 are searched as both of them export http://ns1.

Thanks,
Raymond

From: Ramkumar R
Sent: Thursday, June 04, 2009 2:25 AM
To: [email protected]
Subject: Re: [2.x] 11.2.1 - SCA Artifact Resolution Mechanism


OK Ram, interesting that we are doing it back to front. Are we also
applying the "only one-level search is performed" rule?


Hi Simon,

I assume that, since we only use ModelResolvers to identify the artifacts and resolve them accordingly, the rule of "only one-level search is performed" is not applicable.

Correct me if my assumptions is wrong.

--
Thanks & Regards,
Ramkumar Ramalingam

Reply via email to