[DFDL-WG] Fw: Scoping : dfdl:defineFormat
Steve Hanson
smh at uk.ibm.com
Wed Nov 11 04:56:08 CST 2009
For discussion on today's WG call - see agenda.
Regards
Steve Hanson
Programming Model Architect, WebSphere Message Brokers,
OGF DFDL WG Co-Chair,
Hursley, UK,
Internet: smh at uk.ibm.com,
Phone (+44)/(0) 1962-815848
----- Forwarded by Steve Hanson/UK/IBM on 11/11/2009 10:53 -----
From:
Steve Hanson/UK/IBM
To:
Suman Kalia/Toronto/IBM at IBMCA
Cc:
Alan Powell/UK/IBM at IBMGB, Mike Beckerle <mbeckerle.dfdl at gmail.com>
Date:
05/11/2009 11:46
Subject:
Re: Scoping : dfdl:defineFormat
Hi Suman - you have correctly captured the behaviour in both X and Y
cases.
Regards
Steve Hanson
Programming Model Architect, WebSphere Message Brokers,
OGF DFDL WG Co-Chair,
Hursley, UK,
Internet: smh at uk.ibm.com,
Phone (+44)/(0) 1962-815848
From:
Suman Kalia/Toronto/IBM at IBMCA
To:
Alan Powell/UK/IBM at IBMGB, Mike Beckerle <mbeckerle.dfdl at gmail.com>, Steve
Hanson/UK/IBM at IBMGB
Date:
05/11/2009 04:21
Subject:
Scoping : dfdl:defineFormat
Reference discussion this morning, attached is an example that captures
scoping rule for dfdl:format based on my understanding.. Please send your
comments / corrections etc ..
<?xml version="1.0" encoding="UTF-8"?>
<!-- Base defineFormat contains 3 dfdl:format -> one without selector and
2 with selectors -->
<dfdl:defineFormat name="fmtX" xmlns:dfdl="http://www.ogf.org/dfdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ogf.org/dfdl/ DFDL_v1_035.xsd ">
<dfdl:format encoding="ascii"
lengthUnits="characters" />
<dfdl:format selector="selA" encoding="ebcdic"
lengthUnits="bits" />
<dfdl:format selector="selB" encoding="ebcdic-custom"
lengthUnits="bytes" />
</dfdl:defineFormat>
<dfdl:defineFormat name="fmtZX" xmlns:dfdl="http://www.ogf.org/dfdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ogf.org/dfdl/ DFDL_v1_035.xsd ">
<dfdl:format ref="fmtX" lengthUnits="bytes"
/>
<!-- inherits encoding="ascii" -->
<!-- lengthUnit="bytes" explicitly specified -- > overrides
lengthUnit="characters" from referenced format -->
<dfdl:format ref="fmtX" selector="selA" lengthUnits="bytes"
/>
<!-- inherits encoding="ebcdic" from matching selector A in the
referenced format -->
<!-- lengthUnit="bytes" explicitly specified -- > overrides
lengthUnit="bits" from matching selector A in the referenced format -->
<dfdl:format ref="fmtX" selector="selB" lengthUnits="bytes"
/>
<!-- inherits encoding="ebcdic-custom" from matching selector B
in the referenced format -->
<!-- lengthUnit="bytes" explicitly specified -- > overrides
lengthUnit="bytes from matching selector B in the referenced format -->
</dfdl:defineFormat>
<!-- Base defineFormat contains one dfdl:format without selector -->
<dfdl:defineFormat name="fmtY" xmlns:dfdl="http://www.ogf.org/dfdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ogf.org/dfdl/ DFDL_v1_035.xsd ">
<dfdl:format encoding="ascii" lengthUnits="characters" />
</dfdl:defineFormat>
<dfdl:defineFormat name="fmtZY" xmlns:dfdl="http://www.ogf.org/dfdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ogf.org/dfdl/ DFDL_v1_035.xsd ">
<dfdl:format ref="fmtY" lengthUnits="bytes" />
<!-- inherits encoding="ascii" from default format -->
<!-- lengthUnit="bytes" explicitly specified -- > overrides
lengthUnit="characters" from default format -->
<dfdl:format ref="fmtY" selector="selA" lengthUnits="bytes" />
<!-- inherits encoding="ascii" from default format-->
<!-- lengthUnit="bytes" explicitly specified -- > overrides
lengthUnit="characters" from default format -->
<dfdl:format ref="fmtY" selector="selB" lengthUnits="bytes" />
<!-- inherits encoding="ascii" from default format -->
<!-- lengthUnit="bytes" explicitly specified -- > overrides
lengthUnit="characters" from default format -->
</dfdl:defineFormat>
Suman Kalia
IBM Toronto Lab
WMB Toolkit Architect and Development Lead
WebSphere Business Integration Application Connectivity Tools
http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html
Tel : 905-413-3923 T/L 969-3923
Fax : 905-413-4850 T/L 969-4850
Internet ID : kalia at ca.ibm.com
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/20091111/5a514e52/attachment-0001.html
More information about the dfdl-wg
mailing list