Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions schemas/2val1refvsAnnot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"type": "Schema",
"shapes": [
{
"id": "http://a.example/S",
"type": "ShapeDecl",
"shapeExpr": {
"type": "Shape",
"expression": {
"type": "EachOf",
"expressions": [
{
"type": "TripleConstraint",
"predicate": "http://a.example/p1",
"valueExpr": {
"type": "NodeConstraint",
"values": [
{ "value": "1", "type": "http://www.w3.org/2001/XMLSchema#integer" },
{ "value": "5", "type": "http://www.w3.org/2001/XMLSchema#integer" }
]
},
"annotations": [
{
"type": "Annotation",
"predicate": "http://a.example/annot1",
"object": {
"value": "3",
"type": "http://www.w3.org/2001/XMLSchema#integer"
}
}
]
},
{
"type": "TripleConstraint",
"predicate": "http://a.example/p2",
"valueExpr": "http://a.example/NC",
"annotations": [
{
"type": "Annotation",
"predicate": "http://a.example/annot1",
"object": {
"value": "4",
"type": "http://www.w3.org/2001/XMLSchema#integer"
}
}
]
}
]
}
}
},
{
"id": "http://a.example/NC",
"type": "ShapeDecl",
"shapeExpr": {
"type": "NodeConstraint",
"values": [
{ "value": "2", "type": "http://www.w3.org/2001/XMLSchema#integer" },
{ "value": "6", "type": "http://www.w3.org/2001/XMLSchema#integer" }
],
"annotations": [
{
"type": "Annotation",
"predicate": "http://a.example/annot1",
"object": {
"value": "7",
"type": "http://www.w3.org/2001/XMLSchema#integer"
}
}
]
}
}
],
"@context": "http://www.w3.org/ns/shex.jsonld"
}
9 changes: 9 additions & 0 deletions schemas/2val1refvsAnnot.shex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<http://a.example/S> {
<http://a.example/p1> [1 5]
// <http://a.example/annot1> 3 ;
<http://a.example/p2> @<http://a.example/NC>
// <http://a.example/annot1> 4 ;
}

<http://a.example/NC> [2 6]
// <http://a.example/annot1> 7
51 changes: 51 additions & 0 deletions schemas/2val1refvsAnnot.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
PREFIX shex: <http://www.w3.org/ns/shex#>

[] a shex:Schema ;
shex:shapes ( <http://a.example/S> <http://a.example/NC> ) .

<http://a.example/S>
a shex:ShapeDecl ;
shex:shapeExpr [
a shex:Shape ;
shex:expression [
a shex:EachOf ;
shex:expressions (
[
a shex:TripleConstraint ;
shex:annotation ( [
a shex:Annotation ;
shex:predicate <http://a.example/annot1> ;
shex:object 3
] ) ;
shex:predicate <http://a.example/p1> ;
shex:valueExpr [
a shex:NodeConstraint ;
shex:values ( 1 5 )
]
]
[
a shex:TripleConstraint ;
shex:annotation ( [
a shex:Annotation ;
shex:predicate <http://a.example/annot1> ;
shex:object 4
] ) ;
shex:predicate <http://a.example/p2> ;
shex:valueExpr <http://a.example/NC>
]
)
]
] .

<http://a.example/NC>
a shex:ShapeDecl ;
shex:shapeExpr [
a shex:NodeConstraint ;
shex:annotation ( [
a shex:Annotation ;
shex:predicate <http://a.example/annot1> ;
shex:object 7
] ) ;
shex:values ( 2 6 )
] .

66 changes: 66 additions & 0 deletions schemas/2val1refvsCode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"type": "Schema",
"shapes": [
{
"id": "http://a.example/S",
"type": "ShapeDecl",
"shapeExpr": {
"type": "Shape",
"expression": {
"type": "EachOf",
"expressions": [
{
"type": "TripleConstraint",
"predicate": "http://a.example/p1",
"valueExpr": {
"type": "NodeConstraint",
"values": [
{ "value": "1", "type": "http://www.w3.org/2001/XMLSchema#integer" },
{ "value": "5", "type": "http://www.w3.org/2001/XMLSchema#integer" }
]
},
"semActs": [
{
"type": "SemAct",
"name": "http://shex.io/extensions/Test/",
"code": " print(o) "
}
]
},
{
"type": "TripleConstraint",
"predicate": "http://a.example/p2",
"valueExpr": "http://a.example/NC",
"semActs": [
{
"type": "SemAct",
"name": "http://shex.io/extensions/Test/",
"code": " print(o) "
}
]
}
]
}
}
},
{
"id": "http://a.example/NC",
"type": "ShapeDecl",
"shapeExpr": {
"type": "NodeConstraint",
"values": [
{ "value": "2", "type": "http://www.w3.org/2001/XMLSchema#integer" },
{ "value": "6", "type": "http://www.w3.org/2001/XMLSchema#integer" }
],
"semActs": [
{
"type": "SemAct",
"name": "http://shex.io/extensions/Test/",
"code": " print(n) "
}
]
}
}
],
"@context": "http://www.w3.org/ns/shex.jsonld"
}
9 changes: 9 additions & 0 deletions schemas/2val1refvsCode.shex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<http://a.example/S> {
<http://a.example/p1> [1 5]
%<http://shex.io/extensions/Test/>{ print(o) %} ;
<http://a.example/p2> @<http://a.example/NC>
%<http://shex.io/extensions/Test/>{ print(o) %} ;
}

