On Tue, May 20, 2014 at 6:29 AM, Bardo Nelgen
<[email protected]> wrote:
> What am I missing !??


First, your data isn't a complete RDF document, (e.g., the namespace
for i18n21 isn't declared, and there's no closing for the rdf:RDF
element.  It's much easier to diagnose problems when you provide
complete working data.  That said, it's easy enough to fix to get
something like this:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:i18n21="urn:foo:"
    xmlns:timed="http://namespaces.semaworx.org/timed#";
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";>
  <timed:versionedPayload
rdf:about="http://resources.semaworx.eu/timed/elements/contentincrediblyuniqueid003";>
    <xliff:target rdf:parseType="Literal"><i18n21:message
xmlns:i18n21="urn:foo:" key="cityAPI_teaser_subhead">Airlines,
Kneipen, U-Bahn, Coffee Shops, Beauty-Stores, Heimdekor-Läden,
Sportveranstaltungen…</i18n21:message></xliff:target>
  </timed:versionedPayload>
</rdf:RDF>

It might be better to look at that in the Turtle serialization,
because any literals will be written in a way that's closer to what
you'd write in SPARQL, if not the same, and things like language tags
will be much more explicit.

@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xliff: <urn:oasis:names:tc:xliff:document:1.2> .
@prefix timed: <http://namespaces.semaworx.org/timed#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix i18n21: <urn:foo:> .

<http://resources.semaworx.eu/timed/elements/contentincrediblyuniqueid003>
        a             timed:versionedPayload ;
        xliff:target  "<i18n21:message xmlns:i18n21=\"urn:foo:\"
key=\"cityAPI_teaser_subhead\">Airlines, Kneipen, U-Bahn, Coffee
Shops, Beauty-Stores, Heimdekor-Läden,
Sportveranstaltungen…</i18n21:message>"^^rdf:XMLLiteral .

Notice that the value of the `xliff:target` property isn't a language
tagged string, but a literal of type rdf:XMLLiteral.  That means that
the SPARQL function lang() will return "" for it.  If you just want
the string "Airlines, Kneipen, U-Bahn, Coffee Shops, Beauty-Stores,
Heimdekor-Läden, Sportveranstaltungen…" with the language tag "de-de",
you'd instead use the code:

<http://resources.semaworx.eu/timed/elements/contentincrediblyuniqueid003>
        a             timed:versionedPayload ;
        xliff:target  "Airlines, Kneipen, U-Bahn, Coffee Shops,
Beauty-Stores, Heimdekor-Läden, Sportveranstaltungen…"@de-de .

In RDF/XML, that would be

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:i18n21="urn:foo:"
    xmlns:timed="http://namespaces.semaworx.org/timed#";
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";>
  <timed:versionedPayload
rdf:about="http://resources.semaworx.eu/timed/elements/contentincrediblyuniqueid003";>
    <xliff:target xml:lang="de-de">Airlines, Kneipen, U-Bahn, Coffee
Shops, Beauty-Stores, Heimdekor-Läden,
Sportveranstaltungen…&lt;/i18n21:message&gt;</xliff:target>
  </timed:versionedPayload>
</rdf:RDF>

//JT



-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to