You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Lukas Kahwe Smith <sm...@pooteeweet.org> on 2013/07/10 19:28:26 UTC

escaping of quotes

Aloha

Should the following be a legal query?

SELECT data.quotes
            FROM [nt:unstructured] AS data
            WHERE data.quotes = "\"'"

When I run the PHPCR test suite with this query, sending the query via davex I get:

) PHPCR\Tests\Query\CharacterTest::testPropertyWithQuotes
PHPCR\Query\InvalidQueryException: HTTP 400: Query:

            SELECT data.quotes
            FROM [nt:unstructured] AS data
            WHERE data.quotes = "\"(*)'"

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: escaping of quotes

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
ping

On Jul 12, 2013, at 14:15 , Alexander Klimetschek <ak...@adobe.com> wrote:

> Looking at the JCR 2.0 spec, section 6.7.34 [0], I don't see it clearly defined:
> 
> Literal ::= CastLiteral | UncastLiteral
> UncastLiteral ::= UnquotedLiteral | ''' UnquotedLiteral ''' | '“' UnquotedLiteral '“'
> UnquotedLiteral ::= /* String form of a JCR Value, as defined in §3.6.4 Conversion of Values [1] */
> 
> The UnquotedLiteral is not further defined - the last hint only refers to how a string is mapped from non-string property types.
> 
> Don't know what the Jackrabbit SQL2 implementation expects here, anyone?
> 
> [0] http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.34%20Literal
> [1] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4%20Property%20Type%20Conversion
> 
> Cheers,
> Alex
> 
> On 10.07.2013, at 19:28, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:
> 
>> Aloha
>> 
>> Should the following be a legal query?
>> 
>> SELECT data.quotes
>>          FROM [nt:unstructured] AS data
>>          WHERE data.quotes = "\"'"
>> 
>> When I run the PHPCR test suite with this query, sending the query via davex I get:
>> 
>> ) PHPCR\Tests\Query\CharacterTest::testPropertyWithQuotes
>> PHPCR\Query\InvalidQueryException: HTTP 400: Query:
>> 
>>          SELECT data.quotes
>>          FROM [nt:unstructured] AS data
>>          WHERE data.quotes = "\"(*)'"
>> 
>> regards,
>> Lukas Kahwe Smith
>> smith@pooteeweet.org
>> 
>> 
>> 
> 

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: escaping of quotes

Posted by Lukas Smith <sm...@pooteeweet.org>.
Hi,

I just noticed http://wiki.apache.org/jackrabbit/EncodingAndEscaping

On Jul 12, 2013, at 14:15 , Alexander Klimetschek <ak...@adobe.com> wrote:

> Looking at the JCR 2.0 spec, section 6.7.34 [0], I don't see it clearly defined:
> 
> Literal ::= CastLiteral | UncastLiteral
> UncastLiteral ::= UnquotedLiteral | ''' UnquotedLiteral ''' | '“' UnquotedLiteral '“'
> UnquotedLiteral ::= /* String form of a JCR Value, as defined in §3.6.4 Conversion of Values [1] */
> 
> The UnquotedLiteral is not further defined - the last hint only refers to how a string is mapped from non-string property types.
> 
> Don't know what the Jackrabbit SQL2 implementation expects here, anyone?
> 
> [0] http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.34%20Literal
> [1] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4%20Property%20Type%20Conversion
> 
> Cheers,
> Alex
> 
> On 10.07.2013, at 19:28, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:
> 
>> Aloha
>> 
>> Should the following be a legal query?
>> 
>> SELECT data.quotes
>>           FROM [nt:unstructured] AS data
>>           WHERE data.quotes = "\"'"
>> 
>> When I run the PHPCR test suite with this query, sending the query via davex I get:
>> 
>> ) PHPCR\Tests\Query\CharacterTest::testPropertyWithQuotes
>> PHPCR\Query\InvalidQueryException: HTTP 400: Query:
>> 
>>           SELECT data.quotes
>>           FROM [nt:unstructured] AS data
>>           WHERE data.quotes = "\"(*)'"
>> 
>> regards,
>> Lukas Kahwe Smith
>> smith@pooteeweet.org
>> 
>> 
>> 
> 


Re: escaping of quotes

Posted by Alexander Klimetschek <ak...@adobe.com>.
Looking at the JCR 2.0 spec, section 6.7.34 [0], I don't see it clearly defined:

Literal ::= CastLiteral | UncastLiteral
UncastLiteral ::= UnquotedLiteral | ''' UnquotedLiteral ''' | '“' UnquotedLiteral '“'
UnquotedLiteral ::= /* String form of a JCR Value, as defined in §3.6.4 Conversion of Values [1] */

The UnquotedLiteral is not further defined - the last hint only refers to how a string is mapped from non-string property types.

Don't know what the Jackrabbit SQL2 implementation expects here, anyone?

[0] http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.34%20Literal
[1] http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4%20Property%20Type%20Conversion

Cheers,
Alex

On 10.07.2013, at 19:28, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:

> Aloha
> 
> Should the following be a legal query?
> 
> SELECT data.quotes
>            FROM [nt:unstructured] AS data
>            WHERE data.quotes = "\"'"
> 
> When I run the PHPCR test suite with this query, sending the query via davex I get:
> 
> ) PHPCR\Tests\Query\CharacterTest::testPropertyWithQuotes
> PHPCR\Query\InvalidQueryException: HTTP 400: Query:
> 
>            SELECT data.quotes
>            FROM [nt:unstructured] AS data
>            WHERE data.quotes = "\"(*)'"
> 
> regards,
> Lukas Kahwe Smith
> smith@pooteeweet.org
> 
> 
>