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

What XML Schema data type is even less meaningful than the "string"data

  • From: Roger L Costello <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 10 May 2021 12:52:32 +0000

What XML Schema data type is even less meaningful than the "string"data
Hi Folks,

I just had a eureka moment. 

Most XSD data types indicate something meaningful about the data. Consider: 

- Ascribing to a data item the "date" type tells you a lot about the data item; namely, the data item is a date value such as 2021-05-10.

- Ascribing to a data item the "boolean" type tells you a lot about the data item; namely, the data item is a boolean value such as true.

- Ascribing to a data item the "integer" type tells you a lot about the data item; namely, the data item is an integer value such as 41. 

Conversely, ascribing to a data item the "string" type tells you nothing about the data item other than it consists of a series of bytes that can be interpreted as characters. That's not very meaningful since just about every data item in an XML document can be interpreted as characters. 

But, but, but, ...

I just realized that there is a data type that is even less meaningful. Do you know what XSD data type tells you even less than the "string" type? Scroll down to see the answer...


























Answer: The "hexBinary" type. It is the most meaningless data type -- ever! All it says is that the data is a series of bytes. Hmph! Every data item is a series of bytes. So, "hexBinary" tells you nothing about the data.

Note: meaningless does not mean useless. Treating a data item as a series of bytes is sometimes useful. For example, you might want to treat the metadata in a camera image (when the picture was taken, was a flash used, f-stop, shutter speed, etc.) as dates, booleans, decimals, integers, but you might want to treat the image data itself as a long series of uninterpreted bytes, i.e., as hexBinary.

/Roger



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.