- From: Richard Tobin <richard@inf.ed.ac.uk>
- Date: Thu, 4 Oct 2007 14:28:25 +0100 (BST)
- To: public-xml-processing-model-comments@w3.org
> So, given: > > <p:pipeline-library ...> > <p:import href="commonlib.xml"/> > > <p:pipeline name="pipeone"> > <p:import href="commonlib.xml"/> > <p:import href="otherlib.xml"/> > ... > </p:pipeline> > > <p:pipeline name="pipetwo"> > <p:import href="otherlib.xml"/> > ... > </p:pipeline> > > </p:pipeline> > > The library loads commonlib.xml, so pipeone doesn't because it's > already "seen" it. However, pipeone does load otherlib.xml. And pipetwo > also loads otherlib.xml because it hasn't already been loaded in > the current scope. > > Right? Your description implies a particular order for doing the imports, but that doesn't matter in this case. But consider the case of importing a library that imports a library: top: <p:pipeline-library ...> <p:import href="lib1"/> <p:import href="lib2"/> <p:import href="lib3"/> </p:pipeline-library> lib1: <p:pipeline-library> <p:import href="lib3"/> <p:import href="lib4"/> </p:pipeline-library> lib2: <p:pipeline-library> <p:import href="lib4"/> </p:pipeline-library> lib1 doesn't inherit top's imports, so it has to load lib3. top *does* inherit the contents of lib3 from lib1, so it shouldn't load lib3. What about lib4? top inherits it twice, but doesn't load it at all. So as well as not loading an already-loaded library, it needs to check that "duplicate" types in imports came from the same URI. -- Richard
Received on Thursday, 4 October 2007 13:29:30 UTC