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

RE: can attribute in XML schema hold value and unit


xml floating point attribute
I have, for engineering values where the convention is that 4.0m and 4.00m represent different concepts (packing value, tolerance and units into the same string), used single attributes specifically to prevent people processing them using the standard decimal->floating point implementations in XML mapping tools. W3C Schema validiation in these cases was not important - the model was specified using RelaxNG and a implemented custom data types in Java server side.
 
Pete
-----Original Message-----
From: Michael Kay [mailto:mike@s...]
Sent: 03 March 2006 21:11
To: 'Mangesh Kalbhor'; xml-dev@l...
Subject: RE: can attribute in XML schema hold value and unit

It's certainly possible to pack the value and the unit of measure into one attribute and many XML vocabularies do this. However, it makes life a bit more difficult for anyone processing the XML, so two attributes might be better.
 
Michael Kay
http://www.saxonica.com/


From: Mangesh Kalbhor [mailto:Mangesh.Kalbhor@a...]
Sent: 03 March 2006 20:08
To: xml-dev@l...
Subject: can attribute in XML schema hold value and unit

Hi All,

 

I am creating a xml schema where I have to making a 'attribute' but can a attribute hold a value and unit.

My example is FlowRate, let's the value and unit could be 100 GPM.

Can I have just one attribute for 100 and GPM both. Some times it might be 80 cFPS.

 

So can a attribute hold both or do I need element here.

 

Thanks,

 

Mangesh

This email and any files attached are intended for the addressee and may contain information of a confidential nature. If you are not the intended recipient, be aware that this email was sent to you in error and you should not disclose, distribute, print, copy or make other use of this email or its attachments. Such actions, in fact, may be unlawful. In compliance with the various Regulations and Acts, General Dynamics UK Limited reserves the right to monitor (and examine for viruses) all emails and email attachments, both inbound and outbound. Email communications and their attachments may not be secure or error- or virus-free and the company does not accept liability or responsibility for such matters or the consequences thereof. Registered Office: 100 New Bridge Street, London EC4V 6JA. Registered in England and Wales No: 1911653.


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.