A simplified surface syntax for RDF is proposed. Its major characteristics are:
An example:
<web:RDF xmlns:web="http://www.openhealth.org/RDF/SurfaceSyntax" xmlns:ex="http://example.org/ex"> <web:Description web:aboutQ="ex:Jon"> <ex:says> <ex:color web:aboutQ="ex:sky" web:resourceQ= "ex:blue"/> </ex:says> </web:Description> </web:RDF>
=>
The s-expression:
(or a b c) can be expressed in XML as:
<web:Expression> <web:predicate web:resourceQ="logic:Or"/> <web:first web:resourceQ="ex:a"/> <web:rest> <web:Expression> <web:predicate web:resourceQ="web:etc"/> <web:first web:resourceQ="ex:b"/> <web:rest> <web:Expression> <web:predicate web:resourceQ="web:etc"/> <web:first web:resourceQ="ex:c"/> <web:rest web:resourceQ="web:nil"/> </web:Expression> </web:rest> </web:Expression> </web:Expression>
=>
(not a)
<web:Expression> <web:predicate web:resourceQ="logic:not"> <web:first web:resource="ex:a"/> <web:rest web:resourceQ="web:nil"/> </web:Expression>
=>
web:parseType="Expression"
<web:Or> <ex:a/> <ex:b/> <ex:c/> </web:Or>
is expanded as
<web:Expression> <web:predicate web:resourceQ="logic:Or"/> <web:first web:resourceQ="ex:a"/> <web:rest> <web:Expression> <web:predicate web:resourceQ="web:etc"/> <web:first web:resourceQ="ex:b"/> <web:rest> <web:Expression> <web:predicate web:resourceQ="web:etc"/> <web:first web:resourceQ="ex:c"/> <web:rest web:resourceQ="web:nil"/> </web:Expression> </web:rest> </web:Expression> </web:Expression>