RE: ACTION 614-12: Smart Quotes

 
> > FWIW, I think it makes sense to make such a fundamental feature
> > (quoted, interpolated strings) part of the XPath core language.
> 
> I would have assumed it to be XQuery-only as well.  This is about constructing
> text nodes, and XPath does not have node constructors (literal elements for
> instance).  This is rather done in XQuery (or XSLT, but XSLT already has such a
> mechanism).
> 

I thought of it as string interpolation, in which the result of the smart-quoted expression is a string, not a text node. But I agree, if it is a method to create text nodes, or even different kinds of nodes, then it (probably) has no place in XPath. 

I considered it the XPath counterpart of text value templates and can see its merits from an XPath perspective, though text value templates also create text nodes and not strings, and as such it sounds more like TVT's the XQuery way.

 The new suggestion to call them "String Templates" partly leans in that direction, but if they are creating text nodes, perhaps they should be called "Text Templates" (or Text Value Templates?) instead, as a better mnemonic and in line with the TVT's terminology.

Cheers,
Abel 

Received on Monday, 21 September 2015 07:36:00 UTC