Skip to content

Commit

Permalink
Refactor definitions of sourceBase/source attributes (#49)
Browse files Browse the repository at this point in the history
Needed changes due to broader use of GMetaData and to make the overall
description more easily understandable. Also removes remnants and
discrepancies between documentation and schema file documentation.
  • Loading branch information
pmai authored Oct 25, 2024
1 parent 6cdd1f4 commit 1e04553
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 104 deletions.
28 changes: 19 additions & 9 deletions docs/4___common_content.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,18 @@ This mandatory attribute specifies the MIME type of the meta data, which does no
If no specific MIME type can be indicated, then the type `application/octet-stream` is to be used.
|source a|
Optional attribute indicating the source of the meta data as a URI (cf. RFC 3986).
For purposes of the resolution of relative URIs the base URI is the URI of the SSD, if the sourceBase attribute is not specified or is specified as `SSD`, and the URI of the containing model element (e.g. component) if the base attribute is specified as `component`.

This allows the specification of meta data sources that reside inside the component (for example an FMU) through relative URIs.
The base URI for the resolution of relative URIs is determined by the sourceBase attribute.

If the source attribute is missing, the meta data *MUST* be provided inline as contents of a Content element, which *MUST NOT* be present otherwise.
|sourceBase a|
Defines the base the source URI is resolved against:
If the attribute is missing or is specified as `SSD`, the source is resolved against the URI of the SSD, if the attribute is specified as `component` the URI is resolved against the (resolved) URI of the model element (e.g. component) source.

If the attribute is missing or is specified as `file`, the source is resolved against the URI of the containing file.

If the containing model element has a source attribute, the sourceBase attribute can be specified as `resource`.
In this case the URI is resolved against the (resolved) source URI of the containing model element.

The last option allows the specification of meta data sources that reside inside a resource (for example an FMU) through relative URIs.
|===

===== Content
Expand Down Expand Up @@ -561,13 +565,19 @@ This mandatory attribute specifies the MIME type of the signature, which does no
If no specific MIME type can be indicated, then the type `application/octet-stream` is to be used.
|source a|
Optional attribute indicating the source of the signature as a URI (cf. RFC 3986).
For purposes of the resolution of relative URIs the base URI is the URI of the SSD, if the sourceBase attribute is not specified or is specified as `SSD`, the URI of the containing model element (e.g. component) if the base attribute is specified as `component`, or the URI of the meta data source if the sourceBase attribute is specified as `metaData`.

This allows the specification of signature sources that reside inside the component (for example an FMU), or the meta data through relative URIs.
The base URI for the resolution of relative URIs is determined by the sourceBase attribute.

If the source attribute is missing, the signature *MUST* be provided inline as contents of a Content element, which *MUST NOT* be present otherwise.
|sourceBase a|
Defines the base the source URI is resolved against:
If the attribute is missing or is specified as `SSD`, the source is resolved against the URI of the SSD, if the attribute is specified as `component` the URI is resolved against the (resolved) URI of the model element (e.g. component) source, or if the attribute is specified as `metaData` the URI is resolved against the (resolved) URI of the meta data source.
The value `metaData` is only valid if the Signature element is contained within a MetaData element.

If the attribute is missing or is specified as `file`, the source is resolved against the URI of the containing file.

If the containing model element has a source attribute, the sourceBase attribute can be specified as `resource`.
In this case the URI is resolved against the (resolved) source URI of the containing model element.

If the Signature element is contained within a MetaData element, the sourceBase attribute can be specified as `metaData`.
In this case the URI is resolved against the (resolved) URI of the meta data source.

The last two options allow the specification of signature sources that reside inside a resource (for example an FMU), or the meta data through relative URIs.
|===
26 changes: 16 additions & 10 deletions docs/5___ssd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,17 @@ Therefore they take priority over any of the existing parameter bindings (for pa
No further types are currently defined, but can of course be added at a later date, for pre-existing parameter file formats, like CDF, etc.
|source a|
Optional attribute indicating the source of the parameters as a URI (cf. RFC 3986).
For purposes of the resolution of relative URIs the base URI is the URI of the SSD, if the sourceBase attribute is not specified or is specified as SSD, and the URI of the referenced component if the base attribute is specified as component.

This allows the specification of parameter sources that reside inside the component (for example an FMU) through relative URIs.
The base URI for the resolution of relative URIs is determined by the sourceBase attribute.

If the source attribute is missing, the parameter set *MUST* be provided inline as contents of a ParameterValues element, which *MUST NOT* be present otherwise.
|sourceBase a|
Defines the base the source URI is resolved against:

If the attribute is missing or is specified as `SSD`, the source is resolved against the URI of the containing file.

If the attribute is specified as `component` the URI is resolved against the (resolved) source URI of the component.

|sourceBase |Defines the base the source URI is resolved against:
If the attribute is missing or is specified as SSD, the source is resolved against the URI of the SSD, if the attribute is specified as component the URI is resolved against the (resolved) URI of the component source.
The last option allows the specification of parameter sources that reside inside a resource (for example an FMU) through relative URIs.
|prefix |Defines the optional prefix for name resolution and mapping purposes for this binding.
If this attribute is empty or not supplied no prefix is used for name resolution and mapping, otherwise the specified prefix is prepended to all names in the parameter source prior to processing the normal name resolution or name mapping rules.
This allows the user to apply a parameter set normally intended for a component (and thus containing bare parameter names) at a system level targeted to one element of the system by supplying the name of the element plus a dot as a prefix on the binding, thus causing all parameter names in the parameter set to be treated as if they were specified with proper hierarchical names.
Expand Down Expand Up @@ -471,14 +474,17 @@ If no mapping is supplied, the parameter names of the parameter source are used
No further types are currently defined, but can of course be added at a later date.
|source a|
Optional attribute indicating the source of the parameter mapping as a URI (cf. RFC 3986).
For purposes of the resolution of relative URIs the base URI is the URI of the SSD, if the sourceBase attribute is not specified or is specified as SSD, and the URI of the referenced component if the base attribute is specified as component.

This allows the specification of parameter mapping sources that reside inside the component (for example an FMU) through relative URIs.
The base URI for the resolution of relative URIs is determined by the sourceBase attribute.

If the source attribute is missing, the parameter mapping *MUST* be provided inline as contents of the ParameterMapping element, which *MUST* be empty otherwise.
|sourceBase a|
Defines the base the source URI is resolved against:

If the attribute is missing or is specified as `SSD`, the source is resolved against the URI of the containing file.

If the attribute is specified as `component` the URI is resolved against the (resolved) source URI of the component.

|sourceBase |Defines the base the source URI is resolved against:
If the attribute is missing or is specified as SSD, the source is resolved against the URI of the SSD, if the attribute is specified as component the URI is resolved against the (resolved) URI of the component source.
The last option allows the specification of parameter mapping sources that reside inside a resource (for example an FMU) through relative URIs.
|===

The contents of the element *MUST* be empty if the source attribute is present.
Expand Down
Binary file modified docs/images/SystemStructureCommon_MetaData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/SystemStructureCommon_Signature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 37 additions & 47 deletions schema/SystemStructureCommon.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -311,38 +311,31 @@
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute indicates the source of the resource meta data as a
URI (cf. RFC 3986). For purposes of the resolution of relative URIs
the base URI is the URI of the STC, if the sourceBase attribute is
not specified or is specified as STC, and the URI of the referenced
resource if the sourceBase attribute is specified as resource.

This allows the specification of meta data sources that reside
inside the resource (e.g. an FMU) through relative URIs.

For meta data that are located alongside the STC, relative URIs
without scheme and authority can and should be used to specify the
meta data sources. For meta data that are packaged inside an SSP
that contains this STC, this is mandatory (in this way, the STC
URIs remain valid after unpacking the SSP into the filesystem).

If the source attribute is missing, the meta data is provided
inline as contents of the Content element, which must not be
present otherwise.
URI (cf. RFC 3986). The base URI for the resolution of relative URIs
is determined by the sourceBase attribute.

If the source attribute is missing, the meta data is provided inline
as contents of a Content element, which must not be present otherwise.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sourceBase" use="optional" default="SSD">
<xs:attribute name="sourceBase" use="optional" default="file">
<xs:annotation>
<xs:documentation xml:lang="en">
Defines the base the source URI is resolved against: If the attribute
is missing or is specified as SSD, the source is resolved against the
URI of the SSD, if the attribute is specified as resource the URI is
resolved against the (resolved) URI of the resource source.
is missing or is specified as file, the source is resolved against the
URI of the containing file. If the containing model element has a
source attribute, the sourceBase attribute can be specified as resource.
In this case the URI is resolved against the (resolved) source URI of
the containing model element.

The last option allows the specification of meta data sources that
reside inside a resource (for example an FMU) through relative URIs.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="SSD"/>
<xs:enumeration value="file"/>
<xs:enumeration value="resource"/>
</xs:restriction>
</xs:simpleType>
Expand Down Expand Up @@ -397,40 +390,37 @@
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute indicates the source of the digital signature as a
URI (cf. RFC 3986). For purposes of the resolution of relative URIs
the base URI is the URI of the SSD, if the sourceBase attribute is
not specified or is specified as SSD, the URI of the containing model
element (e.g. component) if the sourceBase attribute is specified as
component, or the URI of the meta data source if the sourceBase
attribute is specified as metaData.

This allows the specification of signature sources that reside
inside the component (for example an FMU), or the meta data
through relative URIs.

If the source attribute is missing, the signature is provided
inline as contents of the Content element, which must not be
present otherwise.
URI (cf. RFC 3986). The base URI for the resolution of relative URIs
is determined by the sourceBase attribute.

If the source attribute is missing, the signature must be provided
inline as contents of a Content element, which must not be present
otherwise.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sourceBase" use="optional" default="SSD">
<xs:attribute name="sourceBase" use="optional" default="file">
<xs:annotation>
<xs:documentation xml:lang="en">
Defines the base the source URI is resolved against: If the attribute
is missing or is specified as SSD, the source is resolved against the
URI of the SSD, if the attribute is specified as component the URI is
resolved against the (resolved) URI of the model element (e.g.
component) source, or if the attribute is specified as metaData the
URI is resolved against the (resolved) URI of the meta data source.
The value metaData is only valid if the Signature element is contained
within a MetaData element.
Defines the base the source URI is resolved against: If the attribute
is missing or is specified as file, the source is resolved against the
URI of the containing file. If the containing model element has a
source attribute, the sourceBase attribute can be specified as resource.
In this case the URI is resolved against the (resolved) source URI of
the containing model element. If the Signature element is contained
within a MetaData element, the sourceBase attribute can be specified as
metaData. In this case the URI is resolved against the (resolved) URI
of the meta data source.

The last two options allow the specification of signature sources that
reside inside a resource (for example an FMU), or the meta data
through relative URIs.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="SSD"/>
<xs:enumeration value="component"/>
<xs:enumeration value="file"/>
<xs:enumeration value="resource"/>
<xs:enumeration value="metaData"/>
</xs:restriction>
</xs:simpleType>
Expand Down
Loading

0 comments on commit 1e04553

Please sign in to comment.