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]

Combining float/string to specify value/units

I tossed this out in microsoft.public.xml and got no takers, so either
its a real softball question I should have found in the spec (I tried,
but still have trouble understanding the intricacies of that "little"
document), it went way over everyone's head (doubt it since the xml-dev
archive touched on it in a slightly different manner and the concept
isn't that tough), or it's just badly worded (very possible!).  If it's
the latter, let me know and I'll take another shot at it.

So without further ado:

Is it possible to derive an attribute type from a float primitive with
an appended string indicating the physical units associated with the
value?  For example, I'd like to validate the following examples of
attribute values:

        12.0 seconds
        1.11 msecs
        3.05 mins

as a float followed by a restricted enumeration of allowable time
intervals.  If by chance, there is a time type that already does this,
let me know, but specifying just time units isn't my only issue.  I'm
interested in specifying any generic units i.e. db, knots, Hz, %'s (e.g.
10%) etc...

Heck, at this point, if I have to derive from string and specify the
complete pattern for each, I'll do that, but then my question is where
do I find the pattern that currently specifies a float primitive?  Cause
I know I won't get that piece correct for all its possibilities...


Steve Rosenberry
Sr. Partner

Electronic Solutions Company -- For the Home of Integration

http://BetterGoBids.com -- The Premier GoTo Bid Management Tool

(610) 670-1710