[WF-Protocols] re: first attempt with xml schema (quick comments)
Matze Braun
matze at braunis.de
Mon Jul 7 02:54:27 PDT 2003
On Sun, 6 Jul 2003, Frank O'Connor wrote:
> I have a few comments.
> 1. Matze, none of your XSD's appear to be valid XML :) You may want to throw them in IE or Mozilla and let the XML parsers warn you where you have mistakes (for example: <xsd:documentation>The name of the model</documentation> in omf.xsd [lack of namespace prefix on closing tag]).
You must have mistyped the URL. I had indeed an old version lying around
on the webserver but the links from my list mail contain valid schemas.
>
> 2. With regards to how to represent array data (vector3, matrix3, ...etc) the XML Schema Working group explicitly did not put in complex array data types. A quote form the WG Mailing Lists regarding this and how such types (vectors) should be handled follows:
>
> ---- BEGIN QUOTE ----
> "'Lists' were included in XML Schema as a minimal generalization of legacy constructions for NMTOKENS and IDREFS, etc. The general view of the WG was that simple datatypes (suitable for describing attributes) should ideally be restricted to atomic values. More complex constructions (lists of lists, lists of tuples or vectors) should be constructed as "complex datatypes", i.e., using nested element markup constructions in XML
> Minor points:
>
> As noted the WG generally frowns on compound simple datatypes,
> hence:
>
> <dimensions>
> <dim> 2 </dim>
> <dim> 4 </dim>
> </dimensions>
>
> would be preferred to the syntax:
>
> <dim> 2 4 </dim>
>
> Similarly, proposals to flatten arrays would be discouraged
> because they implicitly specify markup (structure).
> Thus detailed mark up syntax:
>
> <array>
> <arrayElement> 1.0 </arrayElement>
> <arrayElement> 2.0 </arrayElement>
> <arrayElement> 3.0 </arrayElement>
> <arrayElement> 4.0 </arrayElement>
> </array>
>
> would be preferred to the flattened syntax :
>
> <array> 1.0 2.0 3.0 4.0 </array>
>
> The flattened syntax is similar to the array syntax of XSIL.
> Observe that the detailed mark up syntax is easier to extend
> to nested arrays. It is also easier to process in XSLT."
> ---- END QUOTE ----
>
Hmm ok. I just changed the polygon to have multiple <v> instead of the
integer list.
Though I think for 3d vector the attribute approach is still okay
(<v x=".." y=".." z="..">)
Greetings,
Matze
More information about the Protocols
mailing list