Hi all,

The following is an experimental scheme I have come up with that makes
minimal change to the dtd to add a capability for vector/matrices. The
major change is to the definition of the variableDef element.

I have added to following in the element definition:
 "dimensionDef?, (calculation | array)?"

Also I have added to following in the attribute list:
     typeData   (real | integer) #IMPLIED
     base       CDATA   #IMPLIED
     typeArray  (scalar | vector | matrix)      #IMPLIED"


The "dimensionDef" is used when listing the dimensions of the
vector/matrix.
The "array" is used to represent the associated data table for the
vector/matrix.

The "typeData" and "base" have been included to address Giovanni's wish
to have data types for each variable. This concept I have taken from
that used by MathML for the definition of "cn" and "ci" elements. The
"typeData" is a subset of that defined in MathML (having the
possibilities of integer | rational | complex-cartesian | complex-polar
| real | e-notation  [Default : real]). The "base" has an integer value
of between 2 and 36, with a default of 10.
The "typeArray" attribute is used to define whether the variableDef
represents a scalar value, or vector/matrix values. This is again
similar to the convention used by MathML for the "ci" element.

<!ELEMENT variableDef 
     (description?, 
     (provenance? | provenanceRef?)
, dimensionDef?, (calculation | array)?, isOutput?, isState?,
isStateDeriv?, isStdAIAA?, uncertainty?)
>
<!ATTLIST variableDef
     name       CDATA   #REQUIRED
     varID      ID      #REQUIRED
     units      CDATA   #REQUIRED
     axisSystem CDATA   #IMPLIED
     sign       CDATA   #IMPLIED
     alias      CDATA   #IMPLIED
     symbol     CDATA   #IMPLIED
     initialValue       CDATA   #IMPLIED
     typeData   (real | integer) #IMPLIED
     base       CDATA   #IMPLIED
     typeArray  (scalar | vector | matrix)      #IMPLIED
>

To support this, the following is also required.

<!ELEMENT dimensionDef 
     (description?, dim+)
>
     
