You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2021/04/05 12:33:50 UTC

[jena-site] 01/01: Minimal documentation for TriX

This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch trix
in repository https://gitbox.apache.org/repos/asf/jena-site.git

commit 5eb04f49b55c43d11cc9c5c5aba7b4857041bac8
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Mon Apr 5 13:33:38 2021 +0100

    Minimal documentation for TriX
---
 source/documentation/io/__index.md |  2 ++
 source/documentation/io/trix.md    | 43 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/source/documentation/io/__index.md b/source/documentation/io/__index.md
index d24a516..658f63d 100644
--- a/source/documentation/io/__index.md
+++ b/source/documentation/io/__index.md
@@ -61,6 +61,8 @@ The file extensions understood are:
 
 `.n3` is supported but only as a synonym for Turtle.
 
+The [TriX](trix.html) support is for the core TriX format.
+
 In addition, if the extension is `.gz` the file is assumed to be gzip
 compressed. The file name is examined for an inner extension. For
 example, `.nt.gz` is gzip compressed N-Triples.
diff --git a/source/documentation/io/trix.md b/source/documentation/io/trix.md
new file mode 100644
index 0000000..50e9371
--- /dev/null
+++ b/source/documentation/io/trix.md
@@ -0,0 +1,43 @@
+---
+title: TriX support in Apache Jena
+---
+
+Jena supports [TriX](http://www.hpl.hp.com/techreports/2004/HPL-2004-56.html), a
+simple XML format for RDF, for both reading and writing RDF data.
+
+The support is of the TriX core, without processing instructions.
+
+Both the original HPlabs and W3C DTDs are supported for reading. Writing
+is according to the W3C DTD (i.e. `<trix>` rather than `<TriX>`).
+
+The format is extended for [RDF-star](https://w3c.github.io/rdf-star/) with
+embedded triples by allowing nested `<triple>`.
+
+Example:
+
+The Turtle:
+```
+PREFIX :      <http://example/>
+
+:s      :p      "ABC" .
+```
+is in Trix:
+
+```
+<trix xmlns="http://www.w3.org/2004/03/trix/trix-1/">
+  <graph>
+    <triple>
+      <uri>http://example/s</uri>
+      <uri>http://example/p</uri>
+      <plainLiteral>ABC</plainLiteral>
+    </triple>
+  </graph>
+</trix>
+```
+
+
+Note: This format should not be confused with RDF/XML, the W3C standardised XML
+format for RDF.
+
+
+