[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Subtle (or not?) Map Processing Bug in XQuery
> In my XQuery script Ibm building a map from all the image files in a directory tree (using BaseXbs file extensions): > > let $files := file:list($rootDir, true(), b*.pngb) > let $imageMap := map:merge( > for $file in $files > map:entry(local:getFilename($file), map{bpathb : $file, bkeynameb, local:getKeyName($file)) > ) > > At this point $imageMap is a map where each entrybs value is also a map. Then declare it as such: don't forget the "as" clause. Declaring the types of your variables would have caught the bug for you. It would also have made the code more readable. Michael Kay Saxonica
|
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
|