Re: [xsl] Closing element required instead of self closing

Subject: Re: [xsl] Closing element required instead of self closing
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 15 Jul 2008 09:30:22 +0100
> I need closing element when I match a specific element, Instead of getting
> self closing.

In that case you can not be generating XML (as the XML specification
requires all XML applications not to distinguish these forms)

> Note:	I used xsl:output method="xml". This should not be changed to html
> for my requirement.

so the simplest thing is not to use the xml output method.

If for some strange reason you do need the form with two tages then if
white space is allowed, you can use 
<foo><xsl:text> </xsl:text></foo> which will produce <foo> </foo> 
but if you really need <foo></foo> then you will need a non standartd
serialisation option, or post process with a non-xml tool such as perl,
as this is a non-xml requirement.


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread