Skip to content

Proposals of master file referencing concepts with xml-model #1

@nkutsche

Description

@nkutsche

During my discussions with @kosek and George Bina on the XML Prague 2020 we outlined three concepts how master file references could be expressed, extending or adapting the xml-model PI.

Note: The naming of the below proposed structures (PI name, pseudo-attribute or namespace) are just raw drafts or even placeholder. It would be another issue to find good and intuitive names for the new structures.

Note 2: The order of the proposals is not an indication of evaluation, but has a semantic logic: from the closest to the farthest away from the current specification.

As an own schematype namespace

Introduces a new schematype namespace that indicats that the referenced file in href is not a schema but the master file.

The master file is used to detect the associated schema(s). Multiple master files could be referenced by multiple xml-model PIs. Other schema associations can be added by additional xml-model PIs as before.

Example

<?xml-model href="path/to/master/file.xml" type="application/xml" schematypens="http://www.some-ns-url.com/indicating/that/this/is/a/pointer/to/a/master/file"?>

Positives

  • This is very close to the current specification.
  • Upwards and downwards compatible, as the pseudo-attribute schematypens of the current specification is extensible by other values.

Negatives

  • There is a semantic gap between validation language reference and master file reference. We maybe misuse the same structure for a different purpose.
  • The xml-model PI needs to be parsed to detect module files.

As an additional pseudo attribute

Introduces a new pseudo-attribute which references the master file. The xml-model PI with such pseudo attribute may have type, charset or title, but no other pseudo attribute.

The master file is used to detect the associated schema(s). Multiple master files could be referenced by multiple xml-model PIs or by a whitespace separated list of file references. Other schema associations can be added by additional xml-model PIs as before.

Example

<?xml-model master-href="path/to/master/file.xml"?>

Positives

  • Close to the current specification
  • Clear distinction between master file and schema reference

Negatives

  • The xml-model PI needs to be parsed to detect module files.
  • More logic in the xml-model PI needs to be respected (e.g. do not use master-herf and href in the same PI).

As an own PI

Introduces a new PI e.g. xml-master which references with a pseudo-attribute the master file.

The master file is used to detect the associated schema(s). Multiple master files could be referenced by multiple xml-master PIs or by a whitespace separated list of file references. Other schema associations can be added by additional xml-model PIs as before.

Example

<?xml-master href="path/to/master/file.xml"?>

Positives

  • Clear distinction between master and schema reference.
  • Simple identification of module files.
  • The new PI could include more informations about the used embedding logic (e.g. XInlcude, XSLT, etc.).

Negatives

  • As PIs have no namespaces, new names could lead to name conflicts.
  • This proposal is the furthest from the current specification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions