DATEX-II-EU / DatexII

Main repository for issues and bugs for the DATEXII standard
0 stars 0 forks source link

Namespace URI from ExternalNamespace not mapped (Bugzilla Bug 476) #476

Open datexii opened 3 months ago

datexii commented 3 months ago

This issue was created automatically with bugzilla2github.py

Bugzilla Bug 476

Date: 2024-03-14T17:09:54+01:00 From: @JosefKaltwasser To: @JosefKaltwasser

Last updated: 2024-03-18T13:13:43+01:00

datexii commented 3 months ago

Comment 1920

Date: 2024-03-14 17:09:54 +0100 From: @JosefKaltwasser

In the Methodology, the property namespaceUri is defined to capture the URI for an external namespace, but it is never referred to in the XML Schema mapping. It should of course be mapped to at least corresponding namespace declarations and imports/includes. Then, it needs to be considered whether schema locations would also be needed.

datexii commented 3 months ago

Comment 1923

Date: 2024-03-15 09:58:55 +0100 From: @JosefKaltwasser

It seems the whole ExternalXxx concept is not properly implemented in the Methodology, in the XSD mapping, in the UML profile and subsequently also not in the tool. This would imply subsequent issues for these components.

datexii commented 3 months ago

Comment 1924

Date: 2024-03-18 11:36:27 +0100 From: @JosefKaltwasser

2024-03-15 comment was proven to be incorrect. The exact cause of the incorrect observation cannot be reconstructed, but the statements are definitively incorrect.

Regarding the original content of the bug, it is observed hat the exact rules to determine the namespaces that need to be declared are not well described in section A.3.8. The generic statement '… {further namespace declarations where required' would of course in principle also cover external namespaces. A more precise specification would be preferrable, whioch then would refer to elements used from other namespaces, including external namespaces.

It is further noticed that A.3.8 does not mention at all, that on top of the namespace declarations the namespaces also need to be imported. While the DATEX II generated namespaces are referred to with a relative path (i.e. only using the schema name), external namesapce content must be imported with the schema location provided by the schemaLocation property of the ExternalNamespace stereotype.

datexii commented 3 months ago

Comment 1926

Date: 2024-03-18 13:13:43 +0100 From: @JosefKaltwasser

Proposal: Replace

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:Prefix=NamespaceURL version=Version targetNamespace=NamespaceURL … {further namespace declarations where required} xmlns:xs="http://www.w3.org/2001/XMLSchema"> … </xs:schema>

With

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:Prefix=NamespaceURL version=Version targetNamespace=NamespaceURL … {further namespace declarations where required} xmlns:xs="http://www.w3.org/2001/XMLSchema"> </xs:schema> ... {namespace imports where required}

Namespace declarations and imports are required if elements from these namespaces are used in the target namespace of the schema. Schema locations of DATEX II namespaces are given by the schema names only (i.e. relativ location to the importing schema). Schema locations for external namespaces are taken from the value of the namespaceUri property of the ExternalNamespace stereotype.