openscriptures / morphhb

Open Scriptures Hebrew Bible
https://hb.openscriptures.org
Other
182 stars 63 forks source link

In order to validate to the OSIS 2.1.1 schema, the contributor element must be moved #48

Closed DavidHaslam closed 6 years ago

DavidHaslam commented 6 years ago

Attempting to validate the XML files to a local copy of osisCore.2.1.1.xsd gave the following:

ERROR: Element 'contributor': This element is not expected. Expected is one of ( rights, scope, castList, teiHeader, refSystem ).

This happens with some or all of the XML files unless within each work element, the contributor element is moved to immediately after the title element.

i.e. The contributor element is not expected after the creator element.

This must be due to an error in the .xsd file whereby it does not match the examples given in section 7.1 on page 23 in the OSIS 2.1 User Manual.

DavidHaslam commented 6 years ago

I have reported this to CrossWire, so that we can modify our own custom schema.

See https://crosswire.org/wiki/OSIS_211_CR#.3Ccontributor.3E_in_.3Cwork.3E

DavidHaslam commented 6 years ago

The user manual is in error.

The work element defines a strict order (aka sequence) of optional elements.

 <xs:sequence>
  <xs:element name="title" type="titleCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="contributor" type="contributorCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="creator" type="creatorCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="subject" type="subjectCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="date" type="dateCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="description" type="descriptionCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="publisher" type="publisherCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="type" type="typeCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="format" type="formatCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="identifier" type="identifierCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="source" type="sourceCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="language" type="languageCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="relation" type="relationCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="coverage" type="coverageCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="rights" type="rightsCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="scope" type="scopeCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="castList" type="castListCT" minOccurs="0" maxOccurs="unbounded"/>
  <xs:element name="teiHeader" type="teiHeaderCT" minOccurs="0"/>
  <xs:element name="refSystem" type="refSystemCT" minOccurs="0" maxOccurs="unbounded"/>
 </xs:sequence>
DavidHaslam commented 6 years ago

The XML files in morphhb should therefore be edited to bring them in line for validation.

DavidTroidl commented 6 years ago

Thanks for catching this. I passed it along.

DavidHaslam commented 6 years ago

I could fork the repo, process the XML files in a branch, and issue a pull request if you like.

It should be easy enough for me to make a TextPipe filter to move these XML elements.

I'd be happy to do so, if that would help.

DavidHaslam commented 6 years ago

Done! See #49

@DavidTroidl Please review and merge my pull request. Thanks.

DavidHaslam commented 6 years ago

NB. My processing of the XML files did not add any new revisionDesc element to record these changes.

No changes were made beyond the header element in each file.

jag3773 commented 6 years ago

Fixed in #52