Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XSDConstrainingFacet.getEffectiveValue().toString()
XSDConstrainingFacet.getEffectiveValue().toString() [message #588072] Thu, 03 June 2004 15:59
Paul Cooper is currently offline Paul CooperFriend
Messages: 11
Registered: July 2009
Junior Member
I've been playing with Facets on simple types and I've encountered
exceptions being thrown when I call the toString() method on the
effective values of certain types of facet. For example, if I call it
for a hexBinary value in an enumeration as in the following example:

<schema targetNamespace="http://com/schemas/Example"
<complexType name="CAType">
<element name="el60" type="xsd1:type60"/>

<simpleType name="type60">
<restriction base="hexBinary">
<enumeration value="0FB7ff01"/>
<enumeration value="0F56CCAABBAA"/>
<enumeration value="CABBA9E5000000"/>

I get:

java.lang.ArrayIndexOutOfBoundsException: -5
at org.eclipse.xsd.impl.type.DataValue$HexBin.encode(DataValue. java:454)
org.eclipse.xsd.impl.type.XSDHexBinaryType.getCanonicalLiter al(
org.eclipse.xsd.impl.type.XSDAnySimpleType$ByteSequence.toSt ring(
at java.lang.String.valueOf(
at org.eclipse.emf.common.util.BasicEList.toString(BasicEList.j ava:1112)

Is there a better way for me to query these values or is this a bug?
I've also seen oddities when querying the value of time related simple
types, for example:

<simpleType name="type50">
<restriction base="gMonthDay">
<minInclusive value="--01-31+01:00"/>
<maxExclusive value="--02-07"/>

The timezone seems to be replaced with an undisplayable character such
as the values: '--1-30Z' or '--2-7?'

Is there a way that I can retrieve those values from a schema in a
displayable way that doesn't require special logic for each data type?


Previous Topic:maxLength not permitted in string
Next Topic:XSDConstrainingFacet.getEffectiveValue().toString()
Goto Forum:

Current Time: Mon Oct 26 07:09:32 GMT 2020

Powered by FUDForum. Page generated in 0.02190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top