[DFDL-WG] Proposed Errata: New function dfdl:stringLiteralToString

Mike Beckerle mbeckerle.dfdl at gmail.com
Wed Dec 12 10:37:19 EST 2012


Proposed Errata:  The following function is provided to assist in creating
data that contains characters expressed using DFDL String Literal syntax.

dfdl:stringLiteralToString($arg)

Returns a string constructed from the $arg string argument. If $arg
contains syntax matching DFDL Character Entites syntax, then the
corresponding characters are used in the result.  Any characters in $arg
not matching the DFDL Character Entities syntax remain unchanged in the
result.

Note that DFDL Byte Value Entities are not allowed. It is a schema
definition error if $arg contains syntax matching DFDL Byte Value Entities
syntax.

Use this function when you need to create a value which contains characters
for which DFDL Character Entities are needed.  An example is to create data
containing the NUL (character code 0) codepoint. This character code is not
allowed in XML documents, including DFDL Schemas; hence, it must be
specified using a DFDL Character Entity. Within a DFDL Expression, use this
function to obtain a string containing this character.

Example: dfdl:outputValueCalc='{ fn:concat(../x,
dfdl:stringLiteralToString("%NUL;")) }'



-- 
Mike Beckerle | OGF DFDL WG Co-Chair | Tresys Technologies
Tel:  781-330-0412
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20121212/ca047d3b/attachment.html>


More information about the dfdl-wg mailing list