[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Modules and duplicate declarations

Michael Kay mike at saxonica.com
Sat Jul 21 12:44:47 PDT 2007


  Modules and duplicate declarations
It seems to work fine on Saxon 8.9.0.4

8.6.1 is pretty old (Nov 2005), and both the product and the spec have moved
on since it was released.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: http://x-query.com/mailman/listinfo/talk 
> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Ronald Bourret
> Sent: 21 July 2007 05:40
> To: http://x-query.com/mailman/listinfo/talk
> Subject:  Modules and duplicate declarations
> 
> Hello,
> 
> I am having trouble understanding how to import the same 
> module in multiple places.
> 
> The test query requires modules A and B, and module A 
> requires module B. 
> Therefore, test imports A and B, and A imports B:
> 
> alib.xqy
> --------
> module namespace a = "a";
> import module namespace b = "b" at "..."; declare variable 
> $a:a1 := fn:concat("a", $b:b1);
> 
> blib.xqy
> --------
> module namespace b = "b";
> declare variable $b:b1 := "b";
> 
> test.xqy
> --------
> import module namespace a = "a" at "..."; import module 
> namespace b = "b" at "..."; ($a:a1, $b:b1)
> 
> Running test returns XQST0049, stating that $b:b1 was 
> declared twice. If test doesn't import blib.xqy, it returns 
> XPST0008, stating that prefix b has not been declared.
> 
> I don't understand the first error. The XQuery spec states 
> that module imports are not transitive. That is, if A imports 
> B and B imports C, C is not visible to A. Thus, $b:b1 should 
> be visible to test only by directly importing blib.xqy and 
> not by importing alib.xqy.
> 
> Is this a bug in the processor (Saxon 8.6.1) or am I 
> misreading the spec?
> 
> Thanks,
> 
> -- Ron
> 
> _______________________________________________
> http://x-query.com/mailman/listinfo/talk
> http://x-query.com/mailman/listinfo/talk



Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.