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

xml:space='preserve' not supported

XMLWordPrintableJSON

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • 1.1.0
    • None
    • None
    • None

      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.

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

                Created:
                Updated:
                Resolved: