Re: Validation

Hi Peter, all,

> Is it intended that SH documents can be validated (wholly or partially), and if so how?
> 
> If yes, I'd favour an approach based on XPath which will have enough power and yet not require overly complex rules For example it might only validate element names and perhaps some mandatory attributes or namespaces. Or it could express parenthood and more complex constraints.

I do think that validation by means of some existing and well-known technologies should be provided. However, from my perspective, this should be done by means of a formal schema that defines SH, which would restrict a particular use of some of the available HTML5 tags. 

I tend to prefer RelaxNG considering its simplicity, but I don’t know it would be enough for our goals – well, it would be always possible to address some co-constraint issues with Schematron, if needed.

However, I’m not sure that that “strong” validation option would be compatible with the following approach introduced by Robin and Florian in another discussion (https://lists.w3.org/Archives/Public/public-scholarlyhtml/2015Dec/0025.html <https://lists.w3.org/Archives/Public/public-scholarlyhtml/2015Dec/0025.html>):

>> a - When we give specialized semantics to things, they must remain
>> compatible with the original non specialized definition, otherwise
>> generic tools may mishandle SH documents.
> 
> Completely agreed. In fact, an SH document should just be an HTML
> document that happens to adhere to SH. The semantics aren't so much
> specialised as restricted. If we were to add new meaning, we'd need to
> think about a way of conveying the fact that content is SH (instead of
> HTML), with things like profile attributes, media types, etc. IMHO that
> would be a failure case.


I would like to hear others’ opinions here.

Have a nice day :-)

S.




----------------------------------------------------------------------------
Silvio Peroni, Ph.D.
Department of Computer Science and Engineering
University of Bologna, Bologna (Italy)
Tel: +39 051 2094871
E-mail: silvio.peroni@unibo.it
Web: http://www.essepuntato.it
Twitter: essepuntato

Received on Wednesday, 2 December 2015 10:51:20 UTC