You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xin wang <xv...@yahoo.com> on 2002/05/23 21:45:43 UTC

question about null integer

If I define an element to be of type integer --

<xs:element name="test" type="xs:integer"/>

Then I say

<test></test> in the xml file.

I get the following error

Message: Datatype error:
Type:InvalidDatatypeFacetException, Message: Empty
string encountered..

Is there any way to allow empty element of integer
type? I know I can make the element not appear when
it's null, or I can define it to be a string and use
regular expression to force all digits in the string.
Any better ways to handle this?

Thanks,

victoria

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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


RE: question about null integer

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

      yes, during that time was W3C XML Schema support gradually improving in
Xerces-C.

> Great, that worked! I tried that using version 1.5.2
> and it didn't work. Was this fixed somewhere between
> 1.5.2 and 1.7.0?
>
> victoria
>
> --- Radovan Chytracek <Ra...@cern.ch>
> wrote:
> > Hi,
> >
> >     try as:
> >
> > <xs:element name="test" type="xs:integer"
> > nillable="true"/>
> >
> > Cheers
> >
> >       Radovan
> >
> > > If I define an element to be of type integer --
> > >
> > > <xs:element name="test" type="xs:integer"/>
> > >
> > > Then I say
> > >
> > > <test></test> in the xml file.
> > >
> > > I get the following error
> > >
> > > Message: Datatype error:
> > > Type:InvalidDatatypeFacetException, Message: Empty
> > > string encountered..
> > >
> > > Is there any way to allow empty element of integer
> > > type? I know I can make the element not appear
> > when
> > > it's null, or I can define it to be a string and
> > use
> > > regular expression to force all digits in the
> > string.
> > > Any better ways to handle this?
> > >
> > > Thanks,
> > >
> > > victoria


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


RE: question about null integer

Posted by xin wang <xv...@yahoo.com>.
Great, that worked! I tried that using version 1.5.2
and it didn't work. Was this fixed somewhere between
1.5.2 and 1.7.0?

victoria

--- Radovan Chytracek <Ra...@cern.ch>
wrote:
> Hi,
> 
>     try as:
> 
> <xs:element name="test" type="xs:integer"
> nillable="true"/>
> 
> Cheers
> 
>       Radovan
> 
> > -----Original Message-----
> > From: xin wang [mailto:xvwang@yahoo.com]
> > Sent: Thursday, 23 May 2002 21:46
> > To: xerces-c-dev@xml.apache.org
> > Subject: question about null integer
> > 
> > 
> > If I define an element to be of type integer --
> > 
> > <xs:element name="test" type="xs:integer"/>
> > 
> > Then I say
> > 
> > <test></test> in the xml file.
> > 
> > I get the following error
> > 
> > Message: Datatype error:
> > Type:InvalidDatatypeFacetException, Message: Empty
> > string encountered..
> > 
> > Is there any way to allow empty element of integer
> > type? I know I can make the element not appear
> when
> > it's null, or I can define it to be a string and
> use
> > regular expression to force all digits in the
> string.
> > Any better ways to handle this?
> > 
> > Thanks,
> > 
> > victoria
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
> > 
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-c-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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


RE: question about null integer

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

    try as:

<xs:element name="test" type="xs:integer" nillable="true"/>

Cheers

      Radovan

> -----Original Message-----
> From: xin wang [mailto:xvwang@yahoo.com]
> Sent: Thursday, 23 May 2002 21:46
> To: xerces-c-dev@xml.apache.org
> Subject: question about null integer
> 
> 
> If I define an element to be of type integer --
> 
> <xs:element name="test" type="xs:integer"/>
> 
> Then I say
> 
> <test></test> in the xml file.
> 
> I get the following error
> 
> Message: Datatype error:
> Type:InvalidDatatypeFacetException, Message: Empty
> string encountered..
> 
> Is there any way to allow empty element of integer
> type? I know I can make the element not appear when
> it's null, or I can define it to be a string and use
> regular expression to force all digits in the string.
> Any better ways to handle this?
> 
> Thanks,
> 
> victoria
> 
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 

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