Jason Johnston skrev:
Daniel Fagerstrom wrote:
...
There are lots of comments from users (mainly using jx-macros for cforms) that whitespace is problematic. So I think it's worthwhile.

Maybe the whitespace handling for macros need an overlook then, what exactly is the whitespace problem with jx-macros?

http://issues.apache.org/jira/browse/COCOON-1381

I'm aware of that bug, I was asking for more details, which maybe wasn't that clear. Where does the unwanted whitespace show up, and why is that happen?

Anyway, IIRC, the jx:import basically includes the whole document with macro definitions, whitespace between macros, and XML elements, that are between the macro definitions. While such a construction certainly can be useful, it is not the most natural for importing macros, and it would have been better to name it jx:include.

What we need IMO, is a "jx:importMacros" instruction that just imports the macros in a macro definition file, without doing any document inclusion. That would solve the macro problem in a clean way.

Now, we still might want a skip whitespace instruction. But we shouldn't introduce it as a workaround for fixing problems macros, better fix the macros directly.

/Daniel