[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath 2.0 Datatypes namespace

Subject: Re: XPath 2.0 Datatypes namespace
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 04 Aug 2006 15:17:04 +0100
apostrophe string literal xpath
>>>>> "tom" == tom tom <tomxsllist@xxxxxxxxxxx> writes:

    tom> My confusion was that I couldn't understand why I have to
    tom> specify the type here yet not for a string, eg:

    tom> translate('ab-c', '-', '/')

but you are supplying the type - the apostrophes indicate that the
data between them is typed as a string.

See XPath 2.0 section 17.1.1:

"The value of a string literal is an atomic value whose type is
xs:string and whose value is the string denoted by the characters
between the delimiting apostrophes or quotation marks. If the literal
is delimited by apostrophes, two adjacent apostrophes within the
literal are interpreted as a single apostrophe. Similarly, if the
literal is delimited by quotation marks, two adjacent quotation marks
within the literal are interpreted as one quotation mark."

So 'ab-c' is syntatically equal to xs:string ("ab-c").
-- 
Colin Adams
Preston Lancashire

Current Thread

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-2013 All Rights Reserved.