When defining large schemas it may be necessary to have some mechanism to import shapes from other schemas.
Currently, ShEx contains the shapeExternal mechanism to reference a shape by an IRI and let the ShEx processor search that shape in some external place.
The definition of shapeExternal is quite minimalistic:
an external shape (ShapeExternal) is an extension mechanism to externally define e.g. functional shapes or prohibitively large value sets.
whose semantic is defined as:
Se is a ShapeExternal and implementation-specific mechansims not defined in this specification indicate success.
Although this minimalistic definition can be good to avoid over-specification, we may consider adding a more general import/export mechanism to ShEx similar where one can:
Declare from a ShEx schema that he wants to import the shapes declared in another ShEx schema
Declare in a ShEx schema shapes that can be exported
If we were using RDF syntax for ShEx, one possibility would be to reuse owl:imports declarations although I think it would not be a good idea to mix another vocabulary here.
This concern about importing and modularizing ShEx declarations appears in practice. For example, in this question by @andrawaag in gitter
When defining large schemas it may be necessary to have some mechanism to import shapes from other schemas.
Currently, ShEx contains the
shapeExternal
mechanism to reference a shape by an IRI and let the ShEx processor search that shape in some external place.The definition of
shapeExternal
is quite minimalistic:whose semantic is defined as:
Although this minimalistic definition can be good to avoid over-specification, we may consider adding a more general import/export mechanism to ShEx similar where one can:
If we were using RDF syntax for ShEx, one possibility would be to reuse
owl:imports
declarations although I think it would not be a good idea to mix another vocabulary here.This concern about importing and modularizing ShEx declarations appears in practice. For example, in this question by @andrawaag in gitter