Project

Profile

Help

Will Gizmo get a query command?

Added by Martin Honnen over 4 years ago

I was wondering why Gizmo doesn't have a query command like it has a transform command. Will that be added?


Replies (2)

RE: Will Gizmo get a query command? - Added by Michael Kay over 4 years ago

It's certainly a candidate. I didn't want to go too far until we have some user experience. For example, I'm not sure how best to handle the query results (transform puts the result in the "current document" - which at the moment has to be a single document node. Also it raises the question of multiline input, and whether that's editable.

RE: Will Gizmo get a query command? - Added by Michael Kay over 4 years ago

Note also that XQuery is supported to an extent: in the updating commands like precede and follow, the new value is supplied as a query.

One of the interesting details in implementing some of these commands like "rename EXPR as EXPR" is that the parser has to detect the end of the expression. We haven't integrated the command parser into the main XPath/XQuery grammar, so this is a little ad-hoc. For example the reason the syntax is "update X with Y" rather than "update X to Y" is that "to" could legitimately appear as part of the expression. We've done this "end of expression" detection for the XPath parser, but not for the XQuery parser, so where the command syntax includes a query, it's always the last thing in the command.

    (1-2/2)

    Please register to reply