pensoft / dev

Building on Pensoft's platforms? You've come to the right place.
1 stars 0 forks source link

Taxonomic Paper XSD Schema Invalid #5

Closed aliceh75 closed 10 years ago

aliceh75 commented 10 years ago

Hello,

The schema at http://pwt.pensoft.net/dev/taxonomic_paper.xsd (as downloaded on 2014-05-12) is not valid:

The schema declares a key on 'objects/references/reference/@id':

<xsd:key xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="refUniqueID">
  <xsd:selector xpath="objects/references/reference"/>
  <xsd:field xpath="@id"/>
</xsd:key>

Such declaration means the 'id' attribute must always be present on the given tag. However the type declaration for the tag in question does not allow adding the 'id' attribute (as these must be explicitly allowed):

<xsd:complexType name="referenceType">
  <xsd:sequence>
    <xsd:element name="fields" type="referenceFieldsType" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="reference_author" type="reference_authorType" minOccurs="0" maxOccurs="676"/><xsd:element name="reference_editor" type="reference_editorType" minOccurs="0" maxOccurs="676"/>
  </xsd:sequence>
</xsd:complexType>

The following line would be required (in referenceType) to allow (and, in that case, require) the 'id' attribute:

  <xsd:attribute name="id" type="xsd:integer" use="required"/>

Note that a version of that file I still have from April 2013 does have that line.

Biserkov commented 10 years ago

The generate_xml_id flag in db was set to false.