[xquery-talk] xsi:type typing support

Howard Katz howardk at fatdog.com
Sun Mar 13 07:56:21 PST 2005


 > > 	if ( count( $results//number[ @xsi:type="xs:int" ] )
 > > 		 eq count( $results//number ) )
 >
 > This code illustrates some of the pitfalls:
 >
 > (a) if you're using xsi:type at all, then surely you should be
 > treating it
 > as a QName, in which case you can't compare it to a string.

Sorry Mike, I don't understand what you're saying. I'm just checking to see
if an xsi:type attribute of value "xs:int" has been declared on every
<number> element. If that's the case, then I consider them sortable as ints.
What am I missing?

 > (b) relying on xsi:type gives you no way to associate a type
 > with attributes
 > rather than elements.

Agreed.


 > Michael Kay
 > http://www.saxonica.com/
 >
 >
 > _______________________________________________
 > talk at xquery.com
 > http://xquery.com/mailman/listinfo/talk
 >




More information about the talk mailing list