Developing Message Flows with Mapping, DFDL, and XSLT
Developing message flows with mapping, DFDL, and XSLT
This domain tests three transformation styles: the Graphical Data Mapping node and message maps, DFDL schemas for non-XML formats, and XSLT via the XSLTransform node. The exam expects you to select the right transform and understand where schema and namespace information enters the flow.
Core rules
- A message map (
.map) is schema-aware and supports nested maps, if/else logic, database lookups, and custom XPath or Java. Use it when the transformation is largely declarative and the input/output schemas are known. - DFDL describes both the logical model and the physical format in an XSD with
dfdl:annotations. Setdfdl:format, encoding,lengthKind, separators, terminators, andoccurscorrectly; the DFDL parser then converts text or binary to a logical tree. - XSLT is namespace-aware. Declare prefixes and match the source namespace exactly; a default namespace in the input XML still requires a prefix in XPath unless you use
local-name(). - Put reusable maps, DFDL schemas, and stylesheets in libraries so multiple flows and BARs can use them.
Worked example
A comma-separated order file must become XML. Model a DFDL sequence with dfdl:separator=",", a line terminator, and an occurs count for detail lines. Parse with a FileInput node using the DFDL parser, then map the logical DFDL tree to the target XML schema. If the target has a default namespace, declare that namespace in the map or XSLT and reference elements through the prefix. Validate the mapped output before sending it.
Traps
DFDL physical properties do not enforce business rules. A map with mismatched cardinality silently drops or duplicates repeating elements. XSLT that ignores namespaces returns empty results. Do not confuse the DFDL logical tree with the raw text payload.