Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-3382

[ElementType] Improve the generated SAX events for a multiple value

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.LATER
    • 4.3.0
    • None
    • None
    • 1 - Middle term
    • 3 - Complex

      In ElementType, there is 3 ways to generate SAX events for a value:

      • The XMLElementType#write method that is used for example by the general configuration
      • The ElementType#valueToSAX that is used by the DataHolder#dataToSAX method, used for example by the data archive
      • The ElementType#parseConfiguration that is used to parse the default and enumerated values

      With these 3 methods, there is 3 different ways to process th multiple values:

      • XMLElementType#write

      <multipleStringData>
          <value>value 1</value>
          <value>value 2</value>
          <value>value 3</value>
      </ multipleStringData>

      • ElementType#valueToSAX

      <multipleStringData type="string" multiple="true">value 1</ multipleStringData>
      <multipleStringData type="string" multiple="true">value 2</ multipleStringData>
      <multipleStringData type="string" multiple="true">value 3</ multipleStringData>

      • ElementType#parseConfiguration does not manage multiple at all

      In order to not repeater the type and cardinality for each value, and know if the value is multiple even if there is no value, there is the proposed way to process multple values for all the three methods:

      <multipleStringData type="string" multiple="true">
          <value>value 1</value>
          <value>value 2</value>
          <value>value 3</value>
      </ multipleStringData>

      N.B. The type is used by ModelLessXMLValuesExtractor to know the type of a data and use the good type implementation and call the #valueFromXML

            cbayle Caroline Bayle
            cbayle Caroline Bayle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: