Tests that application/n-triples works in p:inline, p:document, and p:load.
Test rdf-nt-002.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/rdf.xpl"/>
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:inline content-type="application/n-triples">
_:Bcd39d87b68649fcec0297f56f8b4f71e <http://xmlns.com/foaf/0.1/name> "Norman Walsh" .
_:Bcd39d87b68649fcec0297f56f8b4f71e <http://xmlns.com/foaf/0.1/homepage> <https://nwalsh.com/> .
_:Bcd39d87b68649fcec0297f56f8b4f71e <http://xmlns.com/foaf/0.1/weblog> <https://so.nwalsh.com/> .
_:B5bd471eef89a6740bde36a60eecf0f2d <http://xmlns.com/foaf/0.1/name> "Achim Berndzen" .
_:B300c3d37bf54b2676ebf1120f6974f73 <http://xmlns.com/foaf/0.1/name> "Gerrit Imsieke" .
_:B531e1b897a96918cbde40f2af88c40a3 <http://xmlns.com/foaf/0.1/name> "Erik Siegel" .
<https://xproc.org/> <http://purl.org/dc/terms/title> "XProc" .
<https://xproc.org/> <http://purl.org/dc/terms/type> <http://purl.org/dc/dcmitype/Collection> .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/title> "XProc 3.0: An XML Pipeline Language" .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/date> "2022-09-12"^^<http://www.w3.org/2001/XMLSchema#date> .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/type> <http://purl.org/dc/dcmitype/Text> .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/hasVersion> "3.0" .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/isPartOf> <https://xproc.org/> .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/contributor> _:Bcd39d87b68649fcec0297f56f8b4f71e .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/contributor> _:B5bd471eef89a6740bde36a60eecf0f2d .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/contributor> _:B300c3d37bf54b2676ebf1120f6974f73 .
<https://spec.xproc.org/3.0/xproc/> <http://purl.org/dc/terms/contributor> _:B531e1b897a96918cbde40f2af88c40a3 .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/title> "XProc 3.0: Standard Step Library" .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/date> "2022-09-12"^^<http://www.w3.org/2001/XMLSchema#date> .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/type> <http://purl.org/dc/dcmitype/Text> .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/hasVersion> "3.0" .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/isPartOf> <https://xproc.org/> .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/contributor> _:Bcd39d87b68649fcec0297f56f8b4f71e .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/contributor> _:B5bd471eef89a6740bde36a60eecf0f2d .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/contributor> _:B300c3d37bf54b2676ebf1120f6974f73 .
<https://spec.xproc.org/3.0/steps/> <http://purl.org/dc/terms/contributor> _:B531e1b897a96918cbde40f2af88c40a3 .
</p:inline>
</p:with-input>
</p:identity>
<p:cast-content-type name="first" content-type="application/rdf+xml"/>
<p:identity>
<p:with-input>
<p:document content-type="application/n-triples" href="../documents/sample1.nt"/>
</p:with-input>
</p:identity>
<p:cast-content-type name="second" content-type="application/rdf+xml"/>
<p:load content-type="application/n-triples" href="../documents/sample1.nt"/>
<p:cast-content-type name="third" content-type="application/rdf+xml"/>
<p:wrap-sequence wrapper="wrapper">
<p:with-input pipe="@first @second @third"/>
</p:wrap-sequence>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<s:pattern>
<s:rule context="/">
<s:assert test="wrapper">The root is wrong.</s:assert>
<s:assert test="count(wrapper/rdf:RDF) = 3">RDF output is incorrect.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.