2007/5/2, Evgeny Egorochkin <<a href="mailto:phreedom.stdin@gmail.com">phreedom.stdin@gmail.com</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wednesday 02 May 2007 15:26:14 Sebastian Trüg wrote:<br>> > $TYPE(required)<br>> > Property data type.<br>> > Valid values: string, string_enum, string_enum_ext, integer, float,<br>> > boolean, datetime, binary.
<br>> > string_enum type is a property that can only take one of the list of<br>> > valid values provided by $VALUES.<br>> > string_enum_ext type is a property that can take any string value,<br>> > however $values list provides
<br>> > suggested values of this property.<br>><br>> How about using xml schema types here. That way a later mapping to RDF will<br>> be easy and Nepomuk can stay compatible without an artificial mapping. The
<br>> only problem here are the enumerations. XML Schema does support creating<br>> enumerations but I think they are complex types. How about this: the type<br>> will stay a string or an int or whatever. But if the VALUES field is set it
<br>> is to be treated as an enumeration. I don't think we need the extra types<br>> here.<br><br>You can have a string type instead of 3: string, string_enum, string_enum_ext.<br>This information is in fact redunant. This was done only to improve
<br>readability.</blockquote><div><br><br>I don't think we should allow *all* simple types from xml schema (for example the duration type seems out of place). So string, boolean, double, date - which maps to the obvious counterparts (date maps to dateTime).
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> > $VALUES(required if $TYPE=string_enum or string_enum_ext),<br>> > $LOCALIZED_VALUES Property value constraints. Default = no constraints.
<br>> > if $TYPE=integer|datetime|float, $VALUES=value1|value2|value3<br>> > if $TYPE=string, $VALUES=validation regexp<br>> > if $TYPE=string_enum, $VALUES=value1|value2|value3<br>> > if $TYPE=string_enum_ext, $VALUES=value1|value2|value3|*(or)
<br>> > This syntax lets us directly use $VALUES as a regexp for validating<br>> > user input. Yet it's syntax<br>> > is developer- and translator- friendly.<br>> > Suggestions on regex subset are welcome. KDE and Strigi is going to use
<br>> > QValidator and QRegExp for this.<br>> ><br>> > $RANGE<br>> > Numeric property allowed value range. Default = no constraints.<br>> > $RANGE=[minValue,maxValue><br>> > [ and ] = inclusive. < and > = exclusive.
<br>><br>> Actually there is no need to have RANGE and VALUES. Just merge them into<br>> range:<br>> RANGE=1,4,5,2.3<br>> RANGE=1-7<br>> RANGE=hello,bello,wello<br><br>The idea behind values= was to:<br>
1) allow regexps<br>2) seamlessly integrate enumerations into these regexps<br>3) have a compact, clean format for this.</blockquote><div><br>Ok, I can see the point in removing string_enum and string _enum_ext and I like Sebastians proposal. What is exactly the idea behind string_enum_ext anyway? If you can use arbitrary values outside the enumeration then what's the point of the enumeration?
<br><br>Also, why do we need to enforce that metadata matches a regexp? Wouldn't it be enough that the spec defined that we URI field should contain a qualified uri?<br></div><br><br>Also i think it might suffice to specify numeric ranges like
1.5-3.756 and not use brackets as suggested - {=inclusive, <=exclusive... Just define that all ranges are inclusive.<br><br>Cheers,<br>Mikkel<br></div>