ubermichael / isetools

Tools for parsing data for the Internet Shakespeare Editions
GNU General Public License v2.0
2 stars 3 forks source link

validate DOM using "location" subset schema #43

Closed telic closed 2 years ago

telic commented 7 years ago

The schema includes a concept of "locations" (kinds of documents) where a subset of the defined tags are allowed, but this is not currently enforced anywhere. DOMValidator should be modified (or a new validator created) to only allow tags within a given location subset. The location to match against could either be encoded into the document itself in some way (eg. as an attribute on the root element?), and/or could be provided as a runtime parameter.