- From: Felix Sasaki <fsasaki@w3.org>
- Date: Mon, 1 Jun 2015 18:33:46 +0200
- To: Keith Suderman <suderman@anc.org>
- Cc: public-linked-json@w3.org
- Message-Id: <37C223B2-D522-4CE5-92C6-544E2886D02B@w3.org>
Good point wrt CDATA, thanks a lot for the feedback, Keith.
Best,
Felix
> Am 01.06.2015 um 17:12 schrieb Keith Suderman <suderman@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 <mailto: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 <http://www.w3.org/2005/11/its>">
>> <file id="f1">
>> <ex:meta xmlns:ex="sdf">
>> {
>> "@context": {
>> "dbont": "http://dbpedia.org/ontology/ <http://dbpedia.org/ontology/>",
>> "xsd": "http://www.w3.org/2001/XMLSchema# <http://www.w3.org/2001/XMLSchema#>",
>> "born": {
>> "@id": "http://dbpedia.org/ontology/birthDate <http://dbpedia.org/ontology/birthDate>",
>> "@type": "xsd:dateTime"
>> },
>> "population": {
>> "@id": "http://dbpedia.org/ontology/populationTotal <http://dbpedia.org/ontology/populationTotal>",
>> "@type": "xsd:integer"
>> },
>> "person": "http://schema.org/Person <http://schema.org/Person>",
>> "place": "http://schema.org/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 <http://schema.org/Place>"
>> its:taIdentRef="http://dbpedia.org/resource/Berlin <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 <http://schema.org/Person>"
>> its:taIdentRef="http://dbpedia.org/resource/Marlene_Dietrich <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 <http://schema.org/Person>"
>> its:taIdentRef="http://dbpedia.org/resource/Nastassja_Kinski <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 16:34:01 UTC