weso / shapes-rs

RDF data shapes implementation in Rust
https://www.weso.es/shapes-rs/
Apache License 2.0
23 stars 1 forks source link

Fix problem parsing JSON schema files #45

Open labra opened 4 weeks ago

labra commented 4 weeks ago

After the cleaning refactoring PR, some schemas give an error when serializing/deserializin them in JSON schema syntax. The error can be seen when running the testsuite:

$ cargo run -p shex_testsuite -- -m shex_testsuite/shexTest/schemas/manifest.jsonld -f schemas -p failed-simple
. . .
--- Failed ---
1val1INTEGER
FocusIRI2EachBnodeNested2EachIRIRef
_all
kitchenSink
NoNegation_pass
NoNegation2_pass
OneNegation_pass
1list0PlusDot
1list0PlusIri
1list1PlusIri
Extends-sAB
ExtendsRepeatedP
ANDAbstract
AND3G
ExtendAND3G
Extend3G
ExtendANDExtend3GAND3G
vitals-RESTRICTS
ShExR
Passed: 413, Failed: 19, Skipped: 1, Not implemented: 0

In the case of 1list0PlusDot the problem seems to be that the schema parses the value IriRef(Iri(IriS { iri: NamedNode { iri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" } })) as IriRef(Prefixed { prefix: "rdf", local: "nil" })

In the case of 1val1INTEGER the problem is that ObjectValue(Literal(NumericLiteral(Integer(0))))] is parsed as ObjectValue(Literal(NumericLiteral(Decimal(0))))].

We need a bit more time to check how to solve those problems...