Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1207

xml:space='preserve' not supported

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      If user writes:

      <dfdl:property name="textNumberPadCharacter"> </dfdl:property>

      That's not a legitimate way to create a string containing a space in XML.

      Now, we're not going to do the right thing currently if the user writes:

      <dfdl:property name="textNumberPadCharacter" xml:space="preserve"> </dfdl:property>

      why? we don't even check for the xml:space attribute. All-whitespace nodes are trimmed away explicitly, by Daffodil code.

      At least in theory, things that pretty print and or re-indent XML documents should not mess with all-whitespace nodes if xml:space='preserve' is in a surrounding element.

      The workaround is simple. Use CDATA region.

      The user has to do this:

      <dfdl:property name="textNumberPadCharacter"><![CDATA[ ]]></dfdl:property>

      so as to insist that the content is not fungible XML whitespace.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              efinnegan Elizabeth Finnegan
              Reporter:
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks