@@ -535,6 +535,10 @@ <h3>RDF Version Announcement</h3>
535
535
Location: http://example.com/document.ttl
536
536
</ pre >
537
537
538
+ < p > Servers are also expected to announce the version in-line,
539
+ when the format supports in-line version announcement
540
+ (such as [[[RDF12-TURTLE]]] [[RDF12-TURTLE]]).</ p >
541
+
538
542
< p > When requesting an RDF document from an HTTP server, a client
539
543
can use the < code > version</ code > parameter
540
544
during < a data-cite ="webarch#frag-coneg "> content negotiation</ a > [[WEBARCH]],
@@ -543,12 +547,20 @@ <h3>RDF Version Announcement</h3>
543
547
544
548
< pre class ="box http "> GET /document.ttl HTTP/1.1
545
549
Host: example.com
546
- Accept: text/turtle; version=1.2
550
+ Accept: text/turtle; version=" 1.2"
547
551
</ pre >
548
552
< p >
549
553
Section < a href ="#defined-version-labels " class ="sectionRef "> </ a > defines < a > version labels</ a >
550
554
to be used with the < code > version</ code > parameter and in < a > concrete RDF syntax</ a > .
551
555
</ p >
556
+
557
+ < p class ="note "> As HTTP < a data-cite ="webarch#frag-coneg "> content negotiation</ a > is advisory,
558
+ clients recieving a document should be prepared to properly handle a document
559
+ of the requested media type but potentially having a `version` other than what was
560
+ requested.
561
+ Systems may consider down-grading the content to an appropriate version
562
+ as discussed in < a href ="#defined-version-labels " class ="sectionRef "> </ a > ,
563
+ or by returning a `406 "Not Acceptable"` status in the response.</ p >
552
564
</ section >
553
565
</ section >
554
566
@@ -612,6 +624,49 @@ <h3>Version Labels</h3>
612
624
</ tr >
613
625
</ tbody >
614
626
</ table >
627
+
628
+ < p > For serializations supporting in-line version annouoncement,
629
+ the version announcement SHOULD be made early in the document
630
+ and certainly before serializing any feature depending on that version.</ p >
631
+
632
+ < section id ="server-considerations " class ="informative ">
633
+ < h4 > Server considerations</ h4 >
634
+ < p > When serializing a graph or dataset which uses features incompatible
635
+ with a requested version, servers can consider different alternatives:</ p >
636
+
637
+ < ol >
638
+ < li > Downgrade < a > Triple Terms</ a > by using an algorithm such
639
+ as < em > Unstar</ em > ("1.2" to "1.2-basic" or "1.1").
640
+ < div class ="ednote "> Fix this when such an algorithmm is defined.</ div > </ li >
641
+ < li > Downgrade < a > directional language-tagged strings</ a >
642
+ to a < a > literal</ a > with a < a > datatype IRI</ a > ,
643
+ using < a data-cite ="JSON-LD11#the-i18n-namespace "> the `i18n` namespace</ a > , as defined in [[JSON-LD11]]
644
+ ("1.2" or "1.2-basic" to "1.1").</ li >
645
+ < li > Return `406 "Not Acceptable"`.</ li >
646
+ < li > Ignore the requested version and return a native representation.</ li >
647
+ </ ol >
648
+
649
+ < p class ="note "> The principle here is to follow the
650
+ < a href ="https://en.wikipedia.org/wiki/Robustness_principle "> Robustness principle</ a >
651
+ (also known as Postel's Law):
652
+ servers should be conservative in what they send, be liberal in what they accept.</ p >
653
+ </ section >
654
+
655
+ < section id ="client-considerations " class ="informative ">
656
+ < h4 > Client considerations</ h4 >
657
+ < p > If a document has no stated `version` (either by HTTP header or internal),
658
+ systems can assume the version is `"1.2"`, which is compatible
659
+ with all RDF versions.</ p >
660
+ < p > When parsing a document with conflicting versions,
661
+ or when parsing a document using unsupported versions, a parser
662
+ may:</ p >
663
+ < ul >
664
+ < li > Ignore the version directive.</ li >
665
+ < li > Raise an error and abort.</ li >
666
+ < li > Issue a warning and ignore the triple.</ li >
667
+ < li > Parse the structure, but emit triples consistent with the declared version.</ li >
668
+ </ ul >
669
+ </ section >
615
670
</ section >
616
671
617
672
< section id ="rdf-strings ">
@@ -2369,7 +2424,7 @@ <h3>Acknowledgments for RDF 1.2</h3>
2369
2424
< h2 > Changes between RDF 1.1 and RDF 1.2</ h2 >
2370
2425
2371
2426
< ul >
2372
- < li > Added < a href ="#section-version-announcement "class ="sectionRef "> </ a >
2427
+ < li > Added < a href ="#section-version-announcement " class ="sectionRef "> </ a >
2373
2428
for announcing RDF versions in RDF documents via the HTTP Content-Type header and/or syntax.</ li >
2374
2429
< li > Added < a href ="#section-basic-full-interop " class ="sectionRef "> </ a >
2375
2430
for informative mappings between RDF [=Full=] and RDF [=Basic=].</ li >
0 commit comments