ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

Parser error for namespace prefix "default" #224

Open charlessimpson opened 7 years ago

charlessimpson commented 7 years ago

XQuery has few reserved keywords (https://www.w3.org/TR/xquery-30/#id-reserved-fn-names), but the parser shows an error when declaring a namespace with prefix named "default". For example:

xquery version "3.0";
declare namespace default = "http://www.w3.org/1999/xhtml";
<default:p>Hello, World</default:p>

Instead, the parser shows the error:

';', , , '=', NCName, declare or import expected, got 'default'

charlessimpson commented 7 years ago

There's a similar problem when trying to import a namespace with prefix "default", e.g.:

xquery version "3.0";
import module namespace default = "uri:module:namespace:default" at "DefaultExample.xq";
default:func()