Uploaded image for project: 'Commons SCXML'
  1. Commons SCXML
  2. SCXML-276

Simplify and generalize reading and writing SCXML content and data element body values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None

    Description

      The SCXML specification allows for various ways to define and provide content and data element 'values', either embedded as XML element children or as an external resource.

      Such a body value can be parsed as:

      • Java object(s) mapped from (detected) json string
      • XML Node (single child element)
      • XML List<Node> (multiple children)
      • plain text (no child elements)

      For the <invoke><content> element Commons SCXML only supports the (most common) embedding of another SCXML document.
      And as the SCXMLReader uses StaX, not XML DOM for parsing, such an embedded SCXML document (currently) needs to parsed as XML text.
      Therefore a 5th value type will be used:

      • XML text (single XML Node serialized to text)

      When writing a SCXML document back to XML, the parsed values may need to be converted back to text (Json string) or XML Node (XML text) first.

      When writing the json string or plain text, if one or more of the original (read) XML element children was encoded in a CDATA section, the (coalesced) text will be encoded in a (single) CDATA section.

      Attachments

        Activity

          People

            ate Ate Douma
            ate Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: