xsl-list
[Top] [All Lists]

[xsl] About casting

2018-10-15 00:32:55
Good morning - at least in Europe ;-)

Thank you Kay for bringing this up. For me it is not alway clear when I have to 
cast explicitly and when it is happening implicitly. I for my code cast 
explicitly even when it is not required. In this way I better understand what 
is happening.

What you call strong casting is in my terminology explicit casting and your 
week casting is implicit casting for me.

Have a wonderful week
Always
Leo

Just to clarify this, we could perhaps use the terms

* strong casting - as performed using the "cast as" expression or a 
constructor function like xs:integer()

* weak casting - as performed by the (badly-named) function conversion rules. 
Includes atomization, numeric promotion, and conversion of xs:untypedAtomic 
to the required type

* exact match - the supplied value must match the required type exactly.

--~----------------------------------------------------------------
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
--~--

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