-
Notifications
You must be signed in to change notification settings - Fork 62
/
README.html
322 lines (237 loc) · 11.1 KB
/
README.html
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<title>Raptor RDF Syntax Library</title>
<link rel="meta" type="application/rdf+xml" title="DOAP" href="raptor.rdf" />
</head>
<body>
<h1 style="text-align:center">Raptor RDF Syntax Library</h1>
<h2 style="text-align:center"><a href="https://www.dajobe.org/">Dave Beckett</a></h2>
<h2>Overview</h2>
<p><a href="https://librdf.org/raptor/">Raptor</a>
is a free software / Open Source C library that provides
a set of parsers and serializers that
generate Resource Description Framework (RDF) triples
by parsing syntaxes or serialize the triples into a syntax.
The supported parsing syntaxes are RDF/XML, N-Quads, N-Triples 1.0
and 1.1, TRiG, Turtle 2008 and 2013, RDFa 1.0 and 1.1, RSS tag soup
including all versions of RSS, Atom 0.3 and Atom 1.0, GRDDL and
microformats for HTML, XHTML and XML. The serializing syntaxes are
RDF/XML (regular, abbreviated, XMP), Turtle 2013, N-Quads, N-Triples
1.1, Atom 1.0, RSS 1.0, GraphViz DOT, HTML, JSON and mKR.
</p>
<p>Raptor was designed to work closely with the
<a href="https://librdf.org/">Redland RDF library</a>
(<b>R</b>DF <b>P</b>arser <b>T</b>oolkit f<b>o</b>r <b>R</b>edland)
but is entirely separate. It is a portable library that works
across many POSIX systems (Unix, GNU/Linux, BSDs, OSX, cygwin, win32).
</p>
<p>A summary of the changes can be found in the
<a href="NEWS.html">NEWS</a> file,
detailed API changes in the <a href="RELEASE.html">release notes</a>
and file-by-file changes in the <a href="ChangeLog">ChangeLog</a>.
</p>
<p>Details of upgrading from Raptor 1 as described in the
<a href="UPGRADING.html">Upgrading document</a>.
</p>
<ul>
<li>Designed to integrate well with <a href="https://librdf.org/">Redland</a></li>
<li>Parses content on the web if <a href="https://curl.se/libcurl/">libcurl</a>, <a href="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home">libxml2</a> or BSD libfetch is available.</li>
<li>Supports all RDF terms including datatyped and XML literals</li>
<li>Optional features including parsers and serialisers can be selected at configure time.</li>
<li>Language bindings to Perl, PHP, Python and Ruby when used via Redland</li>
<li>No memory leaks</li>
<li>Fast</li>
<li>Standalone <a href="rapper.html">rapper</a> RDF parser utility program</li>
</ul>
<p>Known bugs and issues are recorded in the
<a href="https://bugs.librdf.org/">Redland issue tracker</a>
or at
<a href="https://github.com/dajobe/raptor/issues">GitHub issues for Raptor</a>.
</p>
<h2>Parsers</h2>
<h3>RDF/XML Parser</h3>
<p>A Parser for the standard
<a href="https://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML syntax</a>.
</p>
<ul>
<li>Fully handles the <a href="https://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML syntax updates</a> for <a href="https://www.w3.org/TR/xmlbase/">XML Base</a>, <code>xml:lang</code>, RDF datatyping and Collections.</li>
<li>Handles all RDF vocabularies such as <a href="http://www.foaf-project.org/">FOAF</a>, <a href="http://www.purl.org/rss/1.0/">RSS 1.0</a>, <a href="http://dublincore.org/">Dublin Core</a>, <a href="https://www.w3.org/TR/owl-features/">OWL</a>, <a href="http://usefulinc.com/doap">DOAP</a></li>
<li>Handles <code>rdf:resource</code> / <code>resource</code> attributes</li>
<li>Uses <a href="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home">libxml</a> XML parser</li>
</ul>
<h3>N-Quads Parser</h3>
<p>A parser for the
<a href="https://www.w3.org/TR/2013/CR-n-quads-20131105/">RDF 1.1 N-Quads - A line-based syntax for an RDF datasets</a>, W3C Candidate Recommendation, 05 November 2013.
This is an extension to N-Triples, providing an optional 4th context
graph term at the end of the line when a triple is associated with a
named graph.
</p>
<h3>N-Triples Parser</h3>
<p>A parser for the
<a href="https://www.w3.org/TR/2013/CR-n-triples-20131105/">RDF 1.1 N-Triples - A line-based syntax for an RDF graph</a>, W3C Candidate Recommendation, 05 November 2013 (aka N-Triples 2013)
based on the older
<a href="https://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a>.
</p>
<h3>Turtle Parser</h3>
<p>A parser for the
<a href="https://www.w3.org/TR/2013/CR-turtle-20130219/">Turtle Terse RDF Triple Language</a> W3C Candidate Recommendation, 19 February 2013
based on earlier work
<a href="https://www.dajobe.org/2004/01/turtle/">Turtle Terse RDF Triple Language</a> (2004)
</p>
<h3>TRiG Parser</h3>
<p>A parser for the
<a href="https://www.w3.org/TR/2014/REC-trig-20140225/">RDF 1.1 TriG RDF Dataset Language</a>.
</p>
<p>The parser does not support the entire 1.1 TRiG specification; the
'{' ... '}' around a graph and the <code>GRAPH</code> keyword may not
be omitted.
</p>
<h3>RSS "tag soup" parser</h3>
<p>A parser for the multiple XML RSS formats that use the elements
such as channel, item, title, description in different ways.
Attempts to turn the input into
<a href="http://www.purl.org/rss/1.0/">RSS 1.0</a>
RDF triples. True <a href="http://www.purl.org/rss/1.0/">RSS 1.0</a>,
as a full RDF vocabulary, is best parsed by the RDF/XML parser.
It also generates triples for RSS enclosures.
</p>
<p>This parser also provides support for the Atom 1.0 syndication
format defined in IETF
<a href="http://www.ietf.org/rfc/rfc4287.txt">RFC 4287</a>
as well as the earlier Atom 0.3.
</p>
<h3>GRDDL and microformats parser</h3>
<p>A parser/processor for
<a href="https://www.w3.org/TR/2007/REC-grddl-20070911/">Gleaning Resource Descriptions from Dialects of Languages (GRDDL)</a>
syntax, W3C Recommendation of 2007-09-11 which allows reading XHTML
and XML as RDF triples by using profiles in the document that declare
XSLT transforms from the XHTML or XML content into RDF/XML or other
RDF syntax which can then be parsed. It uses either an XML or
a lax HTML parser to allow HTML tag soup to be read.
</p>
<p>The parser passes the all the GRDDL tests as of Raptor 1.4.16.
</p>
<p>The parser also handles hCard and hReview using public XSL sheets.
</p>
<h3>RDFa parser</h3>
<p>A parser for
<a href="https://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/">RDFa 1.0</a>
(W3C Recommendation 14 October 2008) and
<a href="https://www.w3.org/TR/2012/REC-rdfa-core-20120607/">RDFa 1.1</a>
(W3C Recommendation 07 June 2012)
implemented via <a href="https://github.com/rdfa/librdfa">librdfa</a>
linked inside Raptor. librdfa was, written primarily by Manu Sporny
of Digital Bazaar and is licensed with the same license as Raptor.
</p>
<p>As of Raptor 2.0.8 the RDFa parser passes all of the
<a href="https://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/">RDFa 1.0 test suite</a>
except for 4 tests and all of the
<a href="http://rdfa.info/dev/">RDFa 1.1 test suite</a>
except for 30 tests.
</p>
<h2>Serializers</h2>
<h3>RDF/XML Serializer</h3>
<p>A serializer to the standard
<a href="https://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML syntax</a>
as revised by the
<a href="https://www.w3.org/2001/sw/RDFCore/">W3C RDF Core working group</a>
in 2004. This writes a plain triple-based RDF/XML serialization with
no optimisation or pretty-printing.
</p>
<p>A second serializer is provided using several of the RDF/XML
abbreviations to provide a more compact readable format, at the cost
of some pre-processing. This is suitable for small documents.
</p>
<h3>N-Quads Serializer</h3>
<p>A serializer for the
<a href="https://www.w3.org/TR/2013/CR-n-quads-20131105/">RDF 1.1 N-Quads -A line-based syntax for an RDF datasets</a>, W3C Candidate Recommendation, 05 November 2013.
This is an extension to N-Triples, providing an optional 4th context
graph term at the end of the line when a triple is associated with a
named graph.
</p>
<h3>N-Triples Serializer</h3>
<p>A serializer for the
<a href="https://www.w3.org/TR/2013/CR-n-triples-20131105/">RDF 1.1
N-Triples - A line-based syntax for an RDF graph</a> (aka N-Triples 2013)
based on the earlier
<a href="https://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a>
syntax as used by the
<a href="https://www.w3.org/2001/sw/RDFCore/">W3C RDF Core working group</a>
for the <a href="https://www.w3.org/TR/rdf-testcases/">RDF Test Cases</a>.
</p>
<h3>Atom 1.0 Serializer</h3>
<p>A serializer to the Atom 1.0 syndication format defined in IETF
<a href="http://www.ietf.org/rfc/rfc4287.txt">RFC 4287</a>.
</p>
<h3>JSON Serializers</h3>
<p>Two serializers for to write triples encoded in JSON:</p>
<ol>
<li><code>json</code>: in a resource-centric abbreviated form
like Turtle or RDF/XML-Abbreviated as defined by:
<a href="https://www.w3.org/TR/2013/NOTE-rdf-json-20131107/">RDF 1.1
JSON Alternate Serialization (RDF/JSON)</a>, W3C Working Group Note, 07 November 2013
</li>
<li><code>json-triples</code>: a triple-centric format based on the
SPARQL results in JSON format.</li>
</ol>
<p>JSON-LD is not supported - too complex to implement.</p>
<h3>GraphViz DOT Serializer</h3>
<p>An serializer to the GraphViz
<a href="http://www.graphviz.org/doc/info/lang.html">DOT format</a>
which aids visualising RDF graphs.
</p>
<h3>RSS 1.0 Serializer</h3>
<p>A serializer to the
<a href="http://purl.org/rss/1.0/spec">RDF Site Summary (RSS) 1.0</a>
format.
</p>
<h3>Turtle Serializer</h3>
<p>A serializer for the
<a href="https://www.w3.org/TR/2013/CR-turtle-20130219/">Turtle Terse RDF Triple Language</a> W3C Candidate Recommendation, 19 February 2013
</p>
<h3>XMP Serializer</h3>
<p>An alpha quality serializer to the Adobe XMP profile of RDF/XML
suitable for embedding inside an external document.
</p>
<h3>mKR Serializer</h3>
<p>A serializer for the
<a href="http://contextknowledgesystems.org/CKS.html">mKR (my Knowledge Representation) Language</a>
</p>
<h2>Documentation</h2>
<p>The public API is described in the
<a href="libraptor.html">libraptor.3</a> UNIX manual page.
It is demonstrated in the
<a href="rapper.html">rapper</a>
utility program which shows how to call the parser and write
the triples in a serialization. When Raptor is used inside
<a href="https://librdf.org/">Redland</a>,
the Redland documentation explains
how to call the parser and contains several example programs.
There are also further examples in the <tt>example</tt> directory
of the distribution.
</p>
<p>To install Raptor see the <a href="INSTALL.html">Installation document</a>.
</p>
<h2>Sources</h2>
<p>The packaged sources are available from
<a href="http://download.librdf.org/source/">http://download.librdf.org/source/</a> (master site)
The development GIT sources can also be
<a href="https://github.com/dajobe/raptor">browsed at GitHub</a>
or checked out at git://github.com/dajobe/raptor.git
</p>
<h2>License</h2>
<p>This library is free software / open source software released
under the LGPL (GPL) or Apache 2.0 licenses. See
<a href="LICENSE.html">LICENSE.html</a> for full details.
</p>
<h2>Mailing Lists</h2>
<p>The <a href="https://librdf.org/lists/">Redland mailing lists</a>
discusses the development and use of Raptor and Redland as well as
future plans and announcement of releases.
</p>
<hr />
<p>Copyright (C) 2000-2023 <a href="https://www.dajobe.org/">Dave Beckett</a><br />Copyright (C) 2000-2005 <a href="https://www.bristol.ac.uk/">University of Bristol</a></p>
</body>
</html>