ISO-TC211 / schemas-isotc211.github.io

Official ISO/TC 211 XML schemas site
https://schemas.isotc211.org
1 stars 1 forks source link

Auto generate pretty XSD schema documention #18

Closed ronaldtse closed 3 years ago

ronaldtse commented 3 years ago

As done in https://github.com/unitsml/schemas/tree/xsd_liquid

Intelligent2013 commented 3 years ago

@ronaldtse some XSDs don't valid and can't be parsed. For example, https://github.com/ISO-TC211/schemas/blob/master/19110/-/gfc/1.0/gfc.xsd:

<xs:import namespace="http://www.isotc211.org/2005/gmx"schemaLocation="https://schemas.isotc211.org/19139/-/gmx/1.0/gmx.xsd"/>

i.e. there isn't space before schemaLocation. Can I fix it?

ronaldtse commented 3 years ago

@Intelligent2013 yes please, this is a known issue I’ve come across but haven’t done the fix. Thanks!

Intelligent2013 commented 3 years ago

@ronaldtse

  1. Some XSDs have a links to the non-existing files:

    • 19136/-/gmw/1.1.0/gmw.xsd
    • 19163/-1/igd/1.1.0/igd.xsd
    • 19163/-1/igd/1.1.0/IE_ImageryAndGriddedData.xsd
    • 19135/-2/pre/1.2.0/pre.xsd
    • 19136/-/gmw/1.1.1/gmlWrapperTypes.xsd
    • 19119/-/srv/srv/serviceMetadata.xsd (from schemas/19119/-/srv/1.0/serviceModel.xsd)
  2. The file schemas.isotc211.org/schemas.isotc211.org/schemas/19136/-/gml/1.0/SchematronConstraints.xsd is Schematron file, change extension to .sch to skip xsd documentation generation.

  3. In the file 19110/-/gfc/1.0/gfc.xsd add space before schemaLocation in <xs:import namespace="http://www.isotc211.org/2005/gmx"schemaLocation="https://schemas.isotc211.org/19139/-/gmx/1.0/gmx.xsd"/>

  4. The file 19155/gpi/1.0/gpi.xsd has non-correct link to ../../../../schemas.isotc211.org/19155/gpi/1.0//placeIdentifier.xsd Solution: change

    <include schemaLocation="../../../../schemas.isotc211.org/19155/gpi/1.0//placeIdentifier.xsd"/>

    to

    <include schemaLocation="../../../../schemas/19155/gpi/1.0/placeIdentifier.xsd"/>
  5. 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 this issue:

  1. 19115/-3/gcx/1.0/extendedTypes_autoFromShapeChange.xsd and 19115/-3/gcx/1.0/extendedTypes.xsd contain two global components with the same name (via included xsd) Error schema contains two global components with the same name FileName_Type, FileName,FileName_PropertyType, MimeFileType_Type, MimeFileType, MimeFileType_PropertyType, Anchor_Type, Anchor, Anchor_PropertyType

  2. In 19115/-3/msr/1.0/spatialRepresentationImagery.xsd there are a references to undeclared elements/types:

    • msr:MD_Georectified
    • msr:MD_Georectified_Type
    • msr:MD_Georeferenceable
    • msr:MD_Georeferenceable_Type

I can fix only issues 2, 3 and 4, but I don't have an access to https://github.com/ISO-TC211/schemas repository.

ronaldtse commented 3 years ago

@Intelligent2013 I have provided you write access to the "schemas" repository.

  1. For each of these issues here, can you make a separate issue in the "schemas" repository?
  2. For items that can be fixed, can you make a single PR there (separate branch) to fix them?

Thanks.

Intelligent2013 commented 3 years ago

@ronaldtse thank you!

  1. For each of these issues here, can you make a separate issue in the "schemas" repository?
  1. For items that can be fixed, can you make a single PR there (separate branch) to fix them?

https://github.com/ISO-TC211/schemas/pull/32

Intelligent2013 commented 3 years ago

Before create PR (https://github.com/ISO-TC211/schemas.isotc211.org/compare/issue/18)

ronaldtse commented 3 years ago

All done.