ISO-TC211 / schemas

Official ISO/TC 211 XML Schemas (input to schemas.isotc211.org)
6 stars 8 forks source link

XSDs with duplicated declaration of types #34

Closed Intelligent2013 closed 3 years ago

Intelligent2013 commented 3 years ago

Some XSDs have duplicated declaration of types (via xsd:import). For example, 19115/-3/mda/1.0/mda.xsd: Error:

File http://standards.iso.org/iso/19115/-3/gco/1.0/baseTypes2014.xsd has errors.
        'gco:AbstractObject_Type' is already declared.
in schems: https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes.xsd

List of XSDs with such issue:

ronaldtse commented 3 years ago

This is blocking ISO-TC211/schemas.isotc211.org#18.

ronaldtse commented 3 years ago

@Intelligent2013 can you help fix these with a PR? Thanks.

Intelligent2013 commented 3 years ago

In XSDs there are 3 types of links to another XSDs:

  1. relative path:
    <xs:import namespace=... schemaLocation="../../../../19103/-/gco/1.2.0/gco.xsd"/>
  2. absolute path to https://schemas.isotc211.org:
    <import namespace=... schemaLocation="https://schemas.isotc211.org/19115/-3/gco/1.0/gco.xsd"/>
  3. absolute path to http://standards.iso.org:
    <import namespace=... schemaLocation="http://standards.iso.org/iso/19115/-3/gco/1.0/gco.xsd"/>

As I understand, types 1 and 2 are equal, because https://schemas.isotc211.org is a mirror of this repository.

Regarding type 3, as soon XSD opens any another XSD from site http://standards.iso.org, then all paths evaluate from http://standards.iso.org, not from https://schemas.isotc211.org (or local disk). Between https://schemas.isotc211.org and http://standards.iso.org there is difference, for example:

What is difference between https://schemas.isotc211.org and https://standards.iso.org? Can we replace all links to https://schemas.isotc211.org?

ejbleys commented 3 years ago

Will deal later today Type 3 should not exist ...2014 exists because it did - should continue

Evert Bleys 4 Tudor Place HUGHES ACT Australia Mob: 0411 483 876

On 16 Apr 2021, at 03:34, Alexander Dyuzhev @.***> wrote:

 In XSDs there are 3 types of links to another XSDs:

relative path:

absolute path to https://schemas.isotc211.org:

absolute path to http://standards.iso.org:

As I understand, types 1 and 2 are equal, because https://schemas.isotc211.org is a mirror of this repository.

Regarding type 3, as soon XSD opens any another XSD from site http://standards.iso.org, then all paths evaluate from http://standards.iso.org, not from https://schemas.isotc211.org (or local disk). Between https://schemas.isotc211.org and http://standards.iso.org there is difference, for example:

in schema https://schemas.isotc211.org/19115/-3/gco/1.0/gco.xsd:

in schema https://standards.iso.org/iso/19115/-3/gco/1.0/gco.xsd:

What is difference between https://schemas.isotc211.org and https://standards.iso.org? Can we replace all links to https://schemas.isotc211.org?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ejbleys commented 3 years ago

this is probably round tripping - that is allowed name=“AbstractObject_Type” is declared in https://schemas.isotc211.org/19103/-/gco/1.2.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes2014.xsd https://schemas.isotc211.org/19139/-/gco/1.0/gcoBase.xsd There is no direct or indirect interactions between these files

Evert Bleys 4 Tudor Place HUGHES ACT 2605 Australia email: @. Mob: +61 (0)411 483 876 Land: +61 (0)2 6281 1773 Skype: @.

On 2021-04-06, at 12:51 am, Alexander Dyuzhev @.***> wrote:

Some XSDs have duplicated declaration of types (via xsd:import). For example, 19115/-3/mda/1.0/mda.xsd: Error:

File http://standards.iso.org/iso/19115/-3/gco/1.0/baseTypes2014.xsd has errors. 'gco:AbstractObject_Type' is already declared. in schems: https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes.xsd List of XSDs with such issue:

19115/-3/mda/1.0/mda.xsd 19115/-3/mda/1.0/metadataApplication.xsd 19115/-3/mda/2.0/mda.xsd 19115/-3/mda/2.0/metadataApplication.xsd 19115/-3/mrc/1.0/mrc.xsd 19115/-3/mrc/1.0/content.xsd 19115/-3/mrc/1.0/contentInformationImagery.xsd 19115/-3/mrc/2.0/mrc.xsd 19115/-3/mrc/2.0/content.xsd 19115/-3/mrc/2.0/contentInformationImagery.xsd 19115/-3/md1/1.0/md1.xsd 19115/-3/md1/1.0/metadataWExtendedType.xsd 19115/-3/md1/2.0/md1.xsd 19115/-3/md1/2.0/metadataWExtendedType.xsd 19115/-3/mds/1.0/metadataDataServices.xsd 19115/-3/mds/1.0/mds.xsd 19115/-3/mds/2.0/metadataDataServices.xsd 19115/-3/mds/2.0/mds.xsd 19115/-3/md2/1.0/metadataWithExtensions.xsd 19115/-3/md2/1.0/md2.xsd 19115/-3/md2/2.0/metadataWithExtensions.xsd 19115/-3/md2/2.0/md2.xsd 19115/-3/mdt/1.0/mdt.xsd 19115/-3/mdt/1.0/metadataTransfer.xsd 19115/-3/mdt/2.0/mdt.xsd 19115/-3/mdt/2.0/metadataTransfer.xsd 19165/gpm/1.0/gpm.xsd 19165/gpm/1.0/geospatialPreservationMetadata.xsd 19131/-1/dps/2.0/dps.xsd — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ISO-TC211/schemas/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBGJZ2IPGRJOOQDVM767P3THHE7NANCNFSM42M5TWFA.

