Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » JPQL validation error: well-formed character data or markup
JPQL validation error: well-formed character data or markup [message #900126] Sat, 04 August 2012 10:53 Go to next message
Karsten Wutzke is currently offline Karsten WutzkeFriend
Messages: 124
Registered: July 2009
Senior Member
I have a named query in the named-query.xml file:

  <named-query name="Score.STANDINGS_ITEMS_BY_GROUP">
    <query>
      SELECT NEW com.kawoolutions.bbstats.view.StandingsStatLine(
          ro.id
        , ...
        , SUM(CASE WHEN paf.wasWithdrawn = FALSE AND paa.wasWithdrawn = FALSE AND scf.finalScore > sca.finalScore THEN 1 ELSE 0 END)
        , SUM(CASE WHEN paf.wasWithdrawn = FALSE AND paa.wasWithdrawn = FALSE AND scf.finalScore < sca.finalScore THEN 1 ELSE 0 END)
        , ...


Here the '<' comparison causes a JPQL error saying:

Quote:
The content of elements must consist of well-formed character data or markup.


The '>' comparison causes no error OTOH.
index.php/fa/11024/0/
Note, that I set all JPQL validation to Ignore, like here: http://www.eclipse.org/forums/index.php/t/369011/

Is this a bug or do you really have to escape those characters in the JPQL statement?

Why isn't the "greater than" above showing an error then?

Karsten

PS: Dali version is the one from the standard Eclipse Indigo Java EE binary release (?)
PPS: We really need an option to completely turn off ALL JPQL validation!
Re: JPQL validation error: well-formed character data or markup [message #900174 is a reply to message #900126] Sun, 05 August 2012 02:52 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Karsten Wutzke wrote on Sat, 04 August 2012 06:53

Is this a bug or do you really have to escape those characters in the JPQL statement?

Why isn't the "greater than" above showing an error then?

Karsten

PS: Dali version is the one from the standard Eclipse Indigo Java EE binary release (?)
PPS: We really need an option to completely turn off ALL JPQL validation!


Any character data in XML (unless it is in a CDATA section) must escape both the "less than" (<) and the "ampersand" (&) characters with "&lt;" and "&amp;", respectively. The "greater than" (>), "double quote" ("), and "single quote" (') may optionally be escaped, but are not required.[1]

Re: PPS: This is XML validation, not JPQL validation.

[1] http://www.w3.org/TR/REC-xml/#syntax
Re: JPQL validation error: well-formed character data or markup [message #900223 is a reply to message #900174] Sun, 05 August 2012 17:37 Go to previous message
Karsten Wutzke is currently offline Karsten WutzkeFriend
Messages: 124
Registered: July 2009
Senior Member
So there's a strict difference between greater than and less than in plain XML...
I didn't know that. Must have been missing in my XML classes years ago. Thanks for the enlightenment.

Karsten

PS: yes, it is XML validation (of course).
Previous Topic:JPQL validation errors in named-queries.xml not ignored
Next Topic:JPQL validation error: AS in SELECT (with constructor expession)
Goto Forum:
  


Current Time: Tue Mar 19 07:33:46 GMT 2024

Powered by FUDForum. Page generated in 0.02173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top