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: A query in xml schema..



From: Venugopal Siripuram <svenu@wilco-int.com>
 > i want xml schema to validate  a "cost" element  where cost can be in
>dollars or in Rupees..
> That is, cost element can be any thing like this..   $11678.25 or
>Rs11678.25

Sorry, there are no composite types in XML Schemas.  Your choices are
either:

   *  a token, using a regular expression
   * a list of legnth 2 of the union of a currency enumeration and a
double--but in this
case you must use space separator between the $ (or the Rs) and the number.

>  The values sucessed by "$" or "Rs" should be a double value not string
> for example  $\d{1,10}.\d{1,2} does n`t work for me, bcoz, in that case
the
>values sucessed by "$" or "Rs" are strings
>  Please do write a solution if it exist..

XML Schemas 1.0 excluded support for composite data types (notations, which
need
"microparsing") or localized lexical forms.  It wants elements and
attributes to be
used to delimit different parts of data.

The more that people say "this is unacceptable", the greater the chances
that it may
be dealt with in XML Schemas 1.1, and not in XML Schemas 2.0, I suppose.  In
my
view, it is a serious ommission that means that XML Schemas, in effect,
requires a smart front end to convert from human-friendly notations for
currency (and dates) into
space-delimited tokenized forms.

Cheers
Rick Jelliffe