OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simpleType hh:mm:ss:ff



José Manuel Beas wrote:
> 
> Thanks Bob,
> 
> It's a hard work, I agree. But... is it possible to define:
> ----------
> <xsd:simpleType name="day">
>   <xsd:restriction base="xsd:number">
>     <xsd:minInclusive value="1"/>
>     <xsd:maxInclusive value="31"/>
>   </xsd:restriction>
> </xsd:simpleType>
> ----------
> 
> and define some kind of xsd:complexType as a "fussion" of day, month and
> year, but restricting the maximum bound of those components to something
> depending on the others (i.e., the max value of a day depends on the month
> value).????

You can't do this using W3C XML Schema.

The closest thing you could do is to derive by list, but it would be
assuming that:

1) the delimiter between components would be a white spaces.
2) the datatypes for all the "components" would be the same.

And the values wouldn't depend on each other.

This doesn't seem to match the requirement here...

IMHO, this is a perfect example where adding a rule (Schematron ?)
through an extension mechanism (SAF ?) would be perfect.

Eric

> Best Regards,
> --
> José Manuel Beas (jmbeas@telenium.es)
> Software Engineer
> TELENIUM, The New Millennium Telecom Company
> Agustín de Foxá, 25, plta. 13
> 28036 MADRID
> Tel. +34 91 315 85 62 (ext. 260)
> Fax +34 91 315 63 37
> http://www.telenium.es

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------