497
501
if (untypedItem->castToGYear(castItem))
500
found = found || insertInMap(castItem, node2, store::XS_GYEAR, true);
504
if (insertInMap(castItem, node2, store::XS_GYEAR, true))
503
508
if (untypedItem->castToHexBinary(castItem))
506
found = found || insertInMap(castItem, node2, store::XS_HEXBINARY, true);
511
if (insertInMap(castItem, node2, store::XS_HEXBINARY, true))
509
515
if (untypedItem->castToBase64Binary(castItem))
512
found = found || insertInMap(castItem, node2, store::XS_BASE64BINARY, true);
518
if (insertInMap(castItem, node2, store::XS_BASE64BINARY, true))
523
530
decimalItem->coerceToDouble(castItem, true, lossy);
526
found = found || insertInMap(castItem, node2, store::XS_DOUBLE, true);
533
if (insertInMap(castItem, node2, store::XS_DOUBLE, true))
530
538
castItem.transfer(decimalItem);
532
found = found || insertInMap(castItem, node2, store::XS_DECIMAL, true);
540
if (insertInMap(castItem, node2, store::XS_DECIMAL, true))
535
544
// may also be hexBinary or base64Binary
538
547
if (untypedItem->castToHexBinary(castItem))
541
found = found || insertInMap(castItem, node2, store::XS_HEXBINARY, true);
550
if (insertInMap(castItem, node2, store::XS_HEXBINARY, true))
544
554
if (untypedItem->castToBase64Binary(castItem))
547
found = found || insertInMap(castItem, node2, store::XS_BASE64BINARY, true);
557
if (insertInMap(castItem, node2, store::XS_BASE64BINARY, true))
553
564
else if (untypedItem->castToDouble(castItem))
556
found = found || insertInMap(castItem, node2, store::XS_DOUBLE, true);
567
if (insertInMap(castItem, node2, store::XS_DOUBLE, true))
559
571
// try casting to xs:datetime
560
572
else if (untypedItem->castToDateTime(castItem))
563
found = found || insertInMap(castItem, node2, store::XS_DATETIME, true);
575
if (insertInMap(castItem, node2, store::XS_DATETIME, true))
566
579
// try casting to xs:date
567
580
else if (untypedItem->castToDate(castItem))
570
found = found || insertInMap(castItem, node2, store::XS_DATE, true);
583
if (insertInMap(castItem, node2, store::XS_DATE, true))
573
587
// try casting to xs:time
574
588
else if (untypedItem->castToTime(castItem))
577
found = found || insertInMap(castItem, node2, store::XS_TIME, true);
591
if (insertInMap(castItem, node2, store::XS_TIME, true))
580
595
// try casting to xs:gYearMonth
581
596
if (!sorted && untypedItem->castToGYearMonth(castItem))
584
found = found || insertInMap(castItem, node2, store::XS_GYEAR_MONTH, true);
599
if (insertInMap(castItem, node2, store::XS_GYEAR_MONTH, true))
587
603
// try casting to xs:gMonthDay
588
604
else if (!sorted && untypedItem->castToGMonthDay(castItem))
591
found = found || insertInMap(castItem, node2, store::XS_GMONTH_DAY, true);
607
if (insertInMap(castItem, node2, store::XS_GMONTH_DAY, true))
594
611
// try casting to xs:gDay
595
612
else if (!sorted && untypedItem->castToGDay(castItem))
598
found = found || insertInMap(castItem, node2, store::XS_GDAY, true);
615
if (insertInMap(castItem, node2, store::XS_GDAY, true))
601
619
// try casting to xs:gMonth
602
620
else if (!sorted && untypedItem->castToGMonth(castItem))
605
found = found || insertInMap(castItem, node2, store::XS_GMONTH, true);
623
if (insertInMap(castItem, node2, store::XS_GMONTH, true))
608
627
// try casting to xs:duration
609
628
else if (untypedItem->castToDuration(castItem))
612
found = found || insertInMap(castItem, node2, store::XS_DURATION, true);
631
if (insertInMap(castItem, node2, store::XS_DURATION, true))
615
635
// try casting to xs:hexBinary
616
636
else if (!sorted && untypedItem->castToHexBinary(castItem))
619
found = found || insertInMap(castItem, node2, store::XS_HEXBINARY, true);
639
if (insertInMap(castItem, node2, store::XS_HEXBINARY, true))
622
643
// try casting to xs:base64Binary
623
644
else if (!sorted && untypedItem->castToBase64Binary(castItem))
626
found = found || insertInMap(castItem, node2, store::XS_BASE64BINARY, true);
647
if (insertInMap(castItem, node2, store::XS_BASE64BINARY, true))
886
912
if (untypedItem->castToGYear(castItem))
888
found = found || removeFromMap(castItem, node, store::XS_GYEAR, true);
914
if (removeFromMap(castItem, node, store::XS_GYEAR, true))
891
918
if (untypedItem->castToHexBinary(castItem))
893
found = found || removeFromMap(castItem, node, store::XS_HEXBINARY, true);
920
if (removeFromMap(castItem, node, store::XS_HEXBINARY, true))
896
924
if (untypedItem->castToBase64Binary(castItem))
898
found = found || removeFromMap(castItem, node, store::XS_BASE64BINARY, true);
926
if (removeFromMap(castItem, node, store::XS_BASE64BINARY, true))
909
938
decimalItem->coerceToDouble(castItem, true, lossy);
911
found = found || removeFromMap(castItem, node, store::XS_DOUBLE, true);
940
if (removeFromMap(castItem, node, store::XS_DOUBLE, true))
915
945
castItem.transfer(decimalItem);
916
found = found || removeFromMap(castItem, node, store::XS_DECIMAL, true);
946
if (removeFromMap(castItem, node, store::XS_DECIMAL, true))
919
950
// may also be hexBinary or base64Binary
922
953
if (untypedItem->castToHexBinary(castItem))
924
found = found || removeFromMap(castItem, node, store::XS_HEXBINARY, true);
955
if (removeFromMap(castItem, node, store::XS_HEXBINARY, true))
927
959
if (untypedItem->castToBase64Binary(castItem))
929
found = found || removeFromMap(castItem, node, store::XS_BASE64BINARY, true);
961
if (removeFromMap(castItem, node, store::XS_BASE64BINARY, true))
934
967
// try casting to xs:double
935
968
else if (untypedItem->castToDouble(castItem))
937
found = found || removeFromMap(castItem, node, store::XS_DOUBLE, true);
970
if (removeFromMap(castItem, node, store::XS_DOUBLE, true))
940
974
// try casting to xs:datetime
941
975
else if (untypedItem->castToDateTime(castItem))
943
found = found || removeFromMap(castItem, node, store::XS_DATETIME, true);
977
if (removeFromMap(castItem, node, store::XS_DATETIME, true))
946
981
// try casting to xs:date
947
982
else if (untypedItem->castToDate(castItem))
949
found = found || removeFromMap(castItem, node, store::XS_DATE, true);
984
if (removeFromMap(castItem, node, store::XS_DATE, true))
952
988
// try casting to xs:time
953
989
else if (untypedItem->castToTime(castItem))
955
found = found || removeFromMap(castItem, node, store::XS_TIME, true);
991
if (removeFromMap(castItem, node, store::XS_TIME, true))
958
995
// try casting to xs:gYearMonth
959
996
if (!sorted && untypedItem->castToGYearMonth(castItem))
961
found = found || removeFromMap(castItem, node, store::XS_GYEAR_MONTH, true);
998
if (removeFromMap(castItem, node, store::XS_GYEAR_MONTH, true))
964
1002
// try casting to xs:gMonthDay
965
1003
else if (!sorted && untypedItem->castToGMonthDay(castItem))
967
found = found || removeFromMap(castItem, node, store::XS_GMONTH_DAY, true);
1005
if (removeFromMap(castItem, node, store::XS_GMONTH_DAY, true))
970
1009
// try casting to xs:gDay
971
1010
else if (!sorted && untypedItem->castToGDay(castItem))
973
found = found || removeFromMap(castItem, node, store::XS_GDAY, true);
1012
if (removeFromMap(castItem, node, store::XS_GDAY, true))
976
1016
// try casting to xs:gMonth
977
1017
else if (!sorted && untypedItem->castToGMonth(castItem))
979
found = found || removeFromMap(castItem, node, store::XS_GMONTH, true);
1019
if (removeFromMap(castItem, node, store::XS_GMONTH, true))
982
1023
// try casting to xs:duration
983
1024
else if (untypedItem->castToDuration(castItem))
985
found = found || removeFromMap(castItem, node, store::XS_DURATION, true);
1026
if (removeFromMap(castItem, node, store::XS_DURATION, true))
988
1030
// try casting to xs:hexBinary
989
1031
else if (!sorted && untypedItem->castToHexBinary(castItem))
991
found = found || removeFromMap(castItem, node, store::XS_HEXBINARY, true);
1033
if (removeFromMap(castItem, node, store::XS_HEXBINARY, true))
994
1037
// try casting to xs:base64Binary
995
1038
else if (!sorted && untypedItem->castToBase64Binary(castItem))
997
found = found || removeFromMap(castItem, node, store::XS_BASE64BINARY, true);
1040
if (removeFromMap(castItem, node, store::XS_BASE64BINARY, true))