Hi Leo
Thank you. Can you tell me exactly how this fits into my query please.
Best regards
John
-----Original Message----- From: Leonard Wörteler [mailto:leo@woerteler.de] Sent: 24 July 2012 09:11 To: John Morin Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Context node required problem
Hi John,
Am 24.07.2012 10:02, schrieb John Morin:
I am trying to pass a string to my XQuery as a parameter, $input below. It seems that the string is not being interpreted as XML as I get the following message when I run the query from my .Net client:
Stopped at line 14, column 68: [XPTY0019] Context node required for sglines; xs:string found.
the value you're passing in is bound to `$input` as an `xs:untypedAtomic`, you have to parse it into an XML document with `parse-xml($input)` [1] to access the child nodes.
Hope that helps, cheers, Leo
[1] http://www.w3.org/TR/xpath-functions-30/#func-parse-xml
IMPORTANT NOTICE: This email and any attachments are confidential and are protected by copyright and/or database rights and are intended for the addressee only. If you are not the named recipient, you must not use, disclose, reproduce, copy or distribute the contents of this communication. If you have received this in error, please contact the sender and then delete this email from your system. The integrity of email across the Internet cannot be guaranteed. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. Although Autodata Limited has taken precautions to ensure no viruses are present in this email or any attachments, the company cannot accept any responsibility for any loss or damage arising from the use of this email or attachments. Autodata Limited, Priors Way, Maidenhead Berkshire, SL6 2HP, England, UK. Registered as a limited company in England, UK. Registration number 1062717. VAT number GB 208 4782 54 000.