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

Steve Hanson smh at uk.ibm.com
Wed Dec 12 12:25:16 EST 2012


Mike, should we disallow DFDL Character Class entities also ?

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848



From:   Mike Beckerle <mbeckerle.dfdl at gmail.com>
To:     dfdl-wg at ogf.org, 
Date:   12/12/2012 15:40
Subject:        [DFDL-WG] Proposed Errata: New function 
dfdl:stringLiteralToString
Sent by:        dfdl-wg-bounces at ogf.org




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

--
  dfdl-wg mailing list
  dfdl-wg at ogf.org
  https://www.ogf.org/mailman/listinfo/dfdl-wg

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20121212/eb12008f/attachment.html>


More information about the dfdl-wg mailing list