tigl icon indicating copy to clipboard operation
tigl copied to clipboard

Find `<cpacsVersion>` element at `header/versionInfos/versionInfo/cpacsVersion`

Open MarAlder opened this issue 1 month ago • 0 comments

CPACS 3.5 has a new header node: see docs

To allow TiGL to open CPACS 3.5 files the <cpacsVersion> element is still available in the old location, although optional and marked as deprecated. Also the examples show this:

grafik

<?xml version="1.0" encoding="UTF-8"?>
<cpacs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schema/cpacs_schema.xsd">
  <header>
    <name>Canard example</name>
    <version>0.4.0</version>
    <!-- Deprecated: The <cpacsVersion> is needed to open the file in TiGL. TiGL will soon be adapted to get this information from the versinInfo node. -->
    <cpacsVersion>3.5</cpacsVersion>
    <versionInfos>
      <versionInfo version="0.4.0">
        <creator>DLR-SL</creator>
        <timestamp>2023-08-07T10:30:00</timestamp>
        <description>Example for Canard wing</description>
        <cpacsVersion>3.5</cpacsVersion>
      </versionInfo>
      <versionInfo version="0.3.0">
        <creator>Martin Siggel</creator>
        <timestamp>2012-10-09T15:12:47</timestamp>
        <description>Example for Canard wing</description>
        <cpacsVersion>3.2</cpacsVersion>
      </versionInfo>
    </versionInfos>
  </header>

Apparently, however, I have not explained reading the documentation or the existence of the examples well enough. Therefore, there is a growing opinion that TiGL does not support CPACS v3.5. I have just learned of a project that therefore decided to use v3.2.

Therefore, we should implement and release a patch that prevents TiGL from searching for the element not only at the old position but also at the new position in the header.

MarAlder avatar May 16 '24 14:05 MarAlder