473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How represent 24-bit data types in XML Schema? Limits?

I have data from an embedded device that I want to represent as an XML
schema. Each data sample in the device's data log consists of a 24-bit
pressure value plus a 1 byte temperature value. I am an XML schema newbie.

A 24-bit unsigned integer value has a range of 0 to 8388607. Is there some
way I can represent this in an XML schema?

Here is what the data looks like:

<DataLog>
<Sample>
<Pressure>122456></Pressure>
<Temperature>23</Temperature>
</Sample>
<Sample>
<Pressure>132245></Pressure>
<Temperature>27</Temperature>
</Sample>
<Sample>
<Pressure>172245></Pressure>
<Temperature>32</Temperature>
</Sample>
</DataLog>

What would a logical XML schema look like?

<xs:complexType name="LogData" >
<xs:complexType name="Sample" >
<xs:element name="Pressure" type="xs:???">
<xs:element name="Temperature" type="xs:unsignedByte">
</xs:complexType>
</xs:complexType>

Thanks in advance for any tips or suggestions,

-Ed
Nov 11 '05 #1
1 1847
Ed Sutton wrote:
I have data from an embedded device that I want to represent as an XML
schema. Each data sample in the device's data log consists of a 24-bit
pressure value plus a 1 byte temperature value. I am an XML schema newbie.

A 24-bit unsigned integer value has a range of 0 to 8388607. Is there some
way I can represent this in an XML schema?


<xs:element name="Pressure">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="8388607"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Pan Yang Bin | last post by:
Hi, I using the following script to output 10 o'clock, the first two return corrent result, and i also check the year, month, day, hour, minute, second function they all return same result. but...
1
by: lkrubner | last post by:
>Alan J. Flavell Oct 7 2004, 1:44 pm show options >>On Thu, 7 Oct 2004, Shmuel (Seymour J.) Metz wrote: >> at 08:24 PM, "Alan J. Flavell" <flav...@ph.gla.ac.uk> said: >> >I think you...
5
by: marty | last post by:
As part of an assignment I need to calculate a 24 hour time by subtracting a one time from another e.g. if the user enters 1.00 as the time and 1.30 as the time to subtract the returned time is...
22
by: Fred Ma | last post by:
I'm using the expression "int a = ceil( SomeDouble )". The man page says that ceil returns the smallest integer that is not less than SomeDouble, represented as a double. However, my...
2
by: guoqi zheng | last post by:
We can enum to represent a interger using a string. But how can we use enum to represent string below is what I want to achieve. Public Enum country Netherlands = "nl" America = "US" France...
1
by: fyeq | last post by:
I have a requirement of presenting individual HTML pages without their dependecy on fetching image files from webservers. The biggest problem is how to embedd images in this scenario. I read in an...
2
by: ahmadmsc | last post by:
how can i represent image in vb.net ? i need to represent the image into a file for segmentation
6
by: mrdoommaster | last post by:
Hi, How do I represent a constructor in UML? Say I have a class named Foo. Would it look like so: +Foo( some_val : int ) Is the above correct? Thanks for reading.
1
by: steve | last post by:
Hi, I am working on a finite-volume numerical method project. I am not great at programming though. I am looking for the best way to represent this grid in C. The grid consists of N points spaced...
2
thatos
by: thatos | last post by:
I'm trying to write an algorithm which determines the shortest path between cities. So I have looked at some high level languages of the algorithms, if the is no path between two vertices, they...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.