OK, so the reason is backwards compatibility with existing XDM
implementations. Besides that, assuming this issue didn't exist, would
you consider this a good feature? People who care about simple type
safety but don't really care about complex type safety could basically
forget about XSD and use their own little schema language/function to
convert an untyped tree to a type-annotated one, in pure XSLT.
We're talking here about the design of subset conformance levels of the
language, i.e. conformance levels that contain some of the functionality but
not all. There will always be room for differences of opinion about how such
subsets are defined, but I think the XSLT rule that "if you're not
schema-aware, there are no type annotations on nodes" has worked pretty well,
and in fact has been adopted in XQuery 3.0 in preference to its previously more
complex rules.
Ability to work with untyped tree models such as (older) DOMs was one of the
factors but not the only one that influenced this choice.
Note also that having annotations on "simple" nodes but not on "complex" nodes
doesn't actually work very well, because the process of constructing "complex"
nodes tends by default to drop the type annotations on descendants unless
revalidation occurs at the top level.
Michael Kay
Saxonica
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--