Jody and Justin,

I am having trouble understanding the use of GeoAPI 2.2 
ComplexAttribute, particularly for complex types with simple content. As 
I noted earlier, GML3 on trunk binds every ComplexAttribute, including 
CodeType, to Collection. I now suspect that my problems are in GeoAPI 
2.2 (or my understanding of it), not just in the GeoTools GML3 
implementation.

Here is a concrete example. gml:name is a gml:CodeType, which is an 
xs:complexType with xs:simpleContent that extends xs:string and adds a 
codeSpace attribute. For example:

<gml:name codeSpace="urn:x-something:whatever">SCOPED_IDENTIFIER</name>

In the old GeoTools 2.4.x community-schemas feature model (fm), based on 
geoapi-nogenerics 2.1.0, ComplexAttributeImpl had a value (any Object) 
which would have in this case been the string "SCOPED_IDENTIFIER", and 
the codeSpace was smuggled in a user-data map and unpacked at encoding 
time by some horrible binding override.

In GeoAPI 2.2, ComplexAttribute has a value that is a 
Collection<Property>. The codeSpace could be a Property in this 
collection, but where should the content string "SCOPED_IDENTIFIER" go? 
Or am I barking up the wrong tree?

Does GeoAPI 2.2 support xs:complexType with xs:simpleContent?

How would you model my gml:name example in GeoAPI 2.2?

In a nutshell, the problem appears to be that XML allows a node to have 
content and attributes/children, while GeoAPI 2.2 allows only 
attributes/children (properties).

As an aside, do you have any examples showing how XML documents should 
be converted into GeoAPI 2.2? There are some minimal snippets in the 
javadoc, but these cover few cases.

Kind regards,

-- 
Ben Caradoc-Davies <[EMAIL PROTECTED]>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to