Difference between revisions of "Server Protocol: Types"

From BaseX Documentation
Jump to navigation Jump to search
 
(25 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. All node types are of :
+
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
! Item Type
+
! Type
 
|-
 
|-
 
| 7
 
| 7
| {{mono|function item}}
+
| [[XQuery 3.0#Function Items|Function item]]
| atomic value
+
| ''function''
 
|-
 
|-
 
| 8
 
| 8
| {{mono|node()}}
+
| {{Code|node()}}
| node
+
| ''node''
 
|-
 
|-
 
| 9
 
| 9
| {{mono|text()}}
+
| {{Code|text()}}
| node
+
| ''node''
 
|-
 
|-
 
| 10
 
| 10
| {{mono|processing-instruction()}}
+
| {{Code|processing-instruction()}}
| node
+
| ''node''
 
|-
 
|-
 
| 11
 
| 11
| {{mono|element()}}
+
| {{Code|element()}}
| node
+
| ''node''
 
|-
 
|-
 
| 12
 
| 12
| {{mono|document-node()}}
+
| {{Code|document-node()}}
| node
+
| ''node''
 
|-
 
|-
 
| 13
 
| 13
| {{mono|document-node(element())}}
+
| {{Code|document-node(element())}}
| node
+
| ''node''
 
|-
 
|-
 
| 14
 
| 14
| {{mono|attribute()}}
+
| {{Code|attribute()}}
| node
+
| ''node''
 
|-
 
|-
 
| 15
 
| 15
| {{mono|comment()}}
+
| {{Code|comment()}}
| node
+
| ''node''
 
|-
 
|-
 
| 32
 
| 32
| {{mono|item()}}
+
| {{Code|item()}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 33
 
| 33
| {{mono|xs:untyped}}
+
| {{Code|xs:untyped}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 34
 
| 34
| {{mono|xs:anyType}}
+
| {{Code|xs:anyType}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 35
 
| 35
| {{mono|xs:anySimpleType}}
+
| {{Code|xs:anySimpleType}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 36
 
| 36
| {{mono|xs:anyAtomicType}}
+
| {{Code|xs:anyAtomicType}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 37
 
| 37
| {{mono|xs:untypedAtomic}}
+
| {{Code|xs:untypedAtomic}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 38
 
| 38
| {{mono|xs:string}}
+
| {{Code|xs:string}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 39
 
| 39
| {{mono|xs:normalizedString}}
+
| {{Code|xs:normalizedString}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 40
 
| 40
| {{mono|xs:token}}
+
| {{Code|xs:token}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 41
 
| 41
| {{mono|xs:language}}
+
| {{Code|xs:language}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 42
 
| 42
| {{mono|xs:NMTOKEN}}
+
| {{Code|xs:NMTOKEN}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 43
 
| 43
| {{mono|xs:Name}}
+
| {{Code|xs:Name}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 44
 
| 44
| {{mono|xs:NCName}}
+
| {{Code|xs:NCName}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 45
 
| 45
| {{mono|xs:ID}}
+
| {{Code|xs:ID}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 46
 
| 46
| {{mono|xs:IDREF}}
+
| {{Code|xs:IDREF}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 47
 
| 47
| {{mono|xs:ENTITY}}
+
| {{Code|xs:ENTITY}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 48
 
| 48
| {{mono|xs:float}}
+
| {{Code|xs:float}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 49
 
| 49
| {{mono|xs:double}}
+
| {{Code|xs:double}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 50
 
| 50
| {{mono|xs:decimal}}
+
| {{Code|xs:decimal}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 51
 
| 51
| {{mono|xs:precisionDecimal}}
+
| {{Code|xs:precisionDecimal}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 52
 
| 52
| {{mono|xs:integer}}
+
| {{Code|xs:integer}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 53
 
| 53
| {{mono|xs:nonPositiveInteger}}
+
| {{Code|xs:nonPositiveInteger}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 54
 
| 54
| {{mono|xs:negativeInteger}}
+
| {{Code|xs:negativeInteger}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 55
 
| 55
| {{mono|xs:long}}
+
| {{Code|xs:long}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 56
 
| 56
| {{mono|xs:int}}
+
| {{Code|xs:int}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 57
 
| 57
| {{mono|xs:short}}
+
| {{Code|xs:short}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 58
 
| 58
| {{mono|xs:byte}}
+
| {{Code|xs:byte}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 59
 
| 59
| {{mono|xs:nonNegativeInteger}}
+
| {{Code|xs:nonNegativeInteger}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 60
 
| 60
| {{mono|xs:unsignedLong}}
+
| {{Code|xs:unsignedLong}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 61
 
| 61
| {{mono|xs:unsignedInt}}
+
| {{Code|xs:unsignedInt}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 62
 
| 62
| {{mono|xs:unsignedShort}}
+
| {{Code|xs:unsignedShort}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 63
 
| 63
| {{mono|xs:unsignedByte}}
+
| {{Code|xs:unsignedByte}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 64
 
| 64
| {{mono|xs:positiveInteger}}
+
| {{Code|xs:positiveInteger}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 65
 
| 65
| {{mono|xs:duration}}
+
| {{Code|xs:duration}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 66
 
| 66
| {{mono|xs:yearMonthDuration}}
+
| {{Code|xs:yearMonthDuration}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 67
 
| 67
| {{mono|xs:dayTimeDuration}}
+
| {{Code|xs:dayTimeDuration}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 68
 
| 68
| {{mono|xs:dateTime}}
+
| {{Code|xs:dateTime}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 69
 
| 69
| {{mono|xs:dateTimeStamp}}
+
| {{Code|xs:dateTimeStamp}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 70
 
| 70
| {{mono|xs:date}}
+
| {{Code|xs:date}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 71
 
| 71
| {{mono|xs:time}}
+
| {{Code|xs:time}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 72
 
| 72
| {{mono|xs:gYearMonth}}
+
| {{Code|xs:gYearMonth}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 73
 
| 73
| {{mono|xs:gYear}}
+
| {{Code|xs:gYear}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 74
 
| 74
| {{mono|xs:gMonthDay}}
+
| {{Code|xs:gMonthDay}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 75
 
| 75
| {{mono|xs:gDay}}
+
| {{Code|xs:gDay}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 76
 
| 76
| {{mono|xs:gMonth}}
+
| {{Code|xs:gMonth}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 77
 
| 77
| {{mono|xs:boolean}}
+
| {{Code|xs:boolean}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 78
 
| 78
| {{mono|basex:binary}}
+
| {{Code|basex:binary}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 79
 
| 79
| {{mono|xs:base64Binary}}
+
| {{Code|xs:base64Binary}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 80
 
| 80
| {{mono|xs:hexBinary}}
+
| {{Code|xs:hexBinary}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 81
 
| 81
| {{mono|basex:raw}}
+
| {{Code|xs:anyURI}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 82
 
| 82
| {{mono|xs:anyURI}}
+
| {{Code|xs:QName}}
| atomic value
+
| ''atomic value''
 
|-
 
|-
 
| 83
 
| 83
| {{mono|xs:QName}}
+
| {{Code|xs:NOTATION}}
| atomic value
+
| ''atomic value''
|-
 
| 84
 
| {{mono|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