Dare Obasanjo wrote

...,
>
> is added as well as an error code be added in ErrorCodes such as
>
>     UNSUPPORTED_RESOURCE_TYPE
>
> which can be one of the specified error codes when an XMLDBException is
thrown
> from a
>
>     Collection#storeResource( )
>
> call. That is if this is the direction the XML:DB API decides to go in.

I agree. I don;t think there is an absolute need to add types to the XML:DB
API, as this is something that will be implemented by the underlying
services e.g. XPath 2.0 or XQuery. Types are a slippery slope, and the trick
may be to add just enough to make working with them bearable, without
getting into the nitty gritty details of the XQuery Formal Semantics.

So for the present, you can get your "count(...)" as a DOM (text) Node which
you can parse as an integer. But the request to deal with integers as
integers whether as the result of a query or as an item in the database is
one that is apparently widespread, and I suspect that in the long term we
will need to deal with this issue one way or another.

I do understand your reaction against dealing with XML items as binary
datatypes e.g. integers and floats. I had the same initial reaction to XML
Schema. It really is the tension between the XML instance document and the
"PSVI". I have managed to get confortable with this idea by repeating to
myself "there is always a textual representation..."

In any case for your Excelon implementation, you _can_ represent any result
of an XPath 1.0 query as a DOM Node understanding that simple types are
returned as Text Nodes. If you are happy with this then fine (I would not be
totally happy) otherwise we do need a mechanism for the general
representation of atomic datatypes such as integers.

Jonathan


----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to