XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Inconsistent expansion of {} inside strings ...

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS