Yes, and I would add that since DFDL is based on annotating XML Schema 
documents with DFDL-specific annotations (dfdl:<name>), we could go further and 
annotate the same XML Schema documents with transformation-specific annotations 
(dfdlx:<name> or another prefix) that could produce even greater data 
transformation capabilities too.  Our own use case for this transformation 
capability would to extend Daffodil's C-generator backend to apply security 
policies (allow, redact, filter, and audit) to specific fields in cross-domain 
data's on-wire format as the data passes between different domains.  I would 
welcome a discussion with others interested in using this approach so we could 
extend Daffodil to more than just that use case.

From: Beckerle, Mike <[email protected]>
Sent: Thursday, June 17, 2021 12:17 PM
To: [email protected]; [email protected]
Subject: EXT: transformation example

DFDL isn't normally thought of as a data transformation language.

Yet it has computed elements, hidden groups, expressions that can refer to 
elements in arrays using the index position within the current array (via the 
dfdl:occursIndex() function).

These result in it having substantial data transformation capabilities.

For a while I have said that I bet one can invert a matrix in DFDL.

So I finally created an example that does so.  It takes a representation of 
data as a pair of lists, and creates a logical infoset that is a list of pairs.

https://github.com/OpenDFDL/examples/tree/master/pairsTransform

The conclusion of this little experiment is that while this is possible for 
parsing, you can't invert the process perfectly in unparsing due to some DFDL 
v1.0 restrictions. I may do experiments in Daffodil to lift those restrictions.

The notion of an entirely schema-based transform language is very interesting 
given that typical XML transformation languages such as XSLT and XQuery are 
both template/instance-document based, not schema based.




Mike Beckerle | Principal Engineer

[cid:[email protected]]

[email protected]<mailto:[email protected]>
P +1-781-330-0412

Reply via email to