Subject: Re: [xsl] formatting xml output: inserting newlines between generated attributes|
From: "Abie Hamaoui" <ahama5@xxxxxxxxxxx>
Date: Tue, 09 Sep 2003 19:34:33 +0000
If you kept it in its own box, completely separate from other transformation logic, it would be fine. The nightmare would be if you tried to combine this with ordinary transformation logic, which typically would perform a mapping of source elements to result elements, do grouping, conditional generated text, etc. Both things happening in a single stylesheet would be a lot to try to keep under control and a pain to maintain. Also, writing output to text locks you into a particular processing model (can't chain the transform as easily, can't use it in display engines that don't support the 'text' output method, and so forth).
Writing a transform to do such reformatting on arbitrary input, and having it be the final step of a two- (or multi-) step process, is more thinkable. Three or four templates would do everything you would need. Is there any reason you can't do it that way? (Or maybe you're saying that's what you want to do.)