You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Stephane Mouchel Vichard (Japan)" <sm...@ludiwap.co.jp> on 2000/09/07 01:54:18 UTC

How to avoid end-tags ?

Hello everybody,

I meet a problem with my xsl file each time I want to have an output without
"/".
To be clearer, here an example:
I would like to have an output like that:
.....
<BR>
......


1) WORKS PERFECTLY but the result is <BR/> :
<xsl:template match="newline">
<BR></BR>
</xsl:template>


2) ERROR MESSAGE:  "BR" must be terminated by the mathing end-tag "</BR>" :
<xsl:template match="newline">
<BR>
</xsl:template>

Anybody has an idea ?
Thanks,

Stephane


Re: How to avoid end-tags ?

Posted by Peter Donald <do...@mad.scientist.com>.
At 08:54  7/9/00 +0900, you wrote:
>Hello everybody,
>
>I meet a problem with my xsl file each time I want to have an output without
>"/".
>To be clearer, here an example:
>I would like to have an output like that:
>.....
><BR>
>......
>
>
>1) WORKS PERFECTLY but the result is <BR/> :
><xsl:template match="newline">
><BR></BR>
></xsl:template>
>
>
>2) ERROR MESSAGE:  "BR" must be terminated by the mathing end-tag "</BR>" :
><xsl:template match="newline">
><BR>
></xsl:template>
>
>Anybody has an idea ?

Which cocoon are you using ? 

You can use something like 
<xsl:template match="newline">
<BR/>
</xsl:template>

if you want to use XHTML otherwise in C1 you will have to do something like;

* add <?cocoon-format type="test/html"?> to top of file
* add into cocoon.properties the following
formatter.type.text/html        = org.apache.cocoon.formatter.HTMLFormatter

However this should be done by default.

If you are using C2 I assume there is an equivelent (possibly called
serializers or formatters in sitemap ???)




Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*