We currently have this language in the spec:

"Within an expression, a string is never interpreted as a DFDL string literal."

To me this means one cannot use DFDL character entities in an expression.

However, I need to do this:

         outputValueCalc="{   if (fn:string-length(../s) lt 64) then fn:concat(../s, '%NUL;') else ../s   }"

Basically, I need to append a NUL on the end of the string in the output value case.

Unless I can put a %NUL; into an expression and have it interpreted as a DFDL String literal,  I am not sure how I can achieve this.

At minimum I need a new DFDL function which might be an alternate string constructor, such as dfdl:string('....') which interprets the argument as something where the contents are to be scanned for DFDL character entities and they are substituted so that the resulting string can contain the characters that are disallowed in XML. (like NUL)

--
Mike Beckerle | OGF DFDL WG Co-Chair | Tresys Technologies
Tel:  781-330-0412