XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (353 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
4.95Mb size Format: txt, pdf, ePub
ads
xs:gYear
xs:gYearMonth
xs:gMonth
xs:gMonthDay
xs:gDay
xs:QName
xs:base64Binary
xs:hexBinary
xs:NOTATION
These types have no ordering defined. Using any of the operators
lt
,
le
,
gt
,
ge
with values of these types is a type error. There's no particular reason for this restriction—in most of these cases it would have been quite possible to define a useful ordering—but the working groups decided it wasn't needed.
xs:duration
xs:duration
values themselves are not considered to be ordered, so the operators
lt
,
le
,
gt
, and
ge
are not available. This removes the problem of deciding whether 30 days is less than, equal to, or greater than one month. The two XPath subtypes of
xs:duration
, namely
xs:yearMonthDuration
and
xs:dayTimeDuration
, are much more well behaved. The effect of comparing them is the same as converting the value to a number of months, or a number of seconds, and comparing the two numbers. This means, for example, that
PT36H
(36 hours) is greater than
P1D
(one day).
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
4.95Mb size Format: txt, pdf, ePub
ads

Other books

Every Breath You Take by Bianca Sloane
Time Enough for Love by Suzanne Brockmann
Down the Shore by Kelly Mooney
Double Dutch by Sharon M. Draper
Before Their Time: A Memoir by Robert Kotlowitz
Black Jack by Lora Leigh
Fourth Down by Kirsten DeMuzio
No Decent Gentleman by Grasso, Patricia;