shexSpec / shex

ShEx language issues, including new features for e.g. ShEx2.1
25 stars 8 forks source link

URI for validator schema #63

Open hsolbrig opened 7 years ago

hsolbrig commented 7 years ago

Would like a third option for Schema -- a URI that references the actual schema:

''' Promise validate((USVString or URI or RDFGraph) schema, '''

gkellogg commented 7 years ago

USVString handles both URI and text; WebIDL has not datatype for URI, and this is not commonly used in other specs I've seen. The distinction between text and URI is described in the processing steps.

We could break with other use and define a URI datatype, which is based on USVString, but that doesn't help an actual implementation as the API is invoked with a string, which still must be disambiguated.

jessevdam commented 7 years ago

I prefer it the be actually typed in the options, were it should be explicitly stated that is should interpret it as an URI. This is because I see potential security issues in the future if people our going to include these validation api and associated validation implementation into their productions codes. Users might miss the notion that the validator can interpret their data as an URI.

gkellogg commented 7 years ago

I'm not against this, but I don't see what may actually happen. Anything that has the form of a URI couldn't possibly be either a schema or a graph and visa-versa. If it is a URI, then dereferencing it would be an issue in either case. Probably should say "the form of an absolute URL".