This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena-site.git
The following commit(s) were added to refs/heads/main by this push:
new c38ec6820 GH-1924: Document "long" Turtle/TriG format variant
c38ec6820 is described below
commit c38ec68202102f14e4471a25feb4b4bb7d7d549a
Author: Ryan Shaw <[email protected]>
AuthorDate: Sat Jul 8 17:08:44 2023 -0400
GH-1924: Document "long" Turtle/TriG format variant
---
source/documentation/io/rdf-output.md | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/source/documentation/io/rdf-output.md
b/source/documentation/io/rdf-output.md
index dfb9196b6..af196b702 100644
--- a/source/documentation/io/rdf-output.md
+++ b/source/documentation/io/rdf-output.md
@@ -149,6 +149,11 @@ Example:
:b foaf:knows :a .
+The default pretty printed output (shown above) aligns predicates
+and objects, which can result in wide lines. For a narrower
+indentation style, set `ttl:indentStyle` to `long`.
+See [Turtle and Trig format options](#opt-turtle-trig).
+
Pretty printed formats:
| RDFFormat | Same as |
@@ -250,6 +255,7 @@ otherwise noted, the setting applies to both Turtle and
TriG.
| Context setting | Cmd line | Values |
|-----------------|----------|--|
| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11",
"at", "n3" |
+| RIOT.symTurtleIndentStyle | "ttl:indentStyle" | "wide", "long" |
| RIOT.symTurtleOmitBase | "ttl:omitBase" | "true", "false" |
<p> </p>
@@ -275,6 +281,25 @@ and in code:
.lang(Lang.TTL)
.output(System.out);
```
+
+##### _Setting indent style_
+```
+ riot --set ttl:indentStyle=long --formatted=ttl file1.rdf file2.nt ...
+```
+and in code:
+```
+RDFWriter.source(model)
+ .format(RDFFormat.TURTLE_LONG)
+ .output(System.out);
+```
+or:
+```
+ RDFWriter.source(model)
+ .set(RIOT.symTurtleIndentStyle, "long")
+ .lang(Lang.TTL)
+ .output(System.out);
+```
+
##### _Base URI_
Output can be written with relative URIs and no base. Note: such output is not