-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for rdf:dirLangString #49
Comments
+1 to @gkellogg I would use However, this might slightly break backward compatibility: A document: <?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.com/"
xmlns:its="http://www.w3.org/2005/11/its">
<rdf:Description rdf:about="foo" xml:lang="en" its:dir="ltr">
<ex:title>Foo</ex:title>
</rdf:Description>
</rdf:RDF> that is parsed in RDF/XML 1.1 as: ex:foo ex:title "Foo"^^en ; its:dir "ltr" . is now parsed: ex:foo ex:title "Foo"^^en--ltr . |
Arguably, any use of |
About backward compatibility: |
Maybe we define an |
A property of We can have @rubensworks proposed |
Note that
+1
+1 |
Here are some potential test cases: Language with no direction<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/" xml:lang="en" rdf:version="1.2">
<rdf:Description rdf:about="http://example.org/joe" ex:name="bar"/>
</rdf:RDF> Should result in Language with direction<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0" its:dir="ltr" xml:lang="en" rdf:version="1.2">
<rdf:Description rdf:about="http://example.org/joe" ex:name="bar"/>
</rdf:RDF> Should result in Language with direction and no RDF version<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0" its:dir="ltr" xml:lang="en">
<rdf:Description rdf:about="http://example.org/joe" ex:name="bar"/>
</rdf:RDF> Should result in Language with direction and no ITS version<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/" xmlns:its="http://www.w3.org/2005/11/its" its:dir="ltr" xml:lang="en" rdf:version="1.2">
<rdf:Description rdf:about="http://example.org/joe" ex:name="bar"/>
</rdf:RDF> Could result in Language with direction on element directly<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/" xmlns:its="http://www.w3.org/2005/11/its" rdf:version="1.2">
<rdf:Description rdf:about="http://example.org/joe">
<ex:name xml:lang="en" its:version="2.0" its:dir="ltr">bar</ex:name>
</rdf:Description>
</rdf:RDF> Different form, with attributes on element, rather than inherited from ancestors. Direction with no language<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0" its:dir="ltr" rdf:version="1.2">
<rdf:Description rdf:about="http://example.org/joe" ex:name="bar"/>
</rdf:RDF> Should result in |
Just mentioning w3c/rdf-star-wg#141 here as well regarding the issue of backwards-compatibility, to have the discussions linked. |
Adding a version (here, Turtle, TriG) is a possibility and might be a good idea generally for the future. RDF 1.2 does not change the vast majority of RDF data. Triple terms and base direction will be uncommon. My concern is that we end up "splitting the world" into "RDF 1.1" and "RDF 1.2". All RDF 1.1 is valid RDF 1.2 and RDF 1.2 features will be uncommon (IMO). If an RDF 1.2 system have to get clever (scan data first; or implementation additional content negotiation when it currently uses a plain framework for HTTP), I think we will see slower migration or systems that are RDF 1.2 only, to the exclusion of RDF 1.1 consumers (e.g. new media types then RDF 1.2 systems only supporting those media types. (c.f. XML 1.1) |
@gkellogg Thank you for the examples. I can't work out from the spec if adding new vocabulary - We have to decide whether that is OK. Base direction is a somewhat different case to triple terms in this respect. There is a fear of syntax errors. But rejecting requests (profiles, content-negotiation cases) is bad as well as. There is no perfect answer. I agree that base direction, no language should be ignored. |
I sympathize, and we faced similar discussions with JSON-LD 1.1 and its use of
For JSON-LD, we made version 1.1 the default behavior, with a way to specify it so that 1.0 versions would recognize this. We could, of course, do away with
My parser (currently) just ignores this as an unknown attribute. 5.1.4 Attribute Event indicates that local names other than
|
I would not want such predicates to be ignored, but rather, to be treated as just as opaque as any other unrecognized predicate. Similarly, I would want RDF 1.1 systems to treat triple terms as literals, which, it occurs to me, could be done just by wrapping whatever markup code we finalize on in quotation marks, e.g. —
Hey, presto, it's a quoted triple and a quoted triple term! Maybe it warrants a specific literal type, like —
|
We don't have a choice about what 1.1 implementations do when faced with an attribute from the RDF namespace, as the spec says these are forbidden. Some implementations may through an error, others ignore, and others may (erroneously) output a triple. It's the 1.2 behavior we can control, and it's an open question if we use
Again, we can't change the behavior of 1.1 systems, and 1.2 systems should output a Triple Term. |
Yes. But what is the correct behavior of 1.1 systems that encounter this triple?
If they are required to choke on I am thinking that an RDF&SPARQL 1.2-aware application could use SPARQL 1.1 to query a SPARQL 1.1 engine atop a RDF 1.1 datastore that holds data such as the above, and get output including the above triple, and handle the literal typed as tripleterm as a tripleterm. SPARQL UPDATE 1.1 queries could be used to insert/update that data. |
See the schema in the RDF/XML spec. I uses Emacs nXML mode which is RDF/XML schema aware. XML Attribute |
That is well-defined in RDF 1.1 and would be the same in RDF 1.2 (due to the charter). The triple term would be in the value space (if possible at all), not part of the RDF abstract data model. Triple terms as datatype literals has been discussed before. It is not related to RDF/XML - discussion needs to be in the unstar discussions. |
I believe that it would be a good practice (from now own) to encourage the explicit mention of the RDF version as in As for the direction I agree with @gkellogg : In other words I like the proposal of recommending |
Closed via #54. |
Although HTML has a
dir
attribute that can be used to specify the initial text direction of text elements, XML has not such attribute defined.In HTML, you can say something like the following (from here):
In RDF/XML we would need to define an attribute to do what HTML
dir
does for RDF/XML literals. This could be by adding an attribute to the existingrdf
namespace, or using some other namespace. SPARQL XML Results uses the Internationalization Tag Setits
(xmlns:its="http://www.w3.org/2005/11/its"
).Propagation rules would be like
xml:lang
, with the attribute defining how strings in descendant elements are treated. For instance, Example 8 might be updated as followsThe text was updated successfully, but these errors were encountered: