Re: [xsl] Specification of a transform.

Subject: Re: [xsl] Specification of a transform.
From: Geert Bormans <geert@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Sep 2013 14:01:21 +0200
Hi Dave,

The way I interpreted your question is not "how to do the transform" but "how to specify",
and regardless of the complexity, answer that question in general.
If that really is what the question was asking...
I would definitely be interested to see the answers

I have not yet figured out a good standardized way myself.
I have often come to a conclusion that writing the spec was as hard as just doing the transform,
so "spec it out using XSLT" should not be regarded as funny as it sounds at first

There are so many factors to take into account: complexity of the models, complexity of the project as a whole, size of the project as a whole,
who is doing the analysis (technical or less technical), is the specification part of a series of workshops, or just a loner writing out the spec,
who needs to validate the spec, will the spec serve the testing environment, ....

In general there are three mapping approaches I use, the method at hand chosen based on the parameters set in the previous paragraph
- Word document, lots of text, structure of the word document usually following the structure of the source XML. Very ad hoc. Not my favorite. Used most for communication with non technical Subject Matter Experts or management.
- Excel document: lots of columns if context needs to be expressed more or less visually (subject matter experts or management). Less columns if context can be expressed using XPath expressions (technical audience). Used in most of my projects, still very ad hoc. The more complex the mapping (small structural alikeness) the more descriptive this would become
- Unit tests driven (mapping by example?): my favorite. Mappings expressed using small snippets of document as examples. Not every project has the resources or time to do that. But it is obvious that there is a wider use in testing for the specification.

Whether there is one step or multiple steps is in my opinion not part of the specification, it is part of the development process

I hope this makes sense,


At 09:42 9/09/2013, you wrote:
Given schema A as input XML. Schema B as XML output.
Assume no hierarchical simple relationship.
Assume mapping of values needed from input values to output values.
Assume literals are needed.
How do (might) you specify the required transform?
How do (might) you validate that instance A has been correctly transformed to instance B, assuming input and output are both valid to the schemas.

Not something I've seen mentioned on this list?


Dave Pawson

Current Thread