473,320 Members | 2,162 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,320 software developers and data experts.

hexBinary minLength Bug or Feature?


I have this defined in my schema:
<xsd:simpleType name="addressType">
<xsd:restriction base="xsd:hexBinary">
<xsd:minLength value="1"/>
<xsd:maxLength value="8"/>
</xsd:restriction>
</xsd:simpleType>

I was hoping this would allow values to be entered
like "00" and "FFFFFFFFFFFFFFFF"; however,
what I'm finding with oXygen and Xerces is that
only values like "0000000000000000" and "FFFFFFFFFFFFFFFF"
are being allowed. In other words, I'm required to type all 16 digits of the
maxLength-sized hex number in order to be valid.

Is this correct behavior for minLength and maxLength of a hexBinary value?
Maybe I'm trying to use hexBinary incorrectly.

--
Don Adams
Jul 20 '05 #1
1 2010

I found the problem. I was testing values against minLength
and maxLength that had an odd number of digits. For example, "0"
instead of "00" and "123" instead of "1234". It does work correctly
when the test value has an even number of digits.

I was thinking that hexBinary was a way to enter integers in hex format,
but that isn't quite right. I think I will use this instead:

<xsd:simpleType name="hexstringType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0123456789abcdefABCDEF]*"/>
</xsd:restriction>
</xsd:simpleType>

--
Don
Jul 20 '05 #2

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

Similar topics

3
by: dayzman | last post by:
Hi, I've read somewhere that feature-based analysis can be used to extract the semantic structure of HTML documents. By semantic structure, they mean the model of the rendered view a reader...
5
by: scsharma | last post by:
Hi, I am using .Net on Windows XP Professional. I am facing a unique problem with visual studio where intellisense feature is getting turned off. If i close IDE and reopen my solution the...
7
by: ray | last post by:
My xsd has the following element: <xs:element name="Company" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1" /> <xs:maxLength value="5" />...
4
by: christopher diggins | last post by:
A feature that I find signficantly missing in C# is the ability to write functions in interfaces that can call other functions of the interface. Given an interface ISomeInteface the only way we can...
18
by: Kamen Yotov | last post by:
hi all, i first posted this on http://msdn.microsoft.com/vcsharp/team/language/ask/default.aspx (ask a c# language designer) a couple of days ago, but no response so far... therefore, i am...
30
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None,...
12
by: Raymond Hettinger | last post by:
I am evaluating a request for an alternate version of itertools.izip() that has a None fill-in feature like the built-in map function: >>> map(None, 'abc', '12345') # demonstrate map's None...
3
by: xxyyzz | last post by:
Please help me out 1. What is meant by HexBinary Encoding,how is this done? 2. How must i convert a IPv4 Address to HexBinary Format ??? Thnx Fernando
10
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.