Andrea, I don't have any good solutions for you, just a couple of observations:
(1) app-schema never deals with feature arrays because delivers a stream of features that the existing encoder FeatureCollection infrastructure deals with. I'm suspect that any attempt to use feature arrays with app-schema may have problems because of the need to remove duplicate ids and convert to xlink:href. I have never seen app-schema used with arrays other than the top level, and we always deploy GeoServer to use featureMember not featureMembers. (2) I see you used ApplicationSchemaXSD/ApplicationSchemaConfiguration; these are not from app-schema. We use custom AppSchemaXSD/AppSchemaConfiguration to hook into gt-app-schema-resolver and have better resource path handling behaviour for cross-package schema resolution. I don't think this makes any difference in your case. Anyway, I feel that the ability to encode complex features is hanging by a thread, and it took us years to get to this point! It is very complicated, and nailed into place by a gigantic unit test infrastructure. I am not surprised that you have suffered getting this example to work. You and Justin should buy each other a drink. You both need and deserve it. Kind regards, Ben. On 18/03/11 16:16, Andrea Aime wrote: > On Thu, Mar 17, 2011 at 5:21 PM, Andrea Aime > <[email protected]> wrote: >> I have better than that now, a small self contained example that anybody can >> run >> if they dare sharing my pain :-) > > I eventually managed to solve the issue myself, though I went down a road that > seems to work more by accident than by design and it's a path that does not > seem to be taken by the app-schema store (which is what I was trying to > mimick). > > What I did eventually was to look into the bindings and found > FeatureArrayPropertyTypeBinding > that seemed to fit the bill, so I changed the featues property from a > complex one back > to a simple one (ugh?) that is bound to feature collection, then > changed the schema > to use a generic element of type gml:FeatureArrayPropertyType, with no > link whatsoever > to its actual contents, set the feature collection into the features > property as is, > and voilà, it worked. > > However it seems wrong from various points of view: > - the features property is not a simple one, that baby is a complex, > it's a property that > contains a list of elements, not a primitive value > - the schema is broken, it's not enforcing that the contents of the > features element has > to be made of bugsites > > I'll have to go down this road as I'm already way past my deadlines > but I'd still be grateful > if someone can provide a solution that does not require summing a set of > wrongs > to just get a valid result... > > I've attached the files modified compared to yesterday's zip > > Cheers > An drea > -- Ben Caradoc-Davies <[email protected]> Software Engineering Team Leader CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
