forked from philipfennell/grip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding tests for the N-Triples parser.
- Loading branch information
1 parent
5324c4a
commit 72d346c
Showing
18 changed files
with
248 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...t/xquery/rdf-interfaces/n-triples-parser/2_statement_lines_separated_by_single_CR-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource5> <http://example.org/property> <http://example.org/resource2> . | ||
<http://example.org/resource6> <http://example.org/property> <http://example.org/resource2> .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
19 changes: 19 additions & 0 deletions
19
src/test/xquery/rdf-interfaces/n-triples-parser/all_literal_escapes-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource7> <http://example.org/property> "simple literal" . | ||
<http://example.org/resource8> <http://example.org/property> "backslash:\\" . | ||
<http://example.org/resource9> <http://example.org/property> "dquote:\"" . | ||
<http://example.org/resource10> <http://example.org/property> "newline:\n" . | ||
<http://example.org/resource11> <http://example.org/property> "return\r" . | ||
<http://example.org/resource12> <http://example.org/property> "tab:\t" .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
14 changes: 14 additions & 0 deletions
14
src/test/xquery/rdf-interfaces/n-triples-parser/comment-001.xml.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[ # comment line after whitespace]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
18 changes: 18 additions & 0 deletions
18
...ry/rdf-interfaces/n-triples-parser/empty_blank_line_then_one_with_spaces_and_tabs-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[ | ||
<http://example.org/resource1> <http://example.org/property> <http://example.org/resource2> . | ||
_:anon <http://example.org/property> <http://example.org/resource2> . | ||
<http://example.org/resource2> <http://example.org/property> _:anon .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
14 changes: 14 additions & 0 deletions
14
src/test/xquery/rdf-interfaces/n-triples-parser/euro_symbol-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource17> <http://example.org/property> "\u20AC" .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
14 changes: 14 additions & 0 deletions
14
...est/xquery/rdf-interfaces/n-triples-parser/latin_small_letter_e_with_acute_symbol-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource16> <http://example.org/property> "\u00E9" .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
15 changes: 15 additions & 0 deletions
15
src/test/xquery/rdf-interfaces/n-triples-parser/line_ending_with_CR-NL-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource4> <http://example.org/property> <http://example.org/resource2> . | ||
]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
15 changes: 15 additions & 0 deletions
15
src/test/xquery/rdf-interfaces/n-triples-parser/plain_literals_with_languages-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource30> <http://example.org/property> "chat"@fr . | ||
<http://example.org/resource31> <http://example.org/property> "chat"@en .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
16 changes: 16 additions & 0 deletions
16
...st/xquery/rdf-interfaces/n-triples-parser/space_is_optional_before_final_fullstop-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource13> <http://example.org/property> <http://example.org/resource2>. | ||
<http://example.org/resource14> <http://example.org/property> "x". | ||
<http://example.org/resource15> <http://example.org/property> _:anon.]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
14 changes: 14 additions & 0 deletions
14
src/test/xquery/rdf-interfaces/n-triples-parser/spaces_and_tabs_throughout-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[ <http://example.org/resource3> <http://example.org/property> <http://example.org/resource2> . ]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
14 changes: 14 additions & 0 deletions
14
src/test/xquery/rdf-interfaces/n-triples-parser/typed_literals-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[<http://example.org/resource32> <http://example.org/property> "abc"^^<http://example.org/datatype1> .]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
24 changes: 24 additions & 0 deletions
24
src/test/xquery/rdf-interfaces/n-triples-parser/xml_literals_as_datatyped_literals-001.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
xquery version "1.0-ml" encoding "utf-8"; | ||
|
||
declare default function namespace "http://www.w3.org/2005/xpath-functions"; | ||
declare default element namespace "http://www.w3.org/TR/rdf-interfaces"; | ||
declare namespace nt = "http://www.w3.org/ns/formats/N-Triples"; | ||
|
||
import module namespace ntdp = "http://www.w3.org/TR/rdf-interfaces/NTriplesDataParser" | ||
at "/lib/rdf-interfaces/NTriplesDataParser.xqy"; | ||
|
||
|
||
let $doc as element(nt:RDF) := | ||
<nt:RDF xmlns:nt="http://www.w3.org/ns/formats/N-Triples"><![CDATA[ | ||
<http://example.org/resource21> <http://example.org/property> ""^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource22> <http://example.org/property> " "^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource23> <http://example.org/property> "x"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource23> <http://example.org/property> "\""^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource24> <http://example.org/property> "<a></a>"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource25> <http://example.org/property> "a <b></b>"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource26> <http://example.org/property> "a <b></b> c"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource26> <http://example.org/property> "a\n<b></b>\nc"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
<http://example.org/resource27> <http://example.org/property> "chat"^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> . | ||
]]></nt:RDF> | ||
return | ||
ntdp:parse(string($doc), '', (), (), ()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters