xsl-list
[Top] [All Lists]

Re: [xsl] '"as" SequenceType' vs 'TypeDeclaration' in XPath 3.0?

2014-01-03 06:46:44

On 3 Jan 2014, at 12:08, Tony Graham <tgraham(_at_)mentea(_dot_)net> wrote:

In XPath 3.0 [1], what tips the balance between the occurrence of '"as"
SequenceType' in production [64] versus the occurrence of
'TypeDeclaration' in production [3], where 'TypeDeclaration' is defined as
'"as" SequenceType' in production [66]?

[64] InlineFunctionExpr ::= "function" "(" ParamList? ")" ("as"
SequenceType)? FunctionBody
[2] ParamList ::= Param ("," Param)*
[3] Param ::= "$" EQName TypeDeclaration?
[66] TypeDeclaration ::= "as" SequenceType



It's likely to be one of the following:

(a) sometimes the XPath 3.0 grammar is complicated by the desire to make it an 
explicit subset of the XQuery 3.0 grammar
(b) sometimes the grammar is complicated by the constraints imposed by the 
technology used for processing the grammar files and generating the parsing 
applets
(c) sometimes the grammar is complicated by the desire to define meta-symbols 
that are useful in defining the semantics
(d) sometimes (and I suspect here) there is simply an opportunity for 
simplification that has been overlooked.

Michael Kay
Saxonica
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>