<!ELEMENT dim (#PCDATA)>

<!ELEMENT array (dataTable)>

My syntax may not be totally correct. I have attached a sample file on
how vector/matrices might look in XML using this scheme.

Supporting whatever scheme is agreed on through Janus will be the next
challenge.

Geoff



IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DAVEfunc SYSTEM "../../dtd/DAVEfunc.dtd">
<DAVEfunc>
  <fileHeader>
    <author name="Geoff Brian" org="DSTO Air Vehicles Division"/>
    <fileCreationDate date="2008-03-15"/>
    <fileVersion>$Revision: 1.0$</fileVersion>
    <description>
      This file is a test file for Vector and Matrix enhancements to DAVE-ML.
    </description>
  </fileHeader>

  <variableDef name="FileRevision" varID="fileRevision" units="ND">
    <description>$Revision: 1.0 $</description>
    <isOutput/>
  </variableDef>
  
  <!--===================================-->
  <!--Variable Definitions-->
  <!--Data Management-->
  <!--===================================-->
  <!--
    NOTE: The following variableDefs contain general information about the data encoded within the dataset.
    
    dataClassification: Is the overall classification given to the data. It should be the highest state of any data encoded in the file.
    The classification should be in capitals.
    dataQuality: is a indicator of the quality metric given to the data.
    dataAssumptions: is a short description of the pertinent assumptions that have been made when compiling the dataset.
  -->
  <variableDef name="dataClassification_" varID="dataClassification" units="">
    <description>UNCLASSIFIED</description>
    <isOutput/>
  </variableDef>
  <variableDef name="dataQuality_" varID="dataQuality" units="ND" initialValue="1">
    <description>Data Quality between 1 and 10</description>
    <isOutput/>
  </variableDef>
  <variableDef name="dataAssumptions_" varID="dataAssumptions" units="">
    <description>
      Assume nothing.
    </description>
    <isOutput/>
  </variableDef>
  
  <!--===================================-->
  <!--Variable Definitions-->
  <!--Input Variables-->
  <!--===================================-->
  <!--
    NOTE: The following is a list of the independent parameters used in evaluations.
    
                  The convention for defining independent parameter varIDs is to append and underscore to the
                  variable name; for example angle of attack will be "angleOfAttack_".
    
                  The name attribute of the variableDef is formed by appending the units description to the varID.
                  Elements of the units description are separated using and underscore or dot;
                  for example, "trueAirspeed_m_s-1" or "trueAirspeed_m.s-1".
    
                  The units associated with each entry will be dependent on the aircraft and the source data. The
                  units included in this file are indicative of common types, but should be reviewed when creating
                  an specific aircraft dataset. The elements of the units descriptions should conform to the Flight
                  Systems Units of Measure Guidelines. Each element should be separated by a space or dot;
                  for example, metres per second  "m s-1" or "m.s-1".
    
                  The units of the independent parameters must be consistent with the units of dependent parameters
                  within the file. Otherwise, unit inconsistency will lead to incorrect evaluation of the dependent parameters. 
    -->
  <variableDef name="inputVector_m_s-1" varID="inputVector_" units="m s-1" typeArray="vector">
    <description>This is a test input vector</description>
    <dimensionDef>
      <dim>3.0</dim>
    </dimensionDef>
  </variableDef>
  
  <variableDef name="inputMatrix_m_s-1" varID="inputMatrix_" units="m s-1" typeArray="vector">
    <description>This is a test input vector</description>
    <dimensionDef>
      <dim>3.0</dim>
      <dim>3.0</dim>
    </dimensionDef>
  </variableDef>
  
  <!--===================================-->
  <!--Variable Definitions-->
  <!--Constants-->
  <!--===================================-->
  
  <!--===================================-->
  <!--Variable Definitions-->
  <!--Internal-->
  <!--===================================-->
  <!--
    NOTE:
    The following variables are used internally within the XML file.
    
  -->
  
  <!--===================================-->
  <!--Variable Definitions-->
  <!--Output Variables-->
  <!--===================================-->
  <variableDef name="matrix2D_ft" varID="matrix2D" units="ft" typeArray="matrix">
    <dimensionDef>
      <dim>4.0</dim> <!-- Number of rows in the matrix -->
      <dim>3.0</dim> <!-- Number of columns in the matrix -->
    </dimensionDef>
    <array>
      <dataTable>
        1.0, dataQuality, 2.0,
        1.0, dataQuality, 3.0,
        1.0, dataQuality, 4.0,
        1.0, dataQuality, 5.0,
      </dataTable>
    </array>
    <isOutput/>
  </variableDef>
  
  <variableDef name="vectorTest_ft" varID="vectorTest" units="ft" typeArray="vector">
    <dimensionDef>
      <dim>4.0</dim> <!-- Number of rows in the vector -->
    </dimensionDef>
    <calculation>
      <math>
        <apply>
          <times/>
          <ci>matrix2D</ci> <!-- 4x3 -->
          <ci>inputMatrix_</ci> <!-- [4x3] x [3x3] = [4x3] -->
          <ci>inputVector_</ci> <!--  [4x3] x [3x3] x [3x1] = [4x1]  -->
          <cn>2.0</cn>
        </apply>
      </math>
    </calculation>
    <isOutput/>
  </variableDef>
  
  <!--===================================-->
  <!--Break Points Definitions-->
  <!--===================================-->
  <!--
    Note: The following are example break points for the subsequent function data tables.
    
               The units of the breakpoints must be consistent with the independent parameters in the function tables.
  -->
  
  <!--===================================-->
  <!-- Gridded Table Definitions-->
  <!--===================================-->
  
  <!--===================================-->
  <!-- Functions Definitions-->
  <!--===================================-->
  
</DAVEfunc>

Reply via email to