Closed megoth-capgemini closed 1 year ago
To provide a bit more context, this is (currently) the latest version of law.shex
:
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX selaw: <https://riksdagen.se/ontologies/selaw.ttl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX shape: <https://riksdagen.se/shapes#>
shape:LegalDocument {
rdf:type [ selaw:LegalDocument ] ;
dct:title xsd:string ;
dct:hasPart @shape:Chapter* ;
}
shape:Chapter {
rdf:type [ selaw:Chapter ] ;
dct:title xsd:string ;
selaw:referenceNumber xsd:string ;
dct:hasPart @shape:Section* ;
dct:hasPart @shape:Paragraph* ;
}
shape:Section {
rdf:type [ selaw:Section ] ;
dct:title xsd:string ;
dct:hasPart @shape:Paragraph* ;
}
shape:Paragraph {
rdf:type [ selaw:Paragraph ] ;
rdf:value xsd:string ;
selaw:referenceNumber xsd:string ;
dct:hasPart @shape:ListItem* ;
}
shape:ListItem {
rdf:type [ selaw:ListItem ] ;
rdf:value xsd:string ;
selaw:referenceNumber xsd:string ;
}
Also, I'm working on ldo@1.0.3
and ldo-cli@3.0.1
.
Indeed. This would be fixed when #18 is fixed.
Similar to https://github.com/o-development/ldo/issues/18, but for
rdf:type
instead. Currently, the following ShEx code:Outputs the following part in
.context.ts
:This returns
undefined
when callingdoc.type["@id"]
in my code. But if I change.context.ts
to:It works as intended, except that it returns
LegalDocument
instead ofhttps://riksdagen.se/ontologies/selaw.ttl#LegalDocument
. But I can work with this for now.