You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "A B (JIRA)" <de...@db.apache.org> on 2006/09/19 00:01:22 UTC

[jira] Commented: (DERBY-1776) ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'. - Misleading text

    [ http://issues.apache.org/jira/browse/DERBY-1776?page=comments#action_12435586 ] 
            
A B commented on DERBY-1776:
----------------------------

> wouldn't the error be caught by regular parsing?

Yes, regular parsing would catch this and other SQL/XML-related syntax errors, but the error message is somewhat unhelpful--I can't remember exactly, but it's something like

  "Encountered ')' at line x column y."

And while it's true that a user could eventually figure it out, I thought that, given the high number of required keywords for the SQL/XML operators, it'd be more user friendly to actually provide a hint as to what was really missing.  When you consider that the SQL/XML syntax tends to be rather wordy and that SQL/XML operators are often used one on top of the other (ex. XMLSERIALIZE (XMLQUERY(...)...), it's pretty easy to end up with long lines of query--and frankly, I as a user found myself getting impatient trying to figure out which operator was missing what keyword.  So I created 42Z72.

I guess one option is to remove that message altogether and let the user count lines and columns to find out where the unexpected ')' is and what it's supposed to be.  But instead of that, I'd rather just reword the error message to address the fact that this is "not an XML syntax error, it's a syntax in the SQL language".  Maybe something like:

ERROR 42Z72: Missing SQL/XML keyword(s): 'AS'. 

Does that seem like an acceptable approach?

> ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'. - Misleading text
> --------------------------------------------------------------------------
>
>                 Key: DERBY-1776
>                 URL: http://issues.apache.org/jira/browse/DERBY-1776
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>            Priority: Minor
>
> create table t (i int, x xml);
> select xmlserialize(x) from t;
> ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.
> This is not an 'XML Syntax error', it's a syntax in the SQL language. No need to have a special error messgae here, wouldn't the error be caught by regular parsing?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira