You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michael Shoener <ms...@softwareapps.net> on 2009/10/15 17:27:14 UTC

What is allowed in the name of a property

I have a mixin that allows my users to define custom properties.  Are there
any characters that are not allowed in the name of a property (i.e. spaces,
semicolons, periods, etc)

I am asking because I have a custom property called "Form Name" which can
have any value.  When setting that property on the document and running a
query that should return results based on that property it returns none.

Any help would be appreciated.


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.



RE: What is allowed in the name of a property

Posted by Michael Shoener <ms...@softwareapps.net>.
Actually I looked back at the servlet I created that inserts the file into
the repository and it does NOT escape the property name (which happens to
contain a space in its name) and just adds the property to the node as is.

But when I query the repository I must escape the property value in order
for it to return my documents.

I thought the specs say the name of a property cannot contain a space. Am I
missing something?


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: Michael Shoener [mailto:mshoener@softwareapps.net] 
Sent: Thursday, October 15, 2009 2:08 PM
To: users@jackrabbit.apache.org
Subject: RE: What is allowed in the name of a property

I found out what I was doing wrong.

When saving the document into the repository you must ISO9075.encode() the
property name if it contains characters that need to be escaped (space,
pound sign, etc).

But you must also escape the same property name with the same
ISO9075.encode() when querying the repository.

Thanks for all of the help.


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: Michael Shoener [mailto:mshoener@softwareapps.net]
Sent: Thursday, October 15, 2009 1:22 PM
To: users@jackrabbit.apache.org
Subject: RE: What is allowed in the name of a property

Is there any way to escape the name of a property so it will be stored
properly and be able to be searched when querying the repository.

I tried using the "ISO9075.encode" function on the property name when saving
the document in the repository but it does not seem to help.

I tried querying using the original property name and the encoded name and
still no results in the query.


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: François Cassistat [mailto:f@maya-systems.com]
Sent: Thursday, October 15, 2009 12:52 PM
To: users@jackrabbit.apache.org
Subject: Re: What is allowed in the name of a property

As far as I know, / : [ ] | * ' " and whitespaces are all illegal characters
for names.


Frank


Le 09-10-15 à 11:27, Michael Shoener a écrit :

> I have a mixin that allows my users to define custom properties.   
> Are there
> any characters that are not allowed in the name of a property (i.e.  
> spaces,
> semicolons, periods, etc)
>
> I am asking because I have a custom property called "Form Name"  
> which can
> have any value.  When setting that property on the document and 
> running a query that should return results based on that property it 
> returns none.
>
> Any help would be appreciated.
>
>
> Best Regards,
>
> Michael Shoener
> Support Staff
> Software Application Services, Inc.
>
>


RE: What is allowed in the name of a property

Posted by Michael Shoener <ms...@softwareapps.net>.
I found out what I was doing wrong.

When saving the document into the repository you must ISO9075.encode() the
property name if it contains characters that need to be escaped (space,
pound sign, etc).

But you must also escape the same property name with the same
ISO9075.encode() when querying the repository.

Thanks for all of the help.


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: Michael Shoener [mailto:mshoener@softwareapps.net] 
Sent: Thursday, October 15, 2009 1:22 PM
To: users@jackrabbit.apache.org
Subject: RE: What is allowed in the name of a property

Is there any way to escape the name of a property so it will be stored
properly and be able to be searched when querying the repository.

I tried using the "ISO9075.encode" function on the property name when saving
the document in the repository but it does not seem to help.

I tried querying using the original property name and the encoded name and
still no results in the query.


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: François Cassistat [mailto:f@maya-systems.com]
Sent: Thursday, October 15, 2009 12:52 PM
To: users@jackrabbit.apache.org
Subject: Re: What is allowed in the name of a property

As far as I know, / : [ ] | * ' " and whitespaces are all illegal characters
for names.


Frank


Le 09-10-15 à 11:27, Michael Shoener a écrit :

> I have a mixin that allows my users to define custom properties.   
> Are there
> any characters that are not allowed in the name of a property (i.e.  
> spaces,
> semicolons, periods, etc)
>
> I am asking because I have a custom property called "Form Name"  
> which can
> have any value.  When setting that property on the document and 
> running a query that should return results based on that property it 
> returns none.
>
> Any help would be appreciated.
>
>
> Best Regards,
>
> Michael Shoener
> Support Staff
> Software Application Services, Inc.
>
>


RE: What is allowed in the name of a property

Posted by Michael Shoener <ms...@softwareapps.net>.
Is there any way to escape the name of a property so it will be stored
properly and be able to be searched when querying the repository.

I tried using the "ISO9075.encode" function on the property name when saving
the document in the repository but it does not seem to help.

I tried querying using the original property name and the encoded name and
still no results in the query.


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: François Cassistat [mailto:f@maya-systems.com] 
Sent: Thursday, October 15, 2009 12:52 PM
To: users@jackrabbit.apache.org
Subject: Re: What is allowed in the name of a property

As far as I know, / : [ ] | * ' " and whitespaces are all illegal characters
for names.


Frank


Le 09-10-15 à 11:27, Michael Shoener a écrit :

> I have a mixin that allows my users to define custom properties.   
> Are there
> any characters that are not allowed in the name of a property (i.e.  
> spaces,
> semicolons, periods, etc)
>
> I am asking because I have a custom property called "Form Name"  
> which can
> have any value.  When setting that property on the document and 
> running a query that should return results based on that property it 
> returns none.
>
> Any help would be appreciated.
>
>
> Best Regards,
>
> Michael Shoener
> Support Staff
> Software Application Services, Inc.
>
>


Re: What is allowed in the name of a property

Posted by François Cassistat <f...@maya-systems.com>.
As far as I know, / : [ ] | * ' " and whitespaces are all illegal  
characters for names.


Frank


Le 09-10-15 à 11:27, Michael Shoener a écrit :

> I have a mixin that allows my users to define custom properties.   
> Are there
> any characters that are not allowed in the name of a property (i.e.  
> spaces,
> semicolons, periods, etc)
>
> I am asking because I have a custom property called "Form Name"  
> which can
> have any value.  When setting that property on the document and  
> running a
> query that should return results based on that property it returns  
> none.
>
> Any help would be appreciated.
>
>
> Best Regards,
>
> Michael Shoener
> Support Staff
> Software Application Services, Inc.
>
>


Re: What is allowed in the name of a property

Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Oct 15, 2009 at 22:47, Marcel Reutegger
<ma...@gmx.net> wrote:
> see this recent thread: http://markmail.org/message/m6q5l6ljbqda23lf

The results of that thread can be found here:
http://wiki.apache.org/jackrabbit/EncodingAndEscaping

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: What is allowed in the name of a property

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

see this recent thread: http://markmail.org/message/m6q5l6ljbqda23lf

regards
 marcel

On Thu, Oct 15, 2009 at 17:27, Michael Shoener
<ms...@softwareapps.net> wrote:
> I have a mixin that allows my users to define custom properties.  Are there
> any characters that are not allowed in the name of a property (i.e. spaces,
> semicolons, periods, etc)
>
> I am asking because I have a custom property called "Form Name" which can
> have any value.  When setting that property on the document and running a
> query that should return results based on that property it returns none.
>
> Any help would be appreciated.
>
>
> Best Regards,
>
> Michael Shoener
> Support Staff
> Software Application Services, Inc.
>
>
>