xmlbeans, javascript and the problem with empty tags

View: New views
1 Messages — Rating Filter:   Alert me  

xmlbeans, javascript and the problem with empty tags

by bvd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

Hope you can help me with this one. I tried looking around the web but didn't find solutions to this problem.
I am using xmlbeans to generate web pages. When I make it add an external script, it is added as follows:

<script type="text/javascript" src="js/headerscript.js" />

However, (x)html requires a closing tag to be present, since this is considered a non-empty element. Even

<script type="text/javascript" src="js/headerscript.js" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

won't suffice. How can I force xmlbeans, e.g. via xmloptions to print closing tags from 'empty' elements, so that I get this:

<script type="text/javascript" src="js/headerscript.js"></script>

Thanks in advance for your replies :)

Bart

PS: If you'd ask me it is the (x)html specification that's wrong here btw...