Skip to content

Commit

Permalink
Fixed an error with the example domain prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
herminiogg committed Jan 19, 2024
1 parent d48ffbf commit 4d3484e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class XMLSchema2ShexCompletionGenerator(declarations: List[Declaration], shapes:

def completePrefixes(): List[Declaration] = {
List(
Declaration(Prefix(Var(":"), URL("http://example.org"))),
Declaration(Prefix(Var(":"), URL("http://example.com/"))),
Declaration(Prefix(Var("xs:"), URL("http://www.w3.org/2001/XMLSchema#"))),
Declaration(Prefix(Var("xsd:"), URL("http://www.w3.org/2001/XMLSchema#")))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ShExMLGenerationTests extends AnyFunSuite with Matchers {
test("Xml1 version") {
val xml = Source.fromResource("xml1version.xsd").mkString
val output = XMLSchema2ShexParser().convertToShExML(xml).stripMargin.replaceAll("\\s", "")
output should include ("""PREFIX : <http://example.org>
output should include ("""PREFIX : <http://example.com/>
|PREFIX xs: <http://www.w3.org/2001/XMLSchema#>
|PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>""".stripMargin.replaceAll("\\s", ""))
output should include ("""
Expand Down Expand Up @@ -73,7 +73,7 @@ class ShExMLGenerationTests extends AnyFunSuite with Matchers {
test("""Xml2 version""") {
val xml = Source.fromResource("xml2version.xsd").mkString
val output = XMLSchema2ShexParser().convertToShExML(xml).stripMargin.replaceAll("\\s", "")
output should include ("""PREFIX : <http://example.org>
output should include ("""PREFIX : <http://example.com/>
|PREFIX xs: <http://www.w3.org/2001/XMLSchema#>
|PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>""".stripMargin.replaceAll("\\s", ""))
output should include ("""
Expand Down Expand Up @@ -120,7 +120,7 @@ class ShExMLGenerationTests extends AnyFunSuite with Matchers {
test("XML Schema conversion for addresses") {
val xml = Source.fromResource("address.xsd").mkString
val output = XMLSchema2ShexParser().convertToShExML(xml).stripMargin.replaceAll("\\s", "")
output should include ("""PREFIX : <http://example.org>
output should include ("""PREFIX : <http://example.com/>
|PREFIX xs: <http://www.w3.org/2001/XMLSchema#>
|PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>""".stripMargin.replaceAll("\\s", ""))
output should include ("""
Expand Down Expand Up @@ -150,7 +150,7 @@ class ShExMLGenerationTests extends AnyFunSuite with Matchers {
test("""XML Schema conversion from Microsoft example""") {
val xml = Source.fromResource("purchaseOrderFull.xsd").mkString
val output = XMLSchema2ShexParser().convertToShExML(xml).stripMargin.replaceAll("\\s", "")
output should include ("""PREFIX : <http://example.org>
output should include ("""PREFIX : <http://example.com/>
|PREFIX xs: <http://www.w3.org/2001/XMLSchema#>
|PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|PREFIX tn: <http://tempuri.org/po.xsd>""".stripMargin.replaceAll("\\s", ""))
Expand Down

0 comments on commit 4d3484e

Please sign in to comment.