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

using a context node in a for loop

Torsten Grust grust at in.tum.de
Wed Oct 18 11:02:02 PDT 2006


  using a context node in a for loop
Hi all,

On Oct 17, 2006, 5:05 PM, David Carlisle wrote with possible deletions:
>
>> Should the function below work?
> no:-)
>
> a function does not automatically pass the current context,
> . is undefined in a function body, so you can't use relative paths  
> like
> '@id and @db-ref

I don't buy this explanation, David.  Sure, no context node is  
defined in user-defined functions per se.  But Robert explicitly  
establishes a context node in the function:

   doc(...)/*/
        (
          ...
        )

This means that the attribute axis steps like @id, @label should work  
fine in the parentheses.

The error message that Robert receives seems weird to me (shouldn't  
happen).

Cheers,
    --Torsten
--
   | Prof. Dr. Torsten Grust                         http://x-query.com/mailman/listinfo/talk |
   |                                 http://www-db.in.tum.de/~grust/ |
   |     Database Systems - Technische Universität München (Germany) |






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.