-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-thierry-bulk-rdf-00.xml
427 lines (392 loc) · 14.7 KB
/
draft-thierry-bulk-rdf-00.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="lib/rfc2629.xslt"?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc linkmailto="no" ?>
<?rfc editing="no" ?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-index="no" ?>
<rfc ipr="trust200902"
category="exp"
docName="draft-thierry-bulk-rdf-00"
xmlns:x="http://purl.org/net/xml2rfc/ext">
<x:feedback template="mailto:pierre@nothos.net"/>
<front>
<title abbrev="BULK-RDF">BULK RDF namespace</title>
<author initials="P." surname="Thierry" fullname="Pierre Thierry">
<organization>Thierry Technologies</organization>
<address>
<email>pierre@nothos.net</email>
</address>
</author>
<date day="7" month="August" year="2013" />
<keyword>binary</keyword>
<abstract>
<t>
This specification describes a BULK serialization of RDF ontologies and graphs.
</t>
</abstract>
</front>
<middle>
<section anchor="intro" title="Introduction">
<section title="Conventions and Terminology">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
described in <xref target="RFC2119">RFC 2119</xref>.
</t>
<t>
Literal numerical values are provided in decimal or hexadecimal as appropriate.
Hexadecimal literals are prefixed with <spanx style="verb">0x</spanx> to distinguish them
from decimal literals.
</t>
<t>
BULK bytes sequences and expressions are described with the same conventions than used in
the <xref target="BULK1">BULK 1.0 specification</xref>
</t>
</section>
</section>
<section title="BULK RDF namespace">
<t>
The RDF namespace is an official namespace identified by the UUID <eref
target="urn:uuid:ed460331-a89b-5742-a8de-907dff727779"/> (BULK,
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"). Its first purpose is to serialize both RDF
ontologies and graphs, but as RDF is deeply rooted in the World Wide Web and the REST
architecture, some of the names and forms defined in this specification are intended to be
used in applications related to those.
</t>
<t>
This specification defines the type <spanx style="verb">URIString</spanx>, which is an array
whose content is a string conforming to the "URI-reference" production in <xref
target="RFC3986"/> (section 4.1).
</t>
<section title="URI reference">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x1</spanx> (mnemonic: <spanx
style="verb">uriref</spanx> )</t>
<t hangText="shape"><spanx style="verb">( uriref URIString )</spanx></t>
<t hangTest="Value"><spanx style="verb">λ:id</spanx></t>
</list>
</t>
<t>
This form makes it possible to differentiate a string possibly containing a URI from a
known URI reference.
</t>
<t>Types: <spanx style="verb">URIRef</spanx>, <spanx style="verb">URIString</spanx></t>
</section>
<section title="Base URI">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x2</spanx> (mnemonic: <spanx style="verb">base</spanx> )</t>
<t hangText="shape"><spanx style="verb">( base URIString )</spanx></t>
</list>
</t>
<t>
This form changes the current base URI for URI resolution. If the given URI is relative,
it must be resolved with the current base URI.
</t>
</section>
<section title="URI prefix">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x3</spanx> (mnemonic: <spanx style="verb">prefix</spanx> )</t>
<t hangText="shape"><spanx style="verb">( prefix {uri}:URIString )</spanx></t>
<t hangTest="Value"><spanx style="verb">( λ:lambda λ:u ( λ:lambda λ:s ( concat λ:u λ:s )
) )</spanx></t>
</list>
</t>
</section>
<section title="rdf namespace URI">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x4</spanx> (mnemonic: <spanx style="verb">rdf#</spanx> )</t>
<t hangText="value"><spanx style="verb">( prefix
"http://www.w3.org/1999/02/22-rdf-syntax-ns#" )</spanx></t>
</list>
</t>
</section>
<section title="blank">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x5</spanx> (mnemonic: <spanx style="verb">blank</spanx> )</t>
<t hangText="shape"><spanx style="verb">( blank )</spanx></t>
</list>
</t>
<t>
<list style="hanging">
<t hangText="Name's type">EagerFunction</t>
<t hangText="Form's type">Expr</t>
<t hangText="Form's value">a new blank node. If the same blank node must be used in
several forms, it should be made the value of a name.</t>
</list>
</t>
</section>
<section title="RDF literals">
<t>
Literals are arbitrary data that can be an object in an RDF triple. It is important to
note that their BULK serialization doesn't need to denote the string of their lexical
form.
</t>
<t>
Any array used as object in an RDF triple has the semantics of a plain literal without
language tag.
</t>
<section title="Plain literal">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x6</spanx> (mnemonic: <spanx style="verb">plain</spanx> )</t>
<t hangText="shape"><spanx style="verb">( plain {lang}:Array {literal}:Array )</spanx></t>
</list>
</t>
<t>
This is a plain RDF literal. {lang} is the language tag.
</t>
</section>
<section title="Typed literal">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x7</spanx> (mnemonic: <spanx style="verb">type</spanx> )</t>
<t hangText="shape"><spanx style="verb">( type {id}:URIRef {literal}:Expr )</spanx></t>
</list>
</t>
<t>
This is a typed RDF literal. {id} is the datatype URI. Each type defines what is legal as
<spanx style="verb">{literal}</spanx>.
</t>
</section>
<section title="XMLLiteral">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x8</spanx> (mnemonic: <spanx style="verb">xmlliteral</spanx> )</t>
<t hangText="value"><spanx style="verb">( rdf# "XMLLiteral" )</spanx></t>
</list>
</t>
<t>
A literal with this type SHOULD contain a BULK serialization of XML (cf. <xref
target="BULK-XML"/>). An application MUST NOT use an array for this literal for anything
else than a string that belongs to the lexical space defined for <eref
target="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"/>.
</t>
</section>
</section>
<section title="Triples">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x9</spanx> (mnemonic: <spanx style="verb">triples</spanx> )</t>
<t hangText="shape"><spanx style="verb">( triples {triples} )</spanx></t>
</list>
</t>
<t>
<spanx style="verb">{triples}</spanx> must be a sequence of <spanx style="verb">(
{subj}:URIRef {pred}:URIRef {obj} )</spanx>.
</t>
</section>
<section title="Turtle-like statements">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0xA</spanx> (mnemonic: <spanx style="verb">turtle</spanx> )</t>
<t hangText="shape"><spanx style="verb">( turtle {statements} )</spanx></t>
</list>
</t>
<t>
<spanx style="verb">{statements}</spanx> MUST be a sequnce of <spanx style="verb">(
{subj}:URIRef {preds} )</spanx>, where <spanx style="verb">{preds}</spanx> MUST be a
sequence of <spanx style="verb">( {pred}:URIRef {objs} )</spanx>, where <spanx
style="verb">{objs}</spanx> is a sequence.
</t>
</section>
<section title="RDF vocabulary">
<t>
The following names are associated with <spanx style="verb">( rdf# {name} )</spanx>
forms. Their mnemonic is the lowercased fragment.
</t>
<list style="hanging">
<t hangText="0xB">type</t>
<t hangText="0xC">Property</t>
<t hangText="0xD">Statement</t>
<t hangText="0xE">subject</t>
<t hangText="0xF">predicate</t>
<t hangText="0x10">object</t>
<t hangText="0x11">Bag</t>
<t hangText="0x12">Seq</t>
<t hangText="0x13">Alt</t>
<t hangText="0x14">value</t>
<t hangText="0x15">List</t>
<t hangText="0x16">nil</t>
<t hangText="0x17">first</t>
<t hangText="0x18">rest</t>
<t hangText="0x19">PlainLiteral</t>
</list>
</section>
<section title="RDF embedding">
<t>
<list style="hanging">
<t hangText="name"><spanx style="verb">0x20</spanx> (mnemonic: <spanx style="verb">this-resource</spanx> )</t>
<t hangText="shape"><spanx style="verb">this-resource</spanx></t>
</list>
</t>
<t>
This expression is intended to help embedding RDF metadata alongside or within a
resource. It has the semantics of a blank node that designates this resource. What makes a
resource the current described resource is application-dependent.
</t>
</section>
</section>
<section title="Security Considerations" anchor="sec">
</section>
</middle>
<back>
<references title="Normative References">
<reference anchor="RFC2119">
<front>
<title>
Key words for use in RFCs to Indicate Requirement Levels
</title>
<author initials="S." surname="Bradner" fullname="Scott Bradner">
<organization>Harvard University</organization>
<address><email>sob@harvard.edu</email></address>
</author>
<date month="March" year="1997"/>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
</reference>
<reference anchor="RFC3986">
<front>
<title>
Uniform Resource Identifiers (URI): Generic Syntax
</title>
<author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
<organization>W3C/MIT</organization>
</author>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding">
<organization>Day Software</organization>
</author>
<author initials="L." surname="Masinter" fullname="L. Masinter">
<organization>Adobe Systems</organization>
</author>
<date month="January" year="2005"/>
</front>
<seriesInfo name="RFC" value="3986"/>
<seriesInfo name="STD" value="66"/>
</reference>
<reference anchor="BULK1">
<front>
<title>Binary Uniform Language Kit 1.0</title>
<date day="7" month="August" year="2013"/>
<author initials="P." surname="Thierry" fullname="Pierre Thierry">
<organization>Thierry Technologies</organization>
<address>
<email>pierre@nothos.net</email>
</address>
</author>
</front>
<seriesInfo name="Internet-Draft" value="draft-thierry-bulk-02"/>
</reference>
</references>
<references title="Informative references">
<reference anchor="RDF-CONCEPTS" target="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/">
<front>
<title>Resource Description Framework (RDF): Concepts and Abstract Syntax</title>
<date day="10" month="February" year="2004"/>
<author initials="G." surname="Klyne" fullname="Graham Klyne">
<organization>Nine by Nine</organization>
<address>
<email>GK@NineByNine.org</email>
</address>
</author>
<author initials="J.J." surname="Carroll" fullname="Jeremy J. Carroll">
<organization>Hewlett Packard Labs</organization>
<address>
<email>jjc@hpl.hp.com</email>
</address>
</author>
</front>
</reference>
<reference anchor="BULK-XML">
<front>
<title>BULK Simple XML namespace</title>
<date day="7" month="August" year="2013"/>
<author initials="P." surname="Thierry" fullname="Pierre Thierry">
<organization>Thierry Technologies</organization>
<address>
<email>pierre@nothos.net</email>
</address>
</author>
</front>
<seriesInfo name="Internet-Draft" value="draft-thierry-bulk-xml-00"/>
</reference>
</references>
<section title="Example: RDF Schema vocabulary">
<figure>
<preamble>Here is the text notation of a BULK stream defining references for each element in
the RDF Schema vocabulary. The whole stream is 458 bytes in length.</preamble>
<artwork>
( bulk:version 1 0 )
( bulk:ns 32 ( hash:uuid w128 Oxed460331a89b5742a8de907dff727779 ) )
( bulk:ns 33 ( hash:uuid w128 Ox34ecf6cfc10d5137b80cfd17100368ce ) )
( bulk:define rdfs:schema "http://www.w3.org/2000/01/rdf-schema#" )
( bulk:define rdfs:schema# ( rdf:prefix rdfs:schema ) )
( bulk:define rdfs:resource ( rdfs:schema# "Resource" ) )
( bulk:define rdfs:class ( rdfs:schema# "Class" ) )
( bulk:define rdfs:subclassof ( rdfs:schema# "subClassOf" ) )
( bulk:define rdfs:subpropertyof ( rdfs:schema# "subPropertyOf" ) )
( bulk:define rdfs:comment ( rdfs:schema# "comment" ) )
( bulk:define rdfs:label ( rdfs:schema# "label" ) )
( bulk:define rdfs:domain ( rdfs:schema# "domain" ) )
( bulk:define rdfs:range ( rdfs:schema# "range" ) )
( bulk:define rdfs:seealso ( rdfs:schema# "seeAlso" ) )
( bulk:define rdfs:isdefinedby ( rdfs:schema# "isDefinedBy" ) )
( bulk:define rdfs:literal ( rdfs:schema# "Literal" ) )
( bulk:define rdfs:container ( rdfs:schema# "Container" ) )
( bulk:define rdfs:containermembershipproperty ( rdfs:schema# "ContainerMembershipProperty" ) )
( bulk:define rdfs:member ( rdfs:schema# "member" ) )
( bulk:define rdfs:datatype ( rdfs:schema# "Datatype" ) )
</artwork>
</figure>
<figure>
<preamble>Here is the text notation of a BULK stream containg a small part of the RDF Schema
ontology. The whole stream is 391 bytes in length (the corresponding RDF/XML document would
be 1525 bytes in length).</preamble>
<artwork>
( bulk:version 1 0 )
( bulk:ns 32 ( hash:uuid w128 Oxed460331a89b5742a8de907dff727779 ) )
( bulk:ns 33 ( hash:uuid w128 Ox34ecf6cfc10d5137b80cfd17100368ce ) )
( rdf:turtle
( rdfs:resource
( rdf:type rdfs:class )
( rdfs:isdefinedby rdfs:schema )
( rdfs:label "Resource" )
( rdfs:comment "The class resource, everything." ) )
( rdfs:class
( rdf:type rdfs:class )
( rdfs:isdefinedby rdfs:schema )
( rdfs:label "Class" )
( rdfs:comment "The class of classes." )
( rdfs:subclassof rdfs:resource ) )
( rdfs:subclassof
( rdf:type rdf:property )
( rdfs:isdefinedby rdfs:schema )
( rdfs:label "subClassOf" )
( rdfs:comment "The subject is a subclass of a class." )
( rdfs:range rdfs:class )
( rdfs:domain rdfs:class ) )
( rdfs:subpropertyof
( rdf:type rdf:property )
( rdfs:isdefinedby rdfs:schema )
( rdfs:label "subPropertyOf" )
( rdfs:comment "The subject is a subproperty of a property." )
( rdfs:range rdf:property )
( rdfs:domain rdf:property ) ) )
</artwork>
</figure>
</section>
</back>
</rfc>