Yes, I've thought about doing this before and it is fairly easy to
implement with only minor added cost (checking a flag to see if the
start tag has been closed yet). I really try to avoid even such minor
added costs, but I think I'll go ahead and implement the change in 1.1.
Dan, the JiBX code as currently structured writes an empty tag if the
binding defines only attribute values as present on the element. If you
have child elements it will always use a start tag/close tag pair
instead. That's why a change is needed to the writer in order to defer
closing the start tag until some content is written, so that an empty
tag can be used instead.
- Dennis
Orjan Austvold wrote:
Hi Dan,
On 02/27 I posted a solution in this forum which works fine for me.
Ørjan
Dan Cooperstock wrote:
Is there a way to control whether or not XML elements that have no
content (only attributes) are self-closing, as in:
<element attributes/>
or have a separate closing tag, as in:
<element attributes></element>
JiBX seems to generally prefer the latter, whereas the former makes more
sense to me.
By the way, my situation is that these are elements that can have
content, but in this case don't happen to.
Thanks.
-------------------------------------------------------------------
Dan Cooperstock, Senior Software Developer, Quest Software
260 King St. E., Toronto ON Canada M5A 4L5
[EMAIL PROTECTED] 416-933-5165
With Quest Software, you can expect more ... more performance, more
productivity, more value from your IT investments.
Visit www.quest.com to learn how.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users