Subject: Text value data type in iCal

From: "Mike Hixson" <[email-masked]>
Date: Wed, 17 Jul 2002 00:51:04 -0700

Hi All,

Anyone know if the text value data type in iCal has been updated to include a requirement for the equals sign to be escaped? The reason I ask is because I don't see how to distinguish between a property that has a structured value and one that just has a regular value -- both of which are defined as valid TEXT types. For example:

Property with a text value as a structured value (I don't know of a real text property that uses structured values so I made one up):
MYPROP:FREQ=YEARLY

Property with a regular text value:
DESCRIPTION:MONKEY=FUN

If the second example were like the following there would be no problem:
DESCRIPTION:MONKEY\=FUN

Also, anyone know where I can find the ABNF or more info for a structured value? Specifically, I'm looking for the valid characters for the TEXT and VALUE parts of a structured value. Only discussion about structured values in iCal is:

4.1.1
   Some property values are defined in terms of multiple parts. These
   structured property values MUST have their value parts separated by a
   SEMICOLON character (US-ASCII decimal 59).

4.3.11
   The "TEXT" property values may also contain special characters that
   are used to signify delimiters, such as a COMMA character for lists
   of values or a SEMICOLON character for structured values.

Regards,
Mike

Fact - Over 85% of viruses enter networks via e-mail.
This message has been scanned for viruses and delivered by Rockliffe MailSite.
http://www.rockliffe.com/products/av

---

From: "Mike Hixson" <[email-masked]>
Date: Wed, 17 Jul 2002 02:27:17 -0700

> Uhm... it's my understanding that structured types are expressed
> using parameters, so that your example would become something like:
>
> MYPROP;FREQ=YEARLY:value
>
> DESCRIPTION:MONKEY=FUN  would be no problem.

This is what I thought too until I read section 4.1.1 in iCal. In that
section there are the following two paragraphs:

This says that property *value* can be a structured value. I also found an
example of this on page 44 of iCal
RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1

   Some properties allow a list of parameters. Each property parameter
   in a list of property parameters MUST be separated by a SEMICOLON
   character (US-ASCII decimal 59).

This paragraph directly follows, which discusses list of parameters. So a
property value *can* have structured values, unless I'm not reading these
paragraphs right?

-Mike

----- Original Message -----
From: "Andrea Campi" <[email-masked]>
To: "Mike Hixson" <[email-masked]>
Sent: Wednesday, July 17, 2002 1:55 AM
Subject: Re: Text value data type in iCal

> On Wed, Jul 17, 2002 at 12:51:04AM -0700, Mike Hixson wrote:
> > Hi All,
> >
> > Anyone know if the text value data type in iCal has been updated to
include a requirement for the equals sign to be escaped? The reason I ask is
because I don't see how to distinguish between a property that has a
structured value and one that just has a regular value -- both of which are
defined as valid TEXT types. For example:
> >
> > Property with a text value as a structured value (I don't know of a real
text property that uses structured values so I made one up):
> > Also, anyone know where I can find the ABNF or more info for a
structured value? Specifically, I'm looking for the valid characters for the
TEXT and VALUE parts of a structured value. Only discussion about structured
values in iCal is:
> >
>
> Uhm... it's my understanding that structured types are expressed
> using parameters, so that your example would become something like:
>
> MYPROP;FREQ=YEARLY:value
>
> DESCRIPTION:MONKEY=FUN  would be no problem.
>
> Bye,
> Andrea
>
> --
> Andrea Campi                              mailto:[email-masked]
> I.NET S.p.A.                              http://www.inet.it
> Direzione Tecnica - R&D   phone: +39 02 32863 ext 1
> v. Darwin, 85 - I-20019   fax: +39 02 32863 ext 7705
> Settimo Milanese (MI), Italy
>

---

From: Andrea Campi <[email-masked]>
Date: Wed, 17 Jul 2002 11:39:18 +0200

> property value *can* have structured values, unless I'm not reading these

You are right, I didn't really understand the question, sorry. But
still I don't see any reason to change anything.

What you quote says exactly that "some property values are defined
in terms of multiple parts". The only such value (that I can think
ok) is RECUR, and it's properly defined in such a way not to cause
ambiguity. No other value type allows for multiple parts (in particular
TEXT, which you used in your example, doesn't), so RFC2445 is
perfectly consistent.

The problem would exist if there were (or a future revision introduced)
a value type like:

	example = "A" "=" "something"
		(";" text)

or 

	example = "A" "=" "something"
		(";" "B" "=" text)

But as things stand, IMHOwe're perfectly safe.

Bye,
	Andrea

---

From: John Stracke <[email-masked]>
Date: Wed, 17 Jul 2002 09:04:15 -0400

Mike Hixson wrote:

> include a requirement for the equals sign to be escaped? The reason I 
> ask is because I don't see how to distinguish between a property that 
> has a structured value and one that just has a regular value -- both 
> of which are defined as valid TEXT types. For example:
> <http://www.rockliffe.com/products/av/> 

You can't parse a property value unless you know the definition of the 
property.

-- 
/========================================================\
|John Stracke                    |Principal Engineer     |
[email-masked]   |Incentive Systems, Inc.|
|http://www.incentivesystems.com |My opinions are my own.|
|========================================================|
|This is the .sig that says... Ni!                       |
\========================================================/

---

From: [email-masked]
Date: Wed, 17 Jul 2002 11:38:50 -0400

> property value *can* have structured values, unless I'm not reading 
these

They have structured data types, NOT structured TEXT.  The ABNF for RRULE 
(Section 4.8.5.4 Recurrence Rule) defines the RRULE as:

     rrule      = "RRULE" rrulparam ":" recur CRLF

and 'recur' is defined in Section 4.3.10 Recurrence Rule and that adheres 
to the text you cited in Section 4.1.1.

Bruce
===========================================================================
Bruce Kahn                                INet: 
[email-masked]
Messaging & Collaboration                 Phone: 978.399.6496
IBM Software Group                         FAX: and nothing but the FAX...
Standard disclaimers apply, even where prohibited by law...

---

From: "Mike Hixson" <[email-masked]>
Date: Wed, 17 Jul 2002 11:11:11 -0700

I was afraid of that. Well back to the drawing board :o). Thanks John.

-Mike

---

From: John Stracke <[email-masked]>
Date: Wed, 17 Jul 2002 14:34:51 -0400

>I was afraid of that. Well back to the drawing board :o). Thanks John.
Actually, I think I spoke too soon--Bruce's post reminded me that the 
structured property values are typed.  IIRC, what I did when I wrote a 
parser (about 1.5-2 years ago, I think) was to have methods for parsing 
each type, and a hashtable mapping properties to their default types.

---

From: "Mike Hixson" <[email-masked]>
Date: Wed, 17 Jul 2002 22:16:22 -0700

Thanks guys, your comments have been very helpful.

Regards,
Mike