xsl-list
[Top] [All Lists]

Instantiating anyAtomicType -- why would I?

2005-07-07 11:09:02

Hi,

I wonder why it is possible to create instances of xdt:anyAtomicType. Saxon 
evaluates the expression "('foo' cast as xdt:anyAtomicType) instance of 
xdt:anyAtomicType" as true.

From my perspective, when taking the recent "[xsl] What's the difference 
between xdt:anyAtomicType and xs:anySimpleType?" thread into account, the 
xdt:anyAtomicType should be abstract since its "role" is to group atomic 
types(not include composite simple types), and that xdt:untypedAtomic should 
be used for instantiating values of unknown or "arbitrary" type.

I wonder:

* Why is xdt:anyAtomicType not an abstract type? Why wouldn't it make sense to 
make it abstract?

* In what circumstances is it useful to have values of type xdt:anyAtomicType? 
For example, XSL-T 2.0 defines it as one of the available builtin types, but 
doesn't refer to it otherwise(AFAICT).

If it was arranged such that xdt:untypedAtomic didn't exist and hence no type 
promotion from xdt:untypedAtomic existed, and that xdt:anyAtomicType was the 
type for untyped data which via the "17.4 Casting within a branch of the type 
hierarchy" became appropriate types, the scenario would look 
differently(IMHO, AFAICT). And that's also a question, why is it arranged 
such that type promotion from xdt:untypedAtomic is used instead of 
down-casting from xdt:anyAtomicType?

Pointers to available(as in beer, unfortunately) documentation is appreciated.


Cheers,

                Frans

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>