From: Andrea A. <and...@ge...> - 2010-10-08 06:18:34
|
On Fri, Oct 8, 2010 at 7:58 AM, Ben Caradoc-Davies <Ben...@cs...> wrote: > Aha, yes, of course! Sorry Andrea, I missed this one. You are completely > right. > > You know this, but for the benefit of the wider audience: > > Page 22 of the GML 3.1.1 specification (OGC 03-105r1), section 7.4.3 (it > took me ages to find this), states: "An element is a GML property if and > only if it is a child element of a GML object. No GML object may appear as > the immediate child of a GML object. Consequently, no element may be both a > GML object and a GML property." > > A schema that does not follow this rule is not a GML application schema, and > is not supported by app-schema. > > Simon Cox calls this the GML "striping rule". The effect is that instance > documents are encoded with TypeName/propertyName/TypeName/propertyName/..., > the effect of which is that: > (1) type information is encoded at every second level, fixing one of the > huge gaps in modelling polymorphic objects in XML (type uncertainty) > (2) there is a place to encode references (xlink:href) of objects that are > absent (on the property). > > This rule makes XML follow the same pattern as a UML diagram: GML properties > are the associations between entities, the only way entities can be > connected, and only exist in this role. > > Although the impact of the striping rule was not immediately obvious when I > first read it, in my view it is an inspired piece of design. Ouch, this is really nasty, for the few complex schemas I've seen none of them follows such GML rules, just uses GML as a building block. This will make using app-schema store problematic. So far I'm working around this and other limitations by creating an amended target schema that the store can use and the xslt towards the real deal, but we both know supporting xlst two ways is problematic at best. Well, good to know for next time I'll venture in app-schema land Cheers Andrea ----------------------------------------------------- Ing. Andrea Aime Senior Software Engineer GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584962313 fax: +39 0584962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ----------------------------------------------------- |