Difference between revisions of "Server Protocol: Types"

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