>
>I'm working on a restful webservice that returns XHTML+RDFa responses.
>The ontology used by these responses is described in an OWL file.
>
>I've been trying to work out how to describe my responses format in the
>service's WADL, but I've been unable to find a satisfactory solution.
>
>>From what I understand, the first step is to declare a grammars element
>that links to the OWL file, something like:
><grammars>
> <include href="http://my.service.com/service.owl"/>
></grammars>
>
>>From there, I need to declare the various elements contained in a
>specific response, with an element such as:
><response status="200">
> <representation mediaType="application/xhtml+xml"/>
></response>
>
>This is where I get stuck - I can't figure out how to declare that the
>response contains a ex:MyType RDF entity. The element attribute doesn't
>seem to be a good idea: according to the specifications, this must point
>to the root XML element of the response, which in my case is xhtml, not
>the entity I want to describe.
>
>Is there a way to achieve what I'm trying to do with the current
>specifications ?
I think you could do what you want with representation parameters. E.g.:
<response status="200">
<representation mediaType="application/xhtml+xml">
<param name="MyType" path="/some/xpath/to/the/element"
type="ex:MyType"/>
</representation>
</response>
Regards,
Marc.