[DFDL-WG] Fw: Proposed Errata: New function dfdl:stringLiteralToString
Tim Kimber
KIMBERT at uk.ibm.com
Wed Jan 9 18:56:46 EST 2013
How about decodeDFDLStringLiteral() and encodeAsDFDLStringLiteral() ?
The term 'string literal' is very overloaded, and a "DFDL string literal"
is a quite different beast from the one that most people will assume.
regards,
Tim Kimber, DFDL Team,
Hursley, UK
Internet: kimbert at uk.ibm.com
Tel. 01962-816742
Internal tel. 37246742
From: Steve Hanson/UK/IBM at IBMGB
To: Suman Kalia <kalia at ca.ibm.com>,
Cc: dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org
Date: 08/01/2013 17:09
Subject: Re: [DFDL-WG] Fw: Proposed Errata: New function
dfdl:stringLiteralToString
Sent by: dfdl-wg-bounces at ogf.org
Let's try and list some alternatives with pros and cons:
Terminology
Pro
Con
escape / unescape
Used in some prog langs
Confusion with DFDL escape schemes
encode / decode
Used for URIs
Confusion with character set encoding
stringToStringLiteral / stringLiteralToString
Uses DFDL terminology
Was not clear to Suman
How about decodeStringLiteral() and encodeAsStringLiteral() ?
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: Suman Kalia <kalia at ca.ibm.com>
To: dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org,
Date: 08/01/2013 15:56
Subject: Re: [DFDL-WG] Fw: Proposed Errata: New function
dfdl:stringLiteralToString
Sent by: dfdl-wg-bounces at ogf.org
Example: dfdl:outputValueCalc='{ fn:concat(../x,
dfdl:stringLiteralToString("%NUL;")) }'
The proposed function stringLiteralToString and stringLiteralFromString
are essentially equivalent to the escape and unescape function in other
programming language.. I would suggest renaming the function to escape
and unescape as they truly capture the semantics of proposed
functionality.
Here are references to other programming languages that use escape and
unescape function
http://php.net/manual/en/sqlite3.escapestring.php
http://www.w3schools.com/jsref/jsref_escape.asp
Suman Kalia
IBM Canada Lab
WMB Toolkit Architect and Development Lead
Tel: 905-413-3923 T/L 313-3923
Email: kalia at ca.ibm.com
For info on Message broker
http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html
From: Steve Hanson/UK/IBM at IBMGB
To: Suman Kalia/Toronto/IBM at IBMCA,
Date: 01/08/2013 10:31 AM
Subject: Fw: [DFDL-WG] Proposed Errata: New function
dfdl:stringLiteralToString
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
----- Forwarded by Steve Hanson/UK/IBM on 08/01/2013 15:31 -----
From: Mike Beckerle <mbeckerle.dfdl at gmail.com>
To: Steve Hanson/UK/IBM at IBMGB,
Cc: dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org
Date: 12/12/2012 18:14
Subject: Re: [DFDL-WG] Proposed Errata: New function
dfdl:stringLiteralToString
My vote is From then To style, as in
dfdl:stringLiteralToString - new function
dfdl:stringToStringLiteral - renamed from dfdl:stringLiteralFromString
On Wed, Dec 12, 2012 at 1:02 PM, Steve Hanson <smh at uk.ibm.com> wrote:
Should name be dfdl:stringFromStringLiteral to mirror existing
dfdl:stringLiteralFromString (or should the latter be
dfdl:stringToStringLiteral - follows the Java toString() pattern) ?
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: Steve Hanson/UK/IBM
To: Mike Beckerle <mbeckerle.dfdl at gmail.com>,
Cc: dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org
Date: 12/12/2012 17:20
Subject: Re: [DFDL-WG] Proposed Errata: New function
dfdl:stringLiteralToString
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
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
--
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
--
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/20130109/82878077/attachment-0001.html>
More information about the dfdl-wg
mailing list