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@uk.ibm.com
Tel. 01962-816742  
Internal tel. 37246742




From:        "mfcplus@yahoo.com" <mfcplus@yahoo.com>
To:        Tim Kimber/UK/IBM@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@uk.ibm.com>;
To:
<dfdl-wg@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@uk.ibm.com
Tel. 01962-816742  
Internal tel. 37246742





From:        
Bing Lu <mfcplus@yahoo.com>
To:        
"dfdl-wg@ogf.org" <dfdl-wg@ogf.org>,
Date:        
28/03/2014 03:35
Subject:        
[DFDL-WG] newbie question
Sent by:        
dfdl-wg-bounces@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@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