2007/5/2, Evgeny Egorochkin &lt;<a href="mailto:phreedom.stdin@gmail.com">phreedom.stdin@gmail.com</a>&gt;:<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>&gt; &gt; $TYPE(required)<br>&gt; &gt;&nbsp;&nbsp; Property data type.<br>&gt; &gt;&nbsp;&nbsp; Valid values: string, string_enum, string_enum_ext, integer, float,<br>&gt; &gt; boolean, datetime, binary.
<br>&gt; &gt;&nbsp;&nbsp; string_enum type is a property that can only take one of the list of<br>&gt; &gt; valid values provided by $VALUES.<br>&gt; &gt;&nbsp;&nbsp; string_enum_ext type is a property that can take any string value,<br>&gt; &gt; however $values list provides
<br>&gt; &gt;&nbsp;&nbsp; suggested values of this property.<br>&gt;<br>&gt; How about using xml schema types here. That way a later mapping to RDF will<br>&gt; be easy and Nepomuk can stay compatible without an artificial mapping. The
<br>&gt; only problem here are the enumerations. XML Schema does support creating<br>&gt; enumerations but I think they are complex types. How about this: the type<br>&gt; will stay a string or an int or whatever. But if the VALUES field is set it
<br>&gt; is to be treated as an enumeration. I don&#39;t think we need the extra types<br>&gt; 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&#39;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>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; &gt; $VALUES(required if $TYPE=string_enum or string_enum_ext),<br>&gt; &gt; $LOCALIZED_VALUES Property value constraints. Default =&nbsp;&nbsp;no constraints.
<br>&gt; &gt;&nbsp;&nbsp; if $TYPE=integer|datetime|float, $VALUES=value1|value2|value3<br>&gt; &gt;&nbsp;&nbsp; if $TYPE=string, $VALUES=validation regexp<br>&gt; &gt;&nbsp;&nbsp; if $TYPE=string_enum, $VALUES=value1|value2|value3<br>&gt; &gt;&nbsp;&nbsp; if $TYPE=string_enum_ext, $VALUES=value1|value2|value3|*(or)
<br>&gt; &gt;&nbsp;&nbsp; This syntax lets us directly use $VALUES as a regexp for validating<br>&gt; &gt; user input. Yet it&#39;s syntax<br>&gt; &gt;&nbsp;&nbsp; is developer- and translator- friendly.<br>&gt; &gt;&nbsp;&nbsp; Suggestions on regex subset are welcome. KDE and Strigi is going to use
<br>&gt; &gt; QValidator and QRegExp for this.<br>&gt; &gt;<br>&gt; &gt; $RANGE<br>&gt; &gt;&nbsp;&nbsp; Numeric property allowed value range. Default = no constraints.<br>&gt; &gt;&nbsp;&nbsp; $RANGE=[minValue,maxValue&gt;<br>&gt; &gt;&nbsp;&nbsp; [ and ] = inclusive. &lt; and &gt; = exclusive.
<br>&gt;<br>&gt; Actually there is no need to have RANGE and VALUES. Just merge them into<br>&gt; range:<br>&gt; RANGE=1,4,5,2.3<br>&gt; RANGE=1-7<br>&gt; 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&#39;s the point of the enumeration?
<br><br>Also, why do we need to enforce that metadata matches a regexp? Wouldn&#39;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, &lt;=exclusive... Just define that all ranges are inclusive.<br><br>Cheers,<br>Mikkel<br></div>