[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem about imported schema type when processing XQuery
Oh, sorry it seems that I miss a "s" when I say "participating ISSD", so actually we have only minor difference, let me correct: For a module, its participating ISSDs include the (1),(2),(3) I've mentioned in last reply, while your opinion is that its participating ISSDs include: 1 the module itself imported schema definitions 2 XML document imported schema definitions 3 all schema definitions imported in imported modules so the only difference is (3), your opinion is a static one while my understanding is a dynamic one, right? Actually I think our different understanding rooted from the different understanding about the "module" concept in XQuery. You consider XQuery's module as a complete equivalance to XSLT's module, which should be "included" in another module then compile, in other words, it's a "white box", its semantic depends on where it's included or imported(because its schema type could be differently redefined in different including or importing module). While I think XQuery's module is different with XSLT's module, I think XQuery spec. allow its module be compiled independently, no matter where the module is imported, module's semantic should not be changed, in other words, XQuery's module is a "black box", when imported, only the top level variables and function signatures are affected by type redefine mechanism, the local variables in functions should not be affected. The reason why I make such conclusion is from following XQuery spec statement: 1 "A module import imports only functions and variable declarations; it does not import other objects from the imported modules, such as in-scope schema definitions or statically known namespaces. Module imports are not transitive¡ªthat is, importing a module provides access only to function and variable declarations contained directly in the imported module." Here XQuery's statement is clearly different with XSLT's statement about module import. In XSLT spec, module imports are transitive while XQuery clearly stated that they are not, so XQuery's module import must be something different with XSLT's module import. My thought is, XQuery's module is a "black box" while XSLT's module is a "white box" 2 "It is a static error [http://www.w3.org/TR/xquery/#ERRXQST0036] to import a module if the importing module's in-scope schema types do not include definitions for the schema type names that appear in the declarations of variables and functions (whether in an argument type or return type) that are present in the imported module and are referenced in the importing module." Here spec. force user to import interface needed schema types, if we consider XQuery's module as "white box", then all imported types in "white box" has already imported, then this statement seems lead to redundancy, however if we consider XQuery's module as a "black box", then this statement is quite nature to understand. You once commented that this is just for making seperate compilation of modules easier, I actually did not see much easier, since when we treat it as "white box", then there must be a global schema definition table and locating any type should already be quite easy. Thanks Xin 2008/1/3, Michael Kay <mike@s...>: > Ok, let me make it more concise. It's true that the ISSD is a static
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|