Difference between revisions of "Server Protocol: Types"

From BaseX Documentation
Jump to navigation Jump to search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable"
+
This article lists extended type information that is returned by the [[Server Protocol]].
 +
 
 +
==XDM Metadata==
 +
 
 +
In most cases, the XDM metadata is nothing else than the [[#Type IDs|Type ID]]. There are three exceptions: document-node(), attribute() and xs:QName items are followed by an additional <code>{URI}</code> string.
 +
 
 +
==Type IDs==
 +
 
 +
The following table lists the type IDs that are returned by the server. Currently, all node kinds are of type {{Code|xs:untypedAtomic}}:
 +
 
 +
{| class="wikitable sortable"
 
|-
 
|-
! ID
+
! align='right' | Type&nbsp;ID
! Data Type
+
! Node Kind/Item Type
 +
! Type
 
|-
 
|-
 
| 7
 
| 7
| function item
+
| [[XQuery 3.0#Function Items|Function item]]
 +
| ''function''
 
|-
 
|-
 
| 8
 
| 8
| node()
+
| {{Code|node()}}
 +
| ''node''
 
|-
 
|-
 
| 9
 
| 9
| text()
+
| {{Code|text()}}
 +
| ''node''
 
|-
 
|-
 
| 10
 
| 10
| processing-instruction()
+
| {{Code|processing-instruction()}}
 +
| ''node''
 
|-
 
|-
 
| 11
 
| 11
| element()
+
| {{Code|element()}}
 +
| ''node''
 
|-
 
|-
 
| 12
 
| 12
| document-node()
+
| {{Code|document-node()}}
 +
| ''node''
 
|-
 
|-
 
| 13
 
| 13
| document-node(element())
+
| {{Code|document-node(element())}}
 +
| ''node''
 
|-
 
|-
 
| 14
 
| 14
| attribute()
+
| {{Code|attribute()}}
 +
| ''node''
 
|-
 
|-
 
| 15
 
| 15
| comment()
+
| {{Code|comment()}}
 +
| ''node''
 
|-
 
|-
 
| 32
 
| 32
| item()
+
| {{Code|item()}}
 +
| ''atomic value''
 
|-
 
|-
 
| 33
 
| 33
| xs:anyAtomicType
+
| {{Code|xs:untyped}}
 +
| ''atomic value''
 
|-
 
|-
 
| 34
 
| 34
| xs:untypedAtomic
+
| {{Code|xs:anyType}}
 +
| ''atomic value''
 
|-
 
|-
 
| 35
 
| 35
| xs:string
+
| {{Code|xs:anySimpleType}}
 +
| ''atomic value''
 
|-
 
|-
 
| 36
 
| 36
| xs:normalizedString
+
| {{Code|xs:anyAtomicType}}
 +
| ''atomic value''
 
|-
 
|-
 
| 37
 
| 37
| xs:token
+
| {{Code|xs:untypedAtomic}}
 +
| ''atomic value''
 
|-
 
|-
 
| 38
 
| 38
| xs:language
+
| {{Code|xs:string}}
 +
| ''atomic value''
 
|-
 
|-
 
| 39
 
| 39
| xs:NMTOKEN
+
| {{Code|xs:normalizedString}}
 +
| ''atomic value''
 
|-
 
|-
 
| 40
 
| 40
| xs:Name
+
| {{Code|xs:token}}
 +
| ''atomic value''
 
|-
 
|-
 
| 41
 
| 41
| xs:NCName
+
| {{Code|xs:language}}
 +
| ''atomic value''
 
|-
 
|-
 
| 42
 
| 42
| xs:ID
+
| {{Code|xs:NMTOKEN}}
 +
| ''atomic value''
 
|-
 
|-
 
| 43
 
| 43
| xs:IDREF
+
| {{Code|xs:Name}}
 +
| ''atomic value''
 
|-
 
|-
 
| 44
 
| 44
| xs:ENTITY
+
| {{Code|xs:NCName}}
 +
| ''atomic value''
 
|-
 
|-
 
| 45
 
| 45
| xs:float
+
| {{Code|xs:ID}}
 +
| ''atomic value''
 
|-
 
|-
 
| 46
 
| 46
| xs:double
+
| {{Code|xs:IDREF}}
 +
| ''atomic value''
 
|-
 
|-
 
| 47
 
| 47
| xs:decimal
+
| {{Code|xs:ENTITY}}
 +
| ''atomic value''
 
|-
 
|-
 
| 48
 
| 48
| xs:precisionDecimal
+
| {{Code|xs:float}}
 +
| ''atomic value''
 
|-
 
|-
 
| 49
 
| 49
| xs:integer
+
| {{Code|xs:double}}
 +
| ''atomic value''
 
|-
 
|-
 
| 50
 
| 50
| xs:nonPositiveInteger
+
| {{Code|xs:decimal}}
 +
| ''atomic value''
 
|-
 
|-
 
| 51
 
| 51
| xs:negativeInteger
+
| {{Code|xs:precisionDecimal}}
 +
| ''atomic value''
 
|-
 
|-
 
| 52
 
| 52
| xs:long
+
| {{Code|xs:integer}}
 +
| ''atomic value''
 
|-
 
|-
 
| 53
 
| 53
| xs:int
+
| {{Code|xs:nonPositiveInteger}}
 +
| ''atomic value''
 
|-
 
|-
 
| 54
 
| 54
| xs:short
+
| {{Code|xs:negativeInteger}}
 +
| ''atomic value''
 
|-
 
|-
 
| 55
 
| 55
| xs:byte
+
| {{Code|xs:long}}
 +
| ''atomic value''
 
|-
 
|-
 
| 56
 
| 56
| xs:nonNegativeInteger
+
| {{Code|xs:int}}
 +
| ''atomic value''
 
|-
 
|-
 
| 57
 
| 57
| xs:unsignedLong
+
| {{Code|xs:short}}
 +
| ''atomic value''
 
|-
 
|-
 
| 58
 
| 58
| xs:unsignedInt
+
| {{Code|xs:byte}}
 +
| ''atomic value''
 
|-
 
|-
 
| 59
 
| 59
| xs:unsignedShort
+
| {{Code|xs:nonNegativeInteger}}
 +
| ''atomic value''
 
|-
 
|-
 
| 60
 
| 60
| xs:unsignedByte
+
| {{Code|xs:unsignedLong}}
 +
| ''atomic value''
 
|-
 
|-
 
| 61
 
| 61
| xs:positiveInteger
+
| {{Code|xs:unsignedInt}}
 +
| ''atomic value''
 
|-
 
|-
 
| 62
 
| 62
| xs:duration
+
| {{Code|xs:unsignedShort}}
 +
| ''atomic value''
 
|-
 
|-
 
| 63
 
| 63
| xs:yearMonthDuration
+
| {{Code|xs:unsignedByte}}
 +
| ''atomic value''
 
|-
 
|-
 
| 64
 
| 64
| xs:dayTimeDuration
+
| {{Code|xs:positiveInteger}}
 +
| ''atomic value''
 
|-
 
|-
 
| 65
 
| 65
| xs:dateTime
+
| {{Code|xs:duration}}
 +
| ''atomic value''
 
|-
 
|-
 
| 66
 
| 66
| xs:dateTimeStamp
+
| {{Code|xs:yearMonthDuration}}
 +
| ''atomic value''
 
|-
 
|-
 
| 67
 
| 67
| xs:date
+
| {{Code|xs:dayTimeDuration}}
 +
| ''atomic value''
 
|-
 
|-
 
| 68
 
| 68
| xs:time
+
| {{Code|xs:dateTime}}
 +
| ''atomic value''
 
|-
 
|-
 
| 69
 
| 69
| xs:gYearMonth
+
| {{Code|xs:dateTimeStamp}}
 +
| ''atomic value''
 
|-
 
|-
 
| 70
 
| 70
| xs:gYear
+
| {{Code|xs:date}}
 +
| ''atomic value''
 
|-
 
|-
 
| 71
 
| 71
| xs:gMonthDay
+
| {{Code|xs:time}}
 +
| ''atomic value''
 
|-
 
|-
 
| 72
 
| 72
| xs:gDay
+
| {{Code|xs:gYearMonth}}
 +
| ''atomic value''
 
|-
 
|-
 
| 73
 
| 73
| xs:gMonth
+
| {{Code|xs:gYear}}
 +
| ''atomic value''
 
|-
 
|-
 
| 74
 
| 74
| xs:boolean
+
| {{Code|xs:gMonthDay}}
 +
| ''atomic value''
 
|-
 
|-
 
| 75
 
| 75
| basex:binary
+
| {{Code|xs:gDay}}
 +
| ''atomic value''
 
|-
 
|-
 
| 76
 
| 76
| xs:base64Binary
+
| {{Code|xs:gMonth}}
 +
| ''atomic value''
 
|-
 
|-
 
| 77
 
| 77
| xs:hexBinary
+
| {{Code|xs:boolean}}
 +
| ''atomic value''
 
|-
 
|-
 
| 78
 
| 78
| basex:raw
+
| {{Code|basex:binary}}
 +
| ''atomic value''
 
|-
 
|-
 
| 79
 
| 79
| xs:anyURI
+
| {{Code|xs:base64Binary}}
 +
| ''atomic value''
 
|-
 
|-
 
| 80
 
| 80
| xs:QName
+
| {{Code|xs:hexBinary}}
 +
| ''atomic value''
 
|-
 
|-
 
| 81
 
| 81
| xs:NOTATION
+
| {{Code|xs:anyURI}}
 +
| ''atomic value''
 +
|-
 +
| 82
 +
| {{Code|xs:QName}}
 +
| ''atomic value''
 +
|-
 +
| 83
 +
| {{Code|xs:NOTATION}}
 +
| ''atomic value''
 
|}
 
|}

Latest revision as of 15:42, 25 July 2022

This article lists extended type information that is returned by the Server Protocol.

XDM Metadata[edit]

In most cases, the XDM metadata is nothing else than the Type ID. There are three exceptions: document-node(), attribute() and xs:QName items are followed by an additional {URI} string.

Type IDs[edit]

The following table lists the type IDs that are returned by the server. Currently, all node kinds are of type xs:untypedAtomic:

Type ID Node Kind/Item Type Type
7 Function item function
8 node() node
9 text() node
10 processing-instruction() node
11 element() node
12 document-node() node
13 document-node(element()) node
14 attribute() node
15 comment() node
32 item() atomic value
33 xs:untyped atomic value
34 xs:anyType atomic value
35 xs:anySimpleType atomic value
36 xs:anyAtomicType atomic value
37 xs:untypedAtomic atomic value
38 xs:string atomic value
39 xs:normalizedString atomic value
40 xs:token atomic value
41 xs:language atomic value
42 xs:NMTOKEN atomic value
43 xs:Name atomic value
44 xs:NCName atomic value
45 xs:ID atomic value
46 xs:IDREF atomic value
47 xs:ENTITY atomic value
48 xs:float atomic value
49 xs:double atomic value
50 xs:decimal atomic value
51 xs:precisionDecimal atomic value
52 xs:integer atomic value
53 xs:nonPositiveInteger atomic value
54 xs:negativeInteger atomic value
55 xs:long atomic value
56 xs:int atomic value
57 xs:short atomic value
58 xs:byte atomic value
59 xs:nonNegativeInteger atomic value
60 xs:unsignedLong atomic value
61 xs:unsignedInt atomic value
62 xs:unsignedShort atomic value
63 xs:unsignedByte atomic value
64 xs:positiveInteger atomic value
65 xs:duration atomic value
66 xs:yearMonthDuration atomic value
67 xs:dayTimeDuration atomic value
68 xs:dateTime atomic value
69 xs:dateTimeStamp atomic value
70 xs:date atomic value
71 xs:time atomic value
72 xs:gYearMonth atomic value
73 xs:gYear atomic value
74 xs:gMonthDay atomic value
75 xs:gDay atomic value
76 xs:gMonth atomic value
77 xs:boolean atomic value
78 basex:binary atomic value
79 xs:base64Binary atomic value
80 xs:hexBinary atomic value
81 xs:anyURI atomic value
82 xs:QName atomic value
83 xs:NOTATION atomic value