-
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
Primer Xlink Issue #19
Comments
And to add, in the smLinkType where xlink attributes are referenced individually the type attribute is missing. Best, |
Leah will make changes to Primer - we will need to ask Glenn to make changes to the overview page |
The XLink specification itself does not require Additionally, the spec says later on "The value of the type attribute must be supplied unless the element is a simple link (https://www.w3.org/TR/xlink11/#dt-simplelink) and an href attribute in the XLink namespace is supplied. In the latter case, the value "simple" is implied for the type attribute. If a value is supplied for the type attribute, its value must be one of "simple", "extended", "locator", "arc", "resource", "title", or "none"." (https://www.w3.org/TR/xlink11/#link-types) My understanding was that our xlink schema was what caused <?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 />
<dmdSec ID="dmd001">
<mdRef LOCTYPE="URN" MIMETYPE="application/xml" MDTYPE="EAD" xlink:href="urn:x-nyu:fales1735" />
</dmdSec>
<structMap>
<div/>
</structMap>
</mets> Could someone provide an example where |
Unable to reproduce validation failure. We need an example |
Its an old thing (2007 and on) |
Gone through my archive and its still the comment from the 24th of January above that gives the most. Having the same namespace but using different schema versions of xlink causes the problem. |
The EAD2002 schema https://www.loc.gov/ead/ead.xsd and the METS schema both import http://www.loc.gov/standards/xlink/xlink.xsd. The following minimal example that includes both the EAD and METS schema along with the XLink schema validates for me: <?xml version="1.0"?>
<mets xmlns="http://www.loc.gov/METS/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ead="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd
urn:isbn:1-931666-22-9 https://www.loc.gov/ead/ead.xsd
http://www.w3.org/1999/xlink http://www.loc.gov/standards/xlink/xlink.xsd
">
<metsHdr/>
<dmdSec ID="DMD1">
<mdWrap MDTYPE="EAD">
<xmlData>
<ead:ead>
<ead:eadheader>
<ead:eadid/>
<ead:filedesc>
<ead:titlestmt>
<ead:titleproper/>
</ead:titlestmt>
</ead:filedesc>
</ead:eadheader>
<ead:frontmatter/>
<ead:archdesc level="item">
<ead:runner/>
<ead:did>
<ead:abstract/>
</ead:did>
</ead:archdesc>
</ead:ead>
</xmlData>
</mdWrap>
</dmdSec>
<dmdSec ID="DMD2">
<mdRef LOCTYPE="URN" MIMETYPE="application/xml" MDTYPE="EAD" xlink:href="urn:x-nyu:fales1735" />
</dmdSec>
<structMap>
<div/>
</structMap>
</mets> |
I also only have a vague memory of such a problem many years ago. However, two things that I discovered while trying to find the context:
|
For http://www.w3.org/1999/xlink.xsd (and the basically-identical https://www.w3.org/XML/2008/06/xlink.xsd) the issue is that the attribute groups have different names (e.g. The particular errors you would get then appear to be dependent on the order the schemas are declared in I've outlined some possible paths forward below. I did some testing with a simple example that just imports a different xlink schema in addition to the METS schema, but I do want to do a little bit of testing with some more complex examples to validate these approaches.
|
I still can't reproduce the original issue (validation complaint about missing |
The "workaround schema" can't just import the W3C schema for a couple reasons - one, you can't import a schema for the same namespace as the one you're defining a schema for; two, it declares the same attributes as the LOC schema. Still, it looks like a compromise schema that declares the attributes once but declares the attribute groups both from the LOC and W3C schemas is possible. |
I think I would definitely not recommend option 3 above (to make the LOC XLink schema into this compromise schema) as the compromise schema is definitely a hack. But I think having the compromise schema available (option 1) is a good option. We can talk if option 2 (changing existing schemas to use the W3C XLink schema) is something to work towards longer term or if option 1 is sufficient. |
I verified with a more complex METS file that if I 1) change the METS schema to reference the W3C XLink schema (and update the referenced attribute groups appropriately) and then 2) validate a METS file that references both this changed METS schema and the existing PREMIS schema that it does not validate, but if I prepend the compromise XLink schema to the schemaLocation element, then it does. I will post the compromise xlink schema and the updated METS schema as a gist. |
EAD had its own xlink schema way back around 2007. When I raised the problem it was coordination made for it to be the same but it took some time. |
@andreasnef I looked through the SEDA site at https://francearchives.fr/seda/, but I don't see any complete examples of SEDA XML. Do you have an example either just of SEDA or of METS that embeds SEDA? |
compromise xlink schema: https://gist.github.com/aelkiss/4d3fab39219f6cea23bc0e0e9b0ae3f3 |
A fourth option would be to remove the XLink schema entirely from the METS schema. Bertrand mentions that this option has been brought up a few times in the past. In talking with people from W3C, they thought the XLink schema was dead. It has not been widely adopted; web browsers don't understand XLink. EAD2002 does use XLink. EAD3 does not use XLink at all. The PREMIS2 schema at least imports the LOC XLink schema. It does not appear that PREMIS3 references the XLink schema at all. Not aware of any users that really take advantage of the XLink attributes. Betrand would be in favor of getting rid of it. |
I just verified some of our reference examples for SEDA, but there are none that actually use xlink attributes. I checked with the SEDA (2.1) schemas, and while all of them define the namespace, only a couple actually import the xlink.xsd, and only one of these two actually specifies an (optional) attribute of this namespace. So, the SEDA example is probably yet another case where it was introduced a while ago and now has the same issues as with METS... |
On Aaron's option 2 above, |
I asked Baptiste Nichele (who was until recently working at the Service interministériel des archives de France on the SEDA standard) and he confirmed that the XLINK dependency was introduced in version 2. It was inherited from the standard MEDONA, but he considers that another simple way of referencing would have done the trick as well. |
Hi all,
Have just discovered that in the primer the xlink:type attribute isn't mentioned together at all with xlink:href. All the other attributes are listed but not that and its mandatory in the used xlink-schema and in the xlink-standard (as I have understood it). Got the comment that since its not mentioned so therefore its thought not to be used and they run into validation problems.
So can we update the text?
Best,
Karin
The text was updated successfully, but these errors were encountered: