fordmadox / schematrons

GNU General Public License v2.0
3 stars 4 forks source link

Notes without content #6

Open sdm7g opened 8 years ago

sdm7g commented 8 years ago

I found another class of errors that is not caught by schematron rules. A number of our EAD guides were created from templates, and so we often have empty elements that have not been filled in. I did try to remove empty elements in my preprocessing, but some that are not completely empty are still empty of content.

And example of the sort of import errors generated:

The following errors were found:
notes/3/content : At least 1 item(s) is required
notes/7/subnotes/0/content : Property is required but was missing

And these are caused by EAD like this:

<abstract label="Abstract"/>

 <acqinfo encodinganalog="541$a">
        <head>Acquisition Information</head>
        <p/>
     </acqinfo>

I need to find all of the elements that map to JSONModel notes and figure out a test that catches these errors.

fordmadox commented 7 years ago

Ditto for other elements, like an empty container element (so, not just notes, it doesn't look like). We should raise a warning for a defined set of elements (head, p, container, etc.) that don't pass the [not(normalize-space()] test.