You are here

public function RestWSFormatRDF::addReference in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.formats.inc \RestWSFormatRDF::addReference()
1 call to RestWSFormatRDF::addReference()
RestWSFormatRDF::addToXML in ./restws.formats.inc
Adds the data of the given wrapper to the given XML element.

File

./restws.formats.inc, line 772
RESTful web services module formats.

Class

RestWSFormatRDF
A simple formatter for RDF. Requires the RDF module for the mapping.

Code

public function addReference(DomDocument $doc, DOMElement $node, $resource, $id) {
  $element = $doc
    ->createElementNS($this->namespaces['rdf'], 'rdf:Description');
  $element
    ->setAttributeNS($this->namespaces['rdf'], 'rdf:about', restws_resource_uri($resource, $id));
  $node
    ->appendChild($element);
}