Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with lexical analysis of _keywords_ in SequenceType #75

Closed
malteseduck opened this issue Nov 14, 2013 · 1 comment
Closed

Issues with lexical analysis of _keywords_ in SequenceType #75

malteseduck opened this issue Nov 14, 2013 · 1 comment
Labels

Comments

@malteseduck
Copy link
Contributor

There are some cases where the appearance of "div" seems to be recognized as the keyword instead of a reference to a div element. Here are cases that work just fine:

/xhtml:html/xhtml:body//xhtml:div

and

<div>Hi</div>

Here are cases that don't seem to work:

let $div as element(div) := <div/>
return
    $div

and

if (fn:empty($node/*:div)) then
    "bad"
else 
    "ok"

Thank you.

@ligasgr
Copy link
Owner

ligasgr commented Nov 14, 2013

Hi,

This is just a subclass of two distinct problems (in fact three but for the last one there's already an issue raised -> #9 ):

  • some "keywords" not being tokenized fine when used in path expressions when used in conjunction with * wildcard
  • some "keywords" not being tokenized fine when used as types in SequenceType

The problem in general is that xquery is a context sensitive grammar and lexical analysis of such language is not an easy task.
I'll keep this one open (with title changed) to deal with the first issue and raise a new issue ( #76 ) for dealing with the second one.

@ligasgr ligasgr changed the title Issues with lexical analysis of _keywords_ in path expressions Issues with lexical analysis of _keywords_ in SequenceType May 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants