- From: Simon Steyskal <simon.steyskal@wu.ac.at>
- Date: Thu, 18 Jun 2015 10:58:46 +0200
- To: Public-data-shapes Wg <public-data-shapes-wg@w3.org>
Hi!
Regarding the validation of a shape that has an attached sh:scopeShape,
the specification currently says:
"If the scope shape returns an error-level constraint violation, then
the constraint must be ignored"
I'm not 100% sure how this (may) influences the validation of
And/Xor/Not/OR Constraints if they contain such a scoped shape whose
scope validation returns an error. Futhermore, what happens if all
shapes of And/Xor/Not/OR Constraints are scoped shapes having
violated/non-matching scopes?
cheers,
simon
------------------------------------------------------------------
Example1: AndConstraint containing 2 shapes, only 1 fires -> Will I get
a Validation Error?
ex:ScopedExampleShape
a sh:Shape ;
sh:property [
sh:predicate ex:someProperty ;
sh:minCount 1 ;
sh:scopeShape [
sh:property [
sh:predicate ex:requiredProperty ;
sh:hasValue ex:requiredValue ;
]
]
] .
ex:NotScopedExampleShape
a sh:Shape ;
sh:property [
sh:predicate ex:someProperty ;
sh:maxCount 1 ;
] .
ex:ExampleClass
a sh:ShapeClass;
sh:constraint [
a sh:AndConstraint ;
sh:shapes (
ex:ScopedExampleShape
ex:NotScopedExampleShape
)
]
ex:ScopedShapeExampleInstance
ex:someProperty ex:someValue ;
ex:requiredProperty ex:notRequiredValue .
------------------------------------------------------------------
Example2: NotConstraint containing 1 shape that does not fire -> empty
NotConstraint?
ex:ScopedExampleShape
a sh:Shape ;
sh:property [
sh:predicate ex:someProperty ;
sh:minCount 1 ;
sh:scopeShape [
sh:property [
sh:predicate ex:requiredProperty ;
sh:hasValue ex:requiredValue ;
]
]
] .
ex:ExampleClass
a sh:ShapeClass;
sh:constraint [
a sh:NotConstraint ;
sh:shape ex:ScopedExampleShape;
]
ex:ScopedShapeExampleInstance
ex:someProperty ex:someValue ;
ex:requiredProperty ex:notRequiredValue .
--
DDipl.-Ing. Simon Steyskal
Institute for Information Business, WU Vienna
www: http://www.steyskal.info/ twitter: @simonsteys
Received on Thursday, 18 June 2015 08:59:12 UTC