W3C home > Mailing lists > Public > www-rdf-interest@w3.org > June 2003

Re: inline xml as property value

From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
Date: Tue, 24 Jun 2003 12:59:56 +0100
Message-ID: <3EF83D3C.6050001@hplb.hpl.hp.com>
To: Jon Hanna <jon@spin.ie>
CC: www-rdf-interest@w3.org

Jon Hanna wrote:

 possible in RDF, to treat this xml segment as one
>>inline property value? In other words, the XML fragment in its entirety
>>(i.e., without subdividing it into different resources), should be the
>>hasRights value belonging to the book.


> <rdf:Description rdf:about="http://foo/book123456">

> 	<lanl:hasRights rdf:parseType="Literal">

you need the xmlns:lanl declaration on the above element.
An RDF/XML parser will copy it onto the embedded element.

> <lanl:rights xmlns:lanl="http://foo:lanl">
> 	<lanl:next-copy-rights>
> 		<lanl:delete>Distributor</lanl:delete>
> 		<lanl:access>
> 			<lanl:security-class>3</lanl:security-class>
> 		</lanl:access>
> 		<lanl:fee>
> 			<lanl:per-use>10</lanl:per-use>
> 			<lanl:to>Account-ID-678-qwerqeruyt</lanl:to>
> 		</lanl:fee>
> 	</lanl:next-copy-rights>
> </lanl:rights>
> 	</lanl:hasRights>
> </rdf:Description>

This will not work if your embedded XML needs namespace declaration that 
are not used in element or attribute names.

However, your example does not violate this condition.

The whitespace before your start tag <lanl:rights> and after your end tag 
</lanl:rights> *is* part of the value of the RDF triple.

Received on Tuesday, 24 June 2003 08:00:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:43 UTC