Joerg Heinicke wrote:
Daniel Fagerstrom <danielf <at> nada.kth.se> writes:
<xyz>
  <jx:strip-whitespace>
  ${abc.name}
  <nested-tag><jx:preserve-whitespace>     ${abc.description}
            </jx:preserve-whitespace></nested-tag>
  </jx:strip-whitespace>
</xyz>

This looks very awful. Not that I need this feature, but ...
And that is the issue, do we want to complicate the template framework with ad hoc constructions that few needs?

After have spending much more effort than I would have liked in re-architecturing JXTG I'm very reluctant in allowing features that complicates the framework. It is built for having elements as instructions not attributes. We could add the possibility to have attributes as instructions as well, but in that it should be a general purpose addition, not a hack for a single attribute instruction.

Might be that it is awful, but that goes for the rest of JXTG as well (or any XML language), it is still not a reason to complicate life for users by mixing attribute and element syntax. Furthermore, I doubt that what you do above is a common use case.

I don't think that the above syntax complicates users' life in comparison to
attribute syntax. Just compare it to namespace declaration in XML:

<element xmlns="myNamespace">
  <element xmlns="yourNamespace">
    <element xmlns="someonesElseNamespace">
      <element/>
    </element>
  </element>
</element>

Now imagine this one with namespace elements ...

If there is a clear separation between concerns (i.e. mapping elements to
instructions and attributes to what Leszek called processing directives (btw,
XML also knows 'processing instructions')) I see no problems using attributes.
I don't see any clear separation of concern in this case. Processing instructions in XML is info about how the whole document should be processed, not something at the element level.

/Daniel