[Home] [By Thread] [By Date] [Recent Entries]
2008/9/15 Michael Kay <mike@s...>:
>> One improvement you might like to do is to make all elements
>> and complex types global ("garden of eden" style) - this
>> exposes the types to schema-aware xslt and xquery, and
>> arguably helps the maintenance of the schema.
>
> By and large, the schema tends to follow the rule that if an element
> declaration is local, its type is global, and that's probably sufficient for
> schema-aware XSLT and XQuery processing: it means you can either use
> schema-element(E) or element(E, T) in a function signature.
To go with that, the reasons for global element declarations are:
- the association between the element and its type is in one place
- you get a nice list of elements at the top of the schema, which I like :)
- there's a subtle gotcha (that Mike Kay pointed out last time this
was mentioned) that using element refs pointing to a single element
type definition prevents, but of I course I can't remember it well
enough to describe or to find it now... something along the lines of
accidentally defining the type locally rather than referring to the
global type...?
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



