3 ms·
<p xmlns:ex="http://example.org/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> Two rectangles (the example markup for them are stored
by Groxx 13y ago
<p xmlns:ex="http://example.org/vocab#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
Two rectangles (the example markup for them are stored in a triple):
<svg xmlns="http://www.w3.org/2000/svg"
property="ex:markup"
datatype="rdf:XMLLiteral">
... svg ...
</svg>
</p>
Does `property="ex:markup"` and `datatype="rdf:XMLLiteral"` seem to anyone else like a phenomenally bad idea? Don't inject namespaces in values! How would you escape that anyway?
Is there some reason we don't have e.g. <svg ex:property="markup" rdf:datatype="XMLLiteral" />, or can you not do that with XML? And if so, why not? It seems like it would be very useful for mixing in data like this.
- porges 13y agoProperty and Datatype are in the HTML namespace* and their values are namespaced identifiers (in XML, QNames). The identifiers are namespaced so that if you have differing vocabs with the same property names (or datatypes), you can distinguish which one you're talking about. Your proposed transformation means that Property lives in the example namespace, meaning it has a completely different interpretation, which is specific to the example namespace. *: (before someone pulls me up on this, it's not 100% correct)
- Groxx 13y agoah, so 'property' and 'datatype' are intended to be paired, and intended to be used to store namespaced values? I can't really find anything describing them as such, but then they're about as difficult to search for as it's possible to be :/ if you have a link, I'm curious and I'd appreciate it, but I'll take you at your word :) Still leaves a bad taste in my mouth (you can't have two on the same element, for example. unless you can whitespace-separate them? and still, what if your value contains a colon?), but I guess less so.