Re: inline xml as property value

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.
>>
>>
> 


Yes


> <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.

Jeremy

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