From 24c70e61483aa4db9a82d5851c6f38fd8176b61b Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Mon, 4 Mar 2024 12:40:06 +0100 Subject: [PATCH 1/2] A test case for selecting values from attributes (XML only) --- test-cases/RMLTC0023a-XML/ious.xml | 10 ++++++++++ test-cases/RMLTC0023a-XML/mapping.ttl | 17 +++++++++++++++++ test-cases/RMLTC0023a-XML/output.nq | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 test-cases/RMLTC0023a-XML/ious.xml create mode 100644 test-cases/RMLTC0023a-XML/mapping.ttl create mode 100644 test-cases/RMLTC0023a-XML/output.nq diff --git a/test-cases/RMLTC0023a-XML/ious.xml b/test-cases/RMLTC0023a-XML/ious.xml new file mode 100644 index 0000000..aad5096 --- /dev/null +++ b/test-cases/RMLTC0023a-XML/ious.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/test-cases/RMLTC0023a-XML/mapping.ttl b/test-cases/RMLTC0023a-XML/mapping.ttl new file mode 100644 index 0000000..b709504 --- /dev/null +++ b/test-cases/RMLTC0023a-XML/mapping.ttl @@ -0,0 +1,17 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap ; + rml:logicalSource [ a rml:LogicalSource ; + rml:iterator "/persons/person" ; + rml:referenceFormulation rml:XPath ; + rml:source <_:b347486> ] ; + rml:predicateObjectMap [ rml:objectMap [ rml:reference "@amount" ] ; + rml:predicate ex:owes ] ; + rml:subjectMap [ rml:class foaf:Person ; + rml:template "http://example.com/{@fname};{@lname}" ] . + +<_:b347486> a rml:RelativePathSource ; + rml:path "ious.xml" . + diff --git a/test-cases/RMLTC0023a-XML/output.nq b/test-cases/RMLTC0023a-XML/output.nq new file mode 100644 index 0000000..64e91da --- /dev/null +++ b/test-cases/RMLTC0023a-XML/output.nq @@ -0,0 +1,5 @@ + . + "30.0E0" . + . + "20.0E0" . + From 0d1b506fd7a63def410d38f281bc7ab42fcc342f Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Mon, 4 Mar 2024 12:57:29 +0100 Subject: [PATCH 2/2] Fixed blank node representation --- test-cases/RMLTC0023a-XML/mapping.ttl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-cases/RMLTC0023a-XML/mapping.ttl b/test-cases/RMLTC0023a-XML/mapping.ttl index b709504..e8037de 100644 --- a/test-cases/RMLTC0023a-XML/mapping.ttl +++ b/test-cases/RMLTC0023a-XML/mapping.ttl @@ -6,12 +6,12 @@ rml:logicalSource [ a rml:LogicalSource ; rml:iterator "/persons/person" ; rml:referenceFormulation rml:XPath ; - rml:source <_:b347486> ] ; + rml:source _:b347486 ] ; rml:predicateObjectMap [ rml:objectMap [ rml:reference "@amount" ] ; rml:predicate ex:owes ] ; rml:subjectMap [ rml:class foaf:Person ; rml:template "http://example.com/{@fname};{@lname}" ] . -<_:b347486> a rml:RelativePathSource ; +_:b347486 a rml:RelativePathSource ; rml:path "ious.xml" .