Database Reference
In-Depth Information
XPath 2.0 Data Model (XDM) specification . If you are an experienced XQuery devel‐
oper, you're most likely already familiar with this document; if not, as an imple‐
menter of an internal module you should have at least a basic understanding of these
subjects. A very useful summary diagram of the type hierarchy in XQuery is available
in the specification .
When implementing an internal module, you will be working with the XDM types in
Java as opposed to XQuery. eXist has a Java class to model each of those XDM types.
An understanding of how to map from an XDM type as used in XQuery to eXist's
Java type is essential to enable you to create functions that accept parameters and
return values. All of eXist's XDM Java types for atomic types are in the package
org.exist.xquery.value . The type mappings are listed in Table 16-6 .
Table 16-6. XDM atomic value type mappings
XDM atomic value type
eXist's Java class
Notes
An interface.
item
Item
An abstract class.
xs:anyAtomicType
AtomicValue
Internally represented using java.lang.String .
xs:untypedAtomic
UntypedAtomicValue
Internally represented using java.lang.String .
Provides utility methods for converting to/from
org.exist.xmldb.XmldbURI .
xs:anyURI
AnyURIValue
Internally represented using java.io.Input
Stream and java.io.OutputStream . Actual
encoding/decoding is lazy, and uses either
Base64BinaryValueType or HexBinaryType ,
respectively.
xs:base64Binary
BinaryValue
xs:hexBinary
xs:boolean
Internally represented using boolean .
BooleanValue
Internally represented using javax.xml.data
type.XMLGregorianCalendar .
xs:dateTime
DateTimeValue
xs:date
DateValue
xs:time
TimeValue
xs:gDay
GDayValue
xs:gMonth
GMonthValue
xs:gMonthDay
GMonthDay
xs:gYear
GYearValue
xs:gYearMonth
GYearMonthValue
Internally represented using javax.xml.data
type.Duration .
xs:duration
DurationValue
xs:dayTimeDuration
DayTimeDurationValue
Search WWH ::




Custom Search