<http://a.example/NC> [2 6]
%<http://shex.io/extensions/Test/>{ print(n) %}
51 changes: 51 additions & 0 deletions schemas/2val1refvsCode.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
PREFIX sx: <http://www.w3.org/ns/shex#>

[] a sx:Schema ;
sx:shapes ( <http://a.example/S> <http://a.example/NC> ) .

<http://a.example/S>
a sx:ShapeDecl ;
sx:shapeExpr [
a sx:Shape ;
sx:expression [
a sx:EachOf ;
sx:expressions (
[
a sx:TripleConstraint ;
sx:semActs ( [
a sx:SemAct;
sx:code " print(o) ";
sx:name <http://shex.io/extensions/Test/>
] ) ;
sx:predicate <http://a.example/p1> ;
sx:valueExpr [
a sx:NodeConstraint ;
sx:values ( 1 5 )
]
]
[
a sx:TripleConstraint ;
sx:semActs ( [
a sx:SemAct;
sx:code " print(o) ";
sx:name <http://shex.io/extensions/Test/>
] ) ;
sx:predicate <http://a.example/p2> ;
sx:valueExpr <http://a.example/NC>
]
)
]
] .

<http://a.example/NC>
a sx:ShapeDecl ;
sx:shapeExpr [
a sx:NodeConstraint ;
sx:semActs ( [
a sx:SemAct;
sx:code " print(n) ";
sx:name <http://shex.io/extensions/Test/>
] ) ;
sx:values ( 2 6 )
] .

18 changes: 18 additions & 0 deletions schemas/manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2756,6 +2756,15 @@
"json": "1dotShapeAnnotSTRING_LITERAL1.json",
"ttl": "1dotShapeAnnotSTRING_LITERAL1.ttl"
},
{
"@id": "#2val1refvsAnnot",
"@type": "sht:RepresentationTest",
"name": "2val1refvsAnnot",
"status": "mf:Approved",
"shex": "2val1refvsAnnot.shex",
"json": "2val1refvsAnnot.json",
"ttl": "2val1refvsAnnot.ttl"
},
{
"@id": "#open3EachdotcloseAnnot3",
"@type": "sht:RepresentationTest",
Expand Down Expand Up @@ -2936,6 +2945,15 @@
"json": "startCode3fail.json",
"ttl": "startCode3fail.ttl"
},
{
"@id": "#2val1refvsCode",
"@type": "sht:RepresentationTest",
"name": "2val1refvsCode",
"status": "mf:Approved",
"shex": "2val1refvsCode.shex",
"json": "2val1refvsCode.json",
"ttl": "2val1refvsCode.ttl"
},
{
"@id": "#open3Eachdotclosecard23Annot3Code2",
"@type": "sht:RepresentationTest",
Expand Down
18 changes: 18 additions & 0 deletions schemas/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
<#1dotShapePlusAnnotIRIREF>
<#1dotShapeAnnotAIRIREF>
<#1dotShapeAnnotSTRING_LITERAL1>
<#2val1refvsAnnot>
<#open3EachdotcloseAnnot3>
<#1dotCode1>
<#open1dotcloseCode1>
Expand All @@ -334,6 +335,7 @@
<#startCode1startReffail>
<#startCode3>
<#startCode3fail>
<#2val1refvsCode>
<#open3Eachdotclosecard23Annot3Code2>
<#0focusIRI>
<#0focusBNODE>
Expand Down Expand Up @@ -3065,6 +3067,14 @@
sx:ttl <1dotShapeAnnotSTRING_LITERAL1.ttl> ;
.

<#2val1refvsAnnot> a sht:RepresentationTest ;
mf:name "2val1refvsAnnot" ;
mf:status mf:Approved ;
sx:shex <2val1refvsAnnot.shex> ;
sx:json <2val1refvsAnnot.json> ;
sx:ttl <2val1refvsAnnot.ttl> ;
.

<#open3EachdotcloseAnnot3> a sht:RepresentationTest ;
mf:name "open3EachdotcloseAnnot3" ;
mf:status mf:Approved ;
Expand Down Expand Up @@ -3225,6 +3235,14 @@
sx:ttl <startCode3fail.ttl> ;
.

<#2val1refvsCode> a sht:RepresentationTest ;
mf:name "2val1refvsCode" ;
mf:status mf:Approved ;
sx:shex <2val1refvsCode.shex> ;
sx:json <2val1refvsCode.json> ;
sx:ttl <2val1refvsCode.ttl> ;
.

<#open3Eachdotclosecard23Annot3Code2> a sht:RepresentationTest ;
mf:name "open3Eachdotclosecard23Annot3Code2" ;
mf:status mf:Approved ;
Expand Down
2 changes: 2 additions & 0 deletions validation/In1_Ip1_L1.In1_Ip2_L2.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<http://a.example/n1> <http://a.example/p1> 1 .
<http://a.example/n1> <http://a.example/p2> 2 .
Loading