[DFDL-WG] newbie question
Tim Kimber
KIMBERT at uk.ibm.com
Fri Mar 28 07:34:12 EDT 2014
The key point here is that the data format is delimited, and there is a
requirement to validate the parsed info set against some rules ( length
constraints, in this case).
I would
- set terminator="/"
- set lengthKind='delimited'
- use xs:minLength and xs:maxLength facets to check the length ( or use a
pattern facet if you must, but min/maxLength facets will use less CPU )
- switch on validation in the DFDL parser so that the length of the
delimited value gets checked against the facets in the schema.
Other possibilities exist ( e.g. DFDL assert to check the length ) but
this is the most efficient.
regards,
Tim Kimber,
IBM Integration Bus Development (Industry Packs)
Hursley, UK
Internet: kimbert at uk.ibm.com
Tel. 01962-816742
Internal tel. 37246742
From: "mfcplus at yahoo.com" <mfcplus at yahoo.com>
To: Tim Kimber/UK/IBM at IBMGB,
Date: 28/03/2014 11:25
Subject: Re: [DFDL-WG] newbie question
a field that is 3-5 chars long alphanumeric, basically a \w{3,5}, it
should give out parsing error if it doesnt fit by the pattern, no
initiator terminator is /
Sent from Yahoo Mail on Android
From: Tim Kimber <KIMBERT at uk.ibm.com>;
To: <dfdl-wg at ogf.org>;
Subject: Re: [DFDL-WG] newbie question
Sent: Fri, Mar 28, 2014 10:19:47 AM
It depends on the data format. Normally a variable length field is
terminated by a delimiter, so a data pattern/regex is not required.
Can you describe the format in a little more detail?
regards,
Tim Kimber,
IBM Integration Bus Development (Industry Packs)
Hursley, UK
Internet: kimbert at uk.ibm.com
Tel. 01962-816742
Internal tel. 37246742
From: Bing Lu <mfcplus at yahoo.com>
To: "dfdl-wg at ogf.org" <dfdl-wg at ogf.org>,
Date: 28/03/2014 03:35
Subject: [DFDL-WG] newbie question
Sent by: dfdl-wg-bounces at ogf.org
what's the best dfdl approache to describe a variable length alpha
numeric field? should i use simpletype restriction pattern, or use
dfdl:assert testPattern? thanks in advance--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20140328/790ff9f1/attachment.html>
More information about the dfdl-wg
mailing list