You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Don Adams <dg...@sgi.com> on 2004/03/01 21:40:03 UTC

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


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: hexBinary minLength Bug or Feature?

Posted by Neil Delima <nd...@ca.ibm.com>.



Hi Don,

This works for me, atleast with Xerces-2J2.6.1.  What error do you get if
you try to validate your instance using the sax or dom .Counter Xerces
sample?

Neil.




                                                                           
             "Don Adams"                                                   
             <dg...@sgi.com>                                                 
                                                                        To 
             03/01/2004 03:40          <xe...@xml.apache.org>      
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         hexBinary minLength Bug or Feature? 
               xerces-j-user                                               
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





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


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org