You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Beckerle, Mike" <mb...@owlcyberdefense.com> on 2021/06/17 16:16:44 UTC
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:eb186e2a-a515-4148-a5af-3d5f693737bd]
mbeckerle@owlcyberdefense.com<ma...@owlcyberdefense.com>
P +1-781-330-0412
RE: transformation example
Posted by "Interrante, John A (GE Research, US)" <Jo...@ge.com>.
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 <mb...@owlcyberdefense.com>
Sent: Thursday, June 17, 2021 12:17 PM
To: users@daffodil.apache.org; dev@daffodil.apache.org
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:image001.png@01D76375.F2FE6240]
mbeckerle@owlcyberdefense.com<ma...@owlcyberdefense.com>
P +1-781-330-0412