We've hard forked the XML schema AIXM 4.5 to properly add our up-to-then informal extensions as OFMX. This is finished now and we'll release 1.0 of OFMX soonish.
From here on forward, we'd like to implement future extensions in a separate namespace and (after an extension has proven useful) move it to the main schema as a new release.
Unfortunately, AIXM (and OFMX for that matter) is imposing a strict order on the nodes which seems to complicate things. Here's an example:
<?xml version="1.0" encoding="UTF-8"?>
<OFMX-Snapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.openflightmaps.org/0.1/OFMX-Snapshot.xsd" version="0.1" origin="example" namespace="00000000-0000-0000-0000-000000000000" regions="LF" created="2018-01-01T12:09:15Z" effective="2018-01-04T00:00:00Z" expiration="2018-02-01T00:00:00Z">
<Ser source="LF|AD|1.6|2018-01-04|1846">
<SerUid mid="6a3ceb1b-5bbf-1fe4-8926-6fddd6bd1169">
<UniUid region="LF" mid="d105b6b6-e020-2a73-5ec9-5eb3d5d86499">
<txtName>STRASBOURG</txtName>
<codeType>APP</codeType>
</UniUid>
<codeType>APP</codeType>
<noSeq>1</noSeq>
</SerUid>
<Stt>
<codeWorkHr>TIMSH</codeWorkHr>
<Timsh>
<codeTimeRef>UTCW</codeTimeRef>
<dateValidWef>01-01</dateValidWef>
<dateYearValidWef>2019</dateYearValidWef>
<dateValidTil>31-12</dateValidTil>
<dateYearValidTil>2020</dateYearValidTil>
<codeDay>MON</codeDay>
<codeDayTil>FRI</codeDayTil>
<timeWef>08:00</timeWef>
<codeEventWef>SR</codeEventWef>
<timeRelEventWef>-30</timeRelEventWef>
<codeCombWef>L</codeCombWef>
<timeTil>20:00</timeTil>
<codeEventTil>SS</codeEventTil>
<timeRelEventTil>30</timeRelEventTil>
<codeCombTil>E</codeCombTil>
</Timsh>
<txtRmkWorkHr>Consult NOTAM</txtRmkWorkHr>
</Stt>
<txtRmk>aka STRASBOURG approche</txtRmk>
</Ser>
</OFMX-Snapshot>
My probably naïve idea is to add a pre
namespace like so:
<OFMX-Snapshot
xmlns:pre="http://schema.openflightmaps.org/1.0-pre/OFMX-Experimental.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.openflightmaps.org/0.1/OFMX-Snapshot.xsd"
(...)
>
And then add experimental features like so:
<Stt>
<pre:foo>bar</pre:foo>
<codeWorkHr>TIMSH</codeWorkHr>
(...)
</Stt>
Validating this results in:
element foo: Schemas validity error : Element '{http://schema.openflightmaps.org/1.0-pre/OFMX-Experimental.xsd}foo': This element is not expected. Expected is ( codeWorkHr ).
Is such a namespace approach for experimental features feasible at all given the way AIXM (and by extension OFMX) is built?
Thanks for your hints!