Skip to content

When there are two alternative regex patterns, allowed attribute values are displayed incorrectly in HTML attributes table #67

@ghost

Description

Given my example RNG, there is a conversion issue where attributes table only displays one of two alternative patterns. However, the SVG diagram correctly shows both patterns (although it displays both with the label "token", so while correct, that's not too helpful either in the end).

  <define name="pattern1">
    <data type="token">
      <param name="pattern">A_PATTERN</param>
    </data>
  </define>
  <define name="pattern2">
    <data type="token">
      <param name="pattern">ANOTHER_PATTERN</param>
    </data>
  </define>

[....]


  <define name="ds.myelement">
    <element name="myelement">
      <attribute name="myattribute">
        <choice>
          <ref name="pattern2"/>
          <ref name="pattern1"/>
        </choice>
      </attribute>
      <empty/>
    </element>
  </define>

The attribute table for myelement's myattribute then claims that only pattern2 (the one mentioned first within <choice/>) is present:

Data typetoken
ParametersANOTHER_PATTERN

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions