[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: are all strings in a sequence valid potential QNam
>> > http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-castable >> > "[if] the input argument of the expression is of type xs:string but it >> > is >> > not a literal string, the result of the castable expression is false." >> >> To help me understand that :-) > > Not a problem, Andrew ... I get asked about this terminology in the > classroom. > >> can you provide an example of a user >> constructed string that is not a string literal? >> >> For example, tokenizing a string into a sequence of strings... they >> are all string literals aren't they? > > Nope ... a string literal is "literally a string in the stylesheet" written > with string delimiters. The term "literal" here is in reference to the > XPath written syntax. > > A sequence of strings is just that: a sequence of string values in memory. > > A literal string in the stylesheet is just that: a string value literally > delimited in the stylesheet. See production 74 of the XPath syntax: > > http://www.w3.org/TR/2007/REC-xpath20-20070123/#doc-xpath-StringLiteral > > The difference is a syntax issue: a string literal is a type of primary > expression (production 41) written in the stylesheet syntax and it is the > way to represent a string value in the XPath syntax different from the > representations of other literal values. > > I hope that clarifies the distinction. It does, thanks Ken. Doesn't that restriction then make "castable as xs:QName" pretty useless? I can't see when you would need it... -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|