Ian, The following is the way to include the XML:
<dc:title rdf:parseType="Literal"><b>This is a title</b></dc:title> When you want to check RDF/XML syntax, try the W3C RDF Validation Service. [1] Here's a complete valid RDF/XML document that contains literal XML: <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description rdf:about="http://www.w3.org/"> <dc:title rdf:parseType="Literal"><b>This is a title</b></dc:title> </rdf:Description> </rdf:RDF> [1] http://www.w3.org/RDF/Validator/ Regards, ___________________________________________________________________________ Arthur Ryman, PhD, DE Chief Architect, Project and Portfolio Management IBM Software, Rational Markham, ON, Canada | Office: 905-413-3077, Cell: 416-939-5063 Twitter | Facebook | YouTube From: Ian Green1 <[email protected]> To: Dave <[email protected]> Cc: [email protected] Date: 03/18/2010 01:08 PM Subject: Re: [oslc-core] Need for an XML literal value type Sent by: [email protected] One glitch with this is that you cannot put xml, as a string, in an RDF/XML inner text. that's what parseType="Literal" is for. eg <dc:title><b>This is a title</b></dc:title> is not valid in RDF/XML. parseType literal yields a typed RDF literal of rdf:datatype rdf:XMLLiteral, in the RDF type model. I suppose you can always escape xml into a string but this is mostly inconvenient and unnecessary. i agree that these could be separate resources with the appropriate media-type, and in some cases this is preferred. in the case of RM v1, we chose to have inlined data because it felt natural; separate resources complicates the api for resource creation should mandatory xhtml values have to be created before the requirement referencing that value can be created. best wishes, -ian [email protected] (Ian Green1/UK/IBM@IBMGB) Chief Software Architect, Requirements Definition and Management IBM Rational From: Dave <[email protected]> To: [email protected] Date: 18/03/2010 13:24 Subject: [oslc-core] Need for an XML literal value type Sent by: [email protected] I'm still a little concerned about adding XML literal as a value type and I'm trying to understand the pros and cons. The only justification that we have so far for adding an XML literal value is for storing XHTML data, which we need for rich text, but we can easily store XHTML data as a string. What specifically do we gain by putting XHTML content in-line in our RDF/XML and Atom XML representations? And conversely, what do we lose by not doing so? Also, does putting XHTML content in-line in RDF/XML result in valid RDF/XML? Thanks, - Dave _______________________________________________ Oslc-Core mailing list [email protected] http://open-services.net/mailman/listinfo/oslc-core_open-services.net Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU _______________________________________________ Oslc-Core mailing list [email protected] http://open-services.net/mailman/listinfo/oslc-core_open-services.net
