473,547 Members | 2,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>12245 6></Pressure>
<Temperature>23 </Temperature>
</Sample>
<Sample>
<Pressure>13224 5></Pressure>
<Temperature>27 </Temperature>
</Sample>
<Sample>
<Pressure>17224 5></Pressure>
<Temperature>32 </Temperature>
</Sample>
</DataLog>

What would a logical XML schema look like?

<xs:complexTy pe name="LogData" >
<xs:complexTy pe name="Sample" >
<xs:element name="Pressure" type="xs:???">
<xs:element name="Temperatu re" type="xs:unsign edByte">
</xs:complexType>
</xs:complexType>

Thanks in advance for any tips or suggestions,

-Ed
Nov 11 '05 #1
1 1853
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:simpleTyp e>
<xs:restricti on base="xs:int">
<xs:minInclusiv e value="0"/>
<xs:maxInclusiv e 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
1570
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 the third one output false, can anyone tell me why this happen? thanx. <% response.write Date + 10 * 1 / 24 response.write ((Date + 8 * 1 / 24) +...
1
2287
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 mean "multiple character encoding schemes". >> Yes, although a different character set would imply a different >> encoding scheme. > >Absolutely not....
5
2007
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 23.30 the previous day. This is straightforward when dealing with positive times. But when negative times are introduced (as above) it all gets...
22
2968
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 understanding is that a double has nonuniform precision throughout its value range. Will a double always be able to exactly represent any value of type int? ...
2
1698
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 = "fr" End Enum
1
2434
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 article that we can represent image in binary format and then somehow represent this code in javascript to show it on the browser. I have converted the...
2
1059
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
5456
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
1917
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 at deltaX = Xmax/N where Xi = (i-1/2)*deltaX, i = 1, 2, 3,...N. Furthermore there are cell interfaces located at Xi+1/2 and Xi-1/2 and each...
2
1335
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 represent this by infinity, is there any way I could represent a very large number in java?
0
7510
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7437
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7703
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7463
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7797
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3493
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.