ejbleys commented 3 years ago

Type 1 could be converted into type 2 if you prefer There are pros and cons for each

Evert Bleys 4 Tudor Place HUGHES ACT 2605 Australia email: @. Mob: +61 (0)411 483 876 Land: +61 (0)2 6281 1773 Skype: @.

On 2021-04-16, at 3:34 am, Alexander Dyuzhev @.***> wrote:

In XSDs there are 3 types of links to another XSDs:

relative path:

absolute path to https://schemas.isotc211.org https://schemas.isotc211.org/:

absolute path to http://standards.iso.org http://standards.iso.org/:

As I understand, types 1 and 2 are equal, because https://schemas.isotc211.org https://schemas.isotc211.org/ is a mirror of this repository.

Regarding type 3, as soon XSD opens any another XSD from site http://standards.iso.org http://standards.iso.org/, then all paths evaluate from http://standards.iso.org http://standards.iso.org/, not from https://schemas.isotc211.org https://schemas.isotc211.org/ (or local disk). Between https://schemas.isotc211.org https://schemas.isotc211.org/ and http://standards.iso.org http://standards.iso.org/ there is difference, for example:

in schema https://schemas.isotc211.org/19115/-3/gco/1.0/gco.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/gco.xsd:

in schema https://standards.iso.org/iso/19115/-3/gco/1.0/gco.xsd https://standards.iso.org/iso/19115/-3/gco/1.0/gco.xsd:

What is difference between https://schemas.isotc211.org https://schemas.isotc211.org/ and https://standards.iso.org https://standards.iso.org/? Can we replace all links to https://schemas.isotc211.org https://schemas.isotc211.org/?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ISO-TC211/schemas/issues/34#issuecomment-820608063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBGJZ6LEHGLBNOIJOH3IT3TI4PSPANCNFSM42M5TWFA.

ronaldtse commented 3 years ago

@ejbleys for type 3, the only issue here is with schemaLocation. Why don't we change all the https://standards.iso.org/... to https://schemas.isotc211.org/...? It doesn't affect the namespace or the usage of the schema. schemaLocation in any case is technically provided as an informative hint.

ejbleys commented 3 years ago

GitHub has been updated Evert Bleys 4 Tudor Place HUGHES ACT 2605 Australia email: @. Mob: +61 (0)411 483 876 Land: +61 (0)2 6281 1773 Skype: @.

On 2021-04-16, at 4:05 pm, Ronald Tse @.***> wrote:

@ejbleys https://github.com/ejbleys for type 3, the only issue here is with schemaLocation. Why don't we change all the https://standards.iso.org/... to https://schemas.isotc211.org/...? It doesn't affect the namespace or the usage of the schema. schemaLocation in any case is technically provided as an informative hint.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ISO-TC211/schemas/issues/34#issuecomment-820932099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBGJZ4RJJVHLIRUSCZBCJLTI7HTPANCNFSM42M5TWFA.

ronaldtse commented 3 years ago

@ejbleys I can't see the GH update, was it pushed? Thanks.

Intelligent2013 commented 3 years ago

this is probably round tripping - that is allowed name=“AbstractObject_Type” is declared in https://schemas.isotc211.org/19103/-/gco/1.2.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes2014.xsd https://schemas.isotc211.org/19139/-/gco/1.0/gcoBase.xsd There is no direct or indirect interactions between these files

@ejbleys yes, between these files there isn't interactions directly. But via another XSDs we get the case, when:

I've checked my proposal (change http://standards.iso.org/ to https://schemas.isotc211.org/) on a few above noticed xsd, and the issue was gone.

ejbleys commented 3 years ago

Still? Evert Bleys 4 Tudor Place HUGHES ACT 2605 Australia email: @. Mob: +61 (0)411 483 876 Land: +61 (0)2 6281 1773 Skype: @.

On 2021-04-16, at 6:07 pm, Alexander Dyuzhev @.***> wrote:

this is probably round tripping - that is allowed name=“AbstractObject_Type” is declared in https://schemas.isotc211.org/19103/-/gco/1.2.0/baseTypes.xsd https://schemas.isotc211.org/19103/-/gco/1.2.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes2014.xsd https://schemas.isotc211.org/19115/-3/gco/1.0/baseTypes2014.xsd https://schemas.isotc211.org/19139/-/gco/1.0/gcoBase.xsd https://schemas.isotc211.org/19139/-/gco/1.0/gcoBase.xsd There is no direct or indirect interactions between these files

@ejbleys https://github.com/ejbleys yes, between these files there isn't interactions directly. But via another XSDs we get the case, when:

one imported XSD (let's say "A") pointed to baseTypes.xsd, and another imported XSD (let's say "B") pointed to baseTypes2014.xsd 19115/-3/mda/2.0/mda.xsd pointed to "A" XSD and "B" XSD, i.e. 19115/-3/mda/2.0/mda.xsd imported both "baseTypes.xsd" and "baseTypes2014.xsd", and we get duplicated declarations. I've checked my proposal (change http://standards.iso.org/ to https://schemas.isotc211.org/) on a few above noticed xsd, and the issue was gone.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ISO-TC211/schemas/issues/34#issuecomment-820999898, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBGJZ4PZFKRWDXMWGE3TTTTI7V4JANCNFSM42M5TWFA.

Intelligent2013 commented 3 years ago

Still?

@ejbleys yes, there is a links to 'schemaLocation="http://standards.iso.org/iso...'


I see at master branch.
Intelligent2013 commented 3 years ago

PR created https://github.com/ISO-TC211/schemas/pull/39

Intelligent2013 commented 3 years ago

Done. Closing.