Paul Sandoz wrote:
> Alan Hudson wrote:
>
>> Paul Sandoz wrote:
>>
>>> Hi,
>>>
>>> Some people on this list may be interested in this blog i just wrote:
>>>
>>> http://blogs.sun.com/roller/page/sandoz?entry=realistic_generation_and_use_of
>>>
>>
>>
>> Very nice work.
>>
>> I think a next stage will be to assign encoders based on the schema
>> type. I expect just using the builtin ones like ints/floats will save
>> a fair bit of space.
>>
>
> Yes, very good point.
>
> It should be possible to extend the SchemaProcessor to have a methods to
> obtain two Map<QName, QName> for elements and attributes that maps an
> element/attribute to a QName of a simple data type or a list of simple
> data type (so it is easy to support arrays).
>
This is likely too simple to handle nested duplicate names. ie
Customer.Address_at_zip and Vendor.Address_at_zip where zip is a String in one
and an int in another. Something that indexes xpath expressions to a
datatype is likely needed.
> I did have a quick look at the XSOM API to determine if an
> element/attribute declaration corresponds to a simple type or a list of
> simple type, but it is not obvious because some schema can have one or
> more levels of indirection.
>
xerces had some facilities for this. I need to relook at my XSBC code
to see what I did for that. Never got it totally working. When walking
a document you could get back the datatype of the current
element/attribute in traversal.
--
Alan Hudson
President Yumetech, Inc. www.yumetech.com
President Web3D Consortium www.web3d.org
206 340 8900