- From: Keith Suderman <suderman@anc.org>
- Date: Mon, 1 Jun 2015 11:12:16 -0400
- To: Felix Sasaki <fsasaki@w3.org>
- Cc: public-linked-json@w3.org
- Message-Id: <EA67C8A0-C9B3-4EB2-8C91-62C144B2782E@anc.org>
Hi Felix, You will want to wrap the json-ld in a <![CDATA[]]> section. That is: <ex:meta xmlns:ex="sdf"> <![CDATA[ { "json":"here" } ]]> </ex:meta> The XML parser will ignore everything inside the CDATA section, otherwise things that might look like XML in the json-ld (ampersands, <, etc) will cause the parser to report an error. Cheers, Keith On Jun 1, 2015, at 3:11 AM, Felix Sasaki <fsasaki@w3.org> wrote: > Hi all, > > I want to embedd json-ld into an XML file, see below. Is there any guidance for that? Does the below seem to be appropriate? > > Thanks, > > Felix > > <xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="de" > xmlns:its="http://www.w3.org/2005/11/its"> > <file id="f1"> > <ex:meta xmlns:ex="sdf"> > { > "@context": { > "dbont": "http://dbpedia.org/ontology/", > "xsd": "http://www.w3.org/2001/XMLSchema#", > "born": { > "@id": "http://dbpedia.org/ontology/birthDate", > "@type": "xsd:dateTime" > }, > "population": { > "@id": "http://dbpedia.org/ontology/populationTotal", > "@type": "xsd:integer" > }, > "person": "http://schema.org/Person", > "place": "http://schema.org/Place" > }, > "@graph": [ > { > "@id": "dbpedia:Marlene_Dietrich", > "@type": "person", > "born": "1901-12-27" > }, > { > "@id": "dbpedia:Berlin", > "@type": "place", > "population": "3746444" > } > ] > } > </ex:meta> > <unit id="1"> > <segment> > <source>Welcome to the city of Berlin, the birthplace of Marlene Dietrich and > Nastassja Kinski!</source> > <target>Welcome to the <mrk id="m1" its:taClassRef="http://schema.org/Place" > its:taIdentRef="http://dbpedia.org/resource/Berlin" > its:taConfidence="0.12371909618377686">city of Berlin</mrk> (Population as > of 2015: 3415091), the birthplace of <mrk id="m2" > its:taClassRef="http://schema.org/Person" > its:taIdentRef="http://dbpedia.org/resource/Marlene_Dietrich" > its:taConfidence="0.2946581542491913">Marlene Dietrich</mrk> (born 1901) and > <mrk id="m3" its:taClassRef="http://schema.org/Person" > its:taIdentRef="http://dbpedia.org/resource/Nastassja_Kinski" > its:taConfidence="0.2504904866218567">Nastassja Kinski</mrk> (born 1961) > !</target> > </segment> > </unit> > </file> > </xliff> ------------------------------ Research Associate Department of Computer Science Vassar College Poughkeepsie, NY
Received on Monday, 1 June 2015 15:12:41 UTC