-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add xlink:type to mets:div element #30
Comments
The following minimal example (example A) is valid with the schema version 1.12: <?xml version="1.0"?>
<mets xmlns="http://www.loc.gov/METS/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/terms/"
xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd
http://www.w3.org/1999/xlink http://www.loc.gov/standards/xlink/xlink.xsd">
<metsHdr />
<structMap>
<div xlink:label="something"/>
</structMap>
</mets> Because the current schema does not permit <?xml version="1.0"?>
<mets xmlns="http://www.loc.gov/METS/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/terms/"
xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd
http://www.w3.org/1999/xlink http://www.loc.gov/standards/xlink/xlink.xsd">
<metsHdr />
<structMap>
<div xlink:label="something" xlink:type="resource"/>
</structMap>
</mets> If we make the following change to --- mets.xsd 2018-07-25 18:43:19.000000000 -0400
+++ mets-div-xlink-type.xsd 2018-11-29 10:31:46.862927254 -0500
@@ -776,11 +776,7 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
- <xsd:attribute ref="xlink:label">
- <xsd:annotation>
- <xsd:documentation xml:lang="en">xlink:label - an xlink label to be referred to by an smLink element</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
+ <xsd:attributeGroup ref="xlink:resourceLink"/>
</xsd:complexType>
<xsd:complexType name="parType">
<xsd:annotation> |
If we are unable to reproduce any validation problems with the issue reported in #19, I think this should be OK, but if we do get an example with an error there it might also be an issue with this proposed change. |
Specific question we need to answer - would adding the |
The METS div element allows xlink:label, but the XLink spec does require xlink:type in this case (https://www.w3.org/TR/xlink11/#xlinkattusagepat). It seems like the purpose of having the xlink:label on the div is to allow reference from smLink elements, so I think this is a "resource"-type element (https://www.w3.org/TR/xlink11/#local-resource) and we could include the "resourceLink" attribute group from the XLink schema.
This could cause problems if adding that attribute group causes validation to fail for existing documents, so we should verify behavior.
The text was updated successfully, but these errors were encountered: