mff-uk / dataspecer

https://dataspecer.com
MIT License
22 stars 7 forks source link

"Core XSD" containing definition of IRI for LD-compatible XMLs is weirdly linked and duplicated in output ZIP file #710

Open jakubklimek opened 4 days ago

jakubklimek commented 4 days ago

This is not that urgent as we do not need this anyway (#688) but the "core XSD" is weirdly duplicated and linked when generating the ZIP file e.g. from this specification. See the output data structure, where the XSD is the 2022-07.xsd: image

In addition, it is linked like this in the XSDs:

So seemingly, one of the data structures is "first" and the rest link to it: image

This core XML is published at https://schemas.dataspecer.com/xsd/core/2022-07.xsd, but that location may not be to the liking of every XSD author. Therefore I suggest:

  1. Include this only once in the export and link to it correctly
  2. Create XML-specific configuration options to
    1. Use the globally published version from the XSDs, i.e. <xs:import namespace="https://schemas.dataspecer.com/xsd/core/" schemaLocation="https://schemas.dataspecer.com/xsd/core/2022-07.xsd"/>
    2. If not, specify a custom "common" namespace, put it in the core XSD, and rely on the default mechanisms for correct paths or URLs.