[dsdl-discuss] Re: Datatypes

From: Martin Bryan <mtbryan@sgml.u-net.com>
Date: Wed May 29 2002 - 14:23:33 UTC

Eric

> I am still thinking that the framework can help here (by defining
> transformations to be performed between the parsed and the lexical spaces)
> and would really like to get feedback on my strawman!

Partly because I still have not got to grips with it. I particularly have
problems with where the data in the recombination example comes from:

<element name="foo">
 <if:process type="http://www.w3.org/TR/1999/REC-xpath-19991116"
value="concat(year, '-', month, '-', day)">
  <data type="xs:date"/>
 </if:process>
</element>

The real problem we have to contend with is the following:

<Date><Month>2</Month><Day>30</Day></Date>
<Time timezone="EST"><Hour>23</Hour><Minute>33</Minute></Time>

Now I've been deliberately awkward here (but wait until you see the later
examples!). The date is partial, and invalid, but the values of the
individual elements are valid. How do you tell the system that it must
combine the two siblings of date to get a date that needs to be validated as
a whole? How do you tell it to take current system parameters for missing
fields? Which element do you report the error under? The Time element is
valid, but before you can validate the time you have to do a conversion of
EST to -05:00. Who defines this transformation, and which part of the
standard does this come under? As far as the datatype spec is concerned all
it will do will say something along the lines "given a statement such
<dsdl-5:calendarLiteral dsdl-5:dtf="hh:mm-hh:mm"> 23:33-05:00
</dsdl-5:calendarLiteral> the system will report back <test result="valid"/>
to the node that generated the statement". What should it report back if it
finds an error? Should it state which part of the model was at fault? Which
one was it?

Now what happens if the input is in the following madly insane form:
<Date><Month xml-lang="fr">f&eacute;vrier</Month><Day>30th</Day></Date>
<Time timezone="CET"><Hour>24</Hour><Minute>01</Minute></Time>

I've added some extra problems here. What module is responsible for
converting f&eacute;vrier to 02, and stripping the suffix off 30th? (OK, you
shouldn't have both problems together, but they are both problems that may
need solving.) Does the 24:01 time mean that I have to increment the date by
one and convert the time to 00:01? If so, who determines whether the
incremented date is a valid one, and at what point in the process is the
correction and validation done? If the datatype spec does the update
automatically why shouldn't 30-02 just converted to either 02-03 or 01-03
automatically as well, depending on the value taken for the year parameter?
And how does the corrected value get sent back to the source?

Confused of Churchdown

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Wed May 29 10:41:21 2002

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC