Correction to bracketing...
dfdl:separator="{fn:concat('--',$some_boundary)}"
Regards
Steve Hanson
Architect, IBM Data Format Description Language (DFDL)
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From:
Tim Kimber/UK/IBM@IBMGB
To:
dfdl-wg@ogf.org,
Date:
24/06/2013 21:38
Subject:
Re: [DFDL-WG]
Can I concatenate a variable?
Sent by:
dfdl-wg-bounces@ogf.org
Hi James,
In section 12.3.5 of the specification, the 'lengthPattern' property is
listed as having the type 'DFDL Regular expression'. Unlike some other
properties, dfdl:lengthPattern cannot be a DFDL expression. Therefore it
cannot contain a DFDL variable reference.
On the other hand, section 14.2 lists the data type of dfdl:separator as
'List of DFDL String Literals or DFDL
Expression', However, your dfdl:separator
is not a valid DFDL expression. The property must be either a valid DFDL
expression or a list of DFDL string literals. The syntax you need is
<xsd:sequence
dfdl:separator="{fn:concat('--'),$some_boundary}"
dfdl:separatorSuppressionPolicy="anyEmpty"
dfdl:terminator="--%CR;%LF;">
regards,
Tim Kimber, DFDL Team,
Hursley, UK
Internet: kimbert@uk.ibm.com
Tel. 01962-816742
Internal tel. 37246742
From: "Garriss
Jr., James P." <jgarriss@mitre.org>
To: "dfdl-wg@ogf.org"
<dfdl-wg@ogf.org>,
Date: 24/06/2013
20:38
Subject: [DFDL-WG]
Can I concatenate a variable?
Sent by: dfdl-wg-bounces@ogf.org
Suppose I define a variable like this:
<dfdl:defineVariable
name="boundary"
defaultValue="some_boundary"
type="xsd:string"/>
Can I later concatenate it with other values?
For example, can I concatenate it as part of a pattern?
<xsd:element
name="Preamble"
type="xsd:string"
dfdl:lengthKind="pattern"
dfdl:lengthPattern="(.+?)(?=--{$some_boundary})"/>
Can I concatenate it as part of a separator?
<xsd:sequence
dfdl:separator="--{$some_boundary}"
dfdl:separatorSuppressionPolicy="anyEmpty"
dfdl:terminator="--%CR;%LF;">
TIA!--
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--
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