Name

cx:rdf-graph — Extracts a single graph from an RDF dataset.

Synopsis

This step extracts a single graph from a dataset.

Input portPrimarySequenceContent types
source✔   
Output portPrimarySequenceContent types
result✔   
Option nameTypeDefault value
graphxs:anyURI?()
This is an extension step; to use it, your pipeline must include its declaration. For example, by including the extension library with an import at the top of your pipeline:
<p:import href="https://xmlcalabash.com/ext/library/rdf.xpl"/>
Declaration
1 |<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
  |                xmlns:p="http://www.w3.org/ns/xproc"
  |                type="cx:rdf-graph">
  |   <p:input port="source"/>
5 |   <p:output port="result"/>
  |   <p:option name="graph" as="xs:anyURI?"/>
  |</p:declare-step>

Description

The cx:rdf-graph step extracts a single graph from a dataset. If a graph name is provided, that named graph is extracted. If no name is provided, the default model is extracted.

Additional examples

The XML Calabash test suite contains examples of the cx:rdf-graph step.