[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Inconsistent expansion of {} inside strings ...
- From: David Carlisle <davidc@nag.co.uk>
- To: David <dlee@calldei.com>
- Date: Mon, 10 May 2010 15:40:11 +0100
On 10/05/2010 15:28, David wrote:
> I ran into this today and it surprised me. I'm sure this is "as
> documented" but was wondering if anyone could provide a rationale ?
>
> {} expansion occurs within strings in attributes but not in "plain
strings"
You didn't say, but you're asking about xquery syntax.
in xslt (where the notation comes from) the rationale is that {} is
never a special character in Xpath, it is just used to trigger xpath
evaluation in certain contexts, (notably attribute values of literal
result elements).
In Xquery, where of course {} is a special character the rationale has
to be reworded slightly but is essentially the same, allowing xquery
evaluation within a string literal would complicate things with no extra
functionality as you can always just use concat if you need to construct
a string.
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]