I have some questions and possible concerns re the sample
xml file Mike posted.
The attached document ‘SmartlengthStringComments1
discusses them.
I attached the other doc that I found from 2003 written by
Martin Westhead.
The current sample and an XSLT sample in the old doc bear an
uncanny resemblance and thought it might be worthwhile to look at the two
side-by-side since they are for the exact same use case.
It raises the question of whether DFDL syntax could allow
actual XSLT snippets to be included in the annotation section to use the power
of XSLT to do these things. XSLT also supports extensions that could handle
complex or unusual corner cases.
A parser should be able to (but I haven’t confirmed
it) create a mini XSL stylesheet from the snippet and use a transform to
generate the result value that is needed. If so this would allow an existing
standard language to be used.
See my item #5 in my doc since there I ask the question of
how I might contribute without being disruptive. It is not my intention to
disrupt your efforts but the resemblance between these two approaches is so
similar I had to bring it to your attention.
Rick