[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Combining float/string to specify value/units

  • From: Steve Rosenberry <steve.rosenberry@v...>
  • To: xml-dev@l...
  • Date: Sun, 25 Mar 2001 20:14:40 -0500

float string

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...

Thanks.

-- 
Steve Rosenberry
Sr. Partner

Electronic Solutions Company -- For the Home of Integration
http://ElectronicSolutionsCo.com

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

(610) 670-1710

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.