[DFDL-WG] what do we allow in DFDL expressions after "/"
Steve Hanson
smh at uk.ibm.com
Wed Feb 6 05:05:50 EST 2013
Mike,
More correctly, you mean Step[Index]/Step[Index]/Step[Index], but that's
fine as that is handled by the definition of AxisStep as it includes
Predicate.
However removing FilterExpr entirely removes PrimaryExpr and all it brings
with it, like literals and function calls and the use of "." so your
change on its own simplifies things too much. What I think you would need
is:
StepExpr
::=
FilterExpr | AxisStep
PathExpr
::=
(("/" RelativePathExpr?)
| RelativePathExpr) | FilterExpr
I can see (at least) one problem with only allowing FilterExpr to appear
on its own, namely that you lose the ability to use "." in conjunction
with a path, so even the above is not sufficient.
Looking at what we have done in the original spec, all we did was edit the
BNF to remove things we didn't support, making what resulted easily
comparable to standard XPath 2.0. The resultant BNF implies several things
that we do not support in DFDL, so we qualified the BNF with some notes.
For example, DFDL only allows the use of Predicates to index arrays, so
there is a note saying that a Predicate must result in an integer else
it's an SDE. I think we should do the same for errata 2.101 - leave the
BNF alone and add a new note to the list. And beef up the words at the
start of section 23.4 to make it clear how the BNF should be read.
Also noticed that the BNF in the spec is not stand-alone as the constructs
for StringLiteral etc are not reproduced, and rely on the reader reading
XPath 2.0 spec.
Regards
Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
From: Mike Beckerle <mbeckerle.dfdl at gmail.com>
To: dfdl-wg at ogf.org,
Date: 05/02/2013 23:08
Subject: [DFDL-WG] what do we allow in DFDL expressions after "/"
Sent by: dfdl-wg-bounces at ogf.org
In reexamining the grammar for the DFDL expression language, I have the
following question
In a path Step/Step/Step[Index]
What can Step be? I know it can be ".." or parent::QName or child::QName
or just an NCName or QName,
Those are all what the XPath grammar calls AxisStep.
anything else?
The grammar can be changed in a very small way from the original XPath
grammar if the above are the only possibilities.
the clause
StepExpr ::= FilterExpr | AxisStep
can just be changed to
StepExpr ::= AxisStep
--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
--
dfdl-wg mailing list
dfdl-wg at ogf.org
https://www.ogf.org/mailman/listinfo/dfdl-wg
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130206/8688fe33/attachment.html>
More information about the dfdl-wg
mailing list