Re: [xsl] Empty Tags not closed properly

Subject: Re: [xsl] Empty Tags not closed properly
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 05 Dec 2010 10:46:54 +0000
On 05/12/2010 10:39, Andreas Knote wrote:

You don't give enough iinformation to recreate your output, and you don't show the output you got, so I'm having to guess.

But my guess is that saxon did close the output immediately but you were using the xml output method so it used xml syntax <ul/> for the empty element.

That would be OK if you served the file with an xml mime type but unfortunately people serve such documents with an html mime type and browsers, when parsing <ul/> treat it exactly the same as <ul> they ignore the slash and then the element will br forced closed later in the document at the wrong time.

So either serve the result as html or use the html or xhtml output types, in which case saxon will serialise as <ul></ul>

Or my guess is wrong in which case you'll need to re-ask with more information.

David

Current Thread