You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Amit Kaushik <sm...@yahoo.co.uk> on 2000/12/12 06:49:50 UTC
XSL formatting
Hi,
In my XSL file i want to open a tag in one <xsl:if> tag and close it in to an another <xsl:if>.How can we do this.If i use <xsl:element> then it automatically close it at the creation place.Cocoon escape < or > character if i use it with the help of <xsl:text disable-output-escaping="yes">.
Here is the code.......
<xsl:if test="position() mod 2 != 0">
<!-- WANT TO ADD OPENING TAG HERE like for open a table row <tr> -->
<td>
<xsl:apply-templates select="headline"/>
</td>
</xsl:if>
<xsl:if test="position() mod 2 = 0">
<td>
<xsl:apply-templates select="headline"/>
</td>
<!-- WANT TO ADD END TAG HERE like for ending of table row </tr>-->
</xsl:if>
Any help regarding this will be appretiated.
Amit Kaushik
RE: cocoon hosting
Posted by Peter Jacobs <pe...@advalvas.be>.
there is a page about hosting on the cocoon website
Peter Jacobs
-----Original Message-----
From: Steve Holden [mailto:steve.holden@town-index.com]
Sent: woensdag 13 december 2000 9:52
To: cocoon-users@xml.apache.org
Subject: Re: cocoon hosting
Hi, does amyone know of a web host that provides Cocoon as a service?
Thanks
Steve Holden
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: cocoon hosting
Posted by Steve Holden <st...@town-index.com>.
Hi, does amyone know of a web host that provides Cocoon as a service?
Thanks
Steve Holden
Re: XSL formatting
Posted by Amit Kaushik <sm...@yahoo.co.uk>.
Hi Matt,
I Have an XML file like this...
<news>
<headline>H_A</headline>
<byline>B_A</byline>
</news>
<news>
<headline>H_B</headline>
<byline>B_B</byline>
</news>
<news>
<headline>H_C</headline>
<byline>B_C</byline>
</news>
<news>
<headline>H_C</headline>
<byline>B_C</byline>
</news>
Now i want to make a table of two rows and two columns with the help of this
XML file.Like this
H-A H_B
H_C H_D
but first row of this table text will be in different font and the next
table row will be in different font.
Hope u understand my problem.
Thanks
Amit Kaushik
----- Original Message -----
From: Matthew Cordes <mc...@maine.edu>
To: <co...@xml.apache.org>
Sent: Tuesday, December 12, 2000 11:51 AM
Subject: Re: XSL formatting
> Hey Amit,
>
> > In my XSL file i want to open a tag in one <xsl:if> tag and close it in
to an another <xsl:if>.How can we do this.If i use <xsl:element> then it
automatically close it at the creation place.Cocoon escape < or > character
if i use it with the help of <xsl:text disable-output-escaping="yes">.
>
> This is not legal xml. You will probably have a very hard time
> doing what you want. Try www.mulberrytech.com in the future for
> non-cocoon things like this.
>
> Feel free to explain to me more precisely what you're trying to
> achieve (off list) and I'd be happy to help.
>
> -matt
>
> On Tue, Dec 12, 2000 at 11:19:50AM +0530, Amit Kaushik wrote:
> > Hi,
> >
> > In my XSL file i want to open a tag in one <xsl:if> tag and close it in
to an another <xsl:if>.How can we do this.If i use <xsl:element> then it
automatically close it at the creation place.Cocoon escape < or > character
if i use it with the help of <xsl:text disable-output-escaping="yes">.
> >
> > Here is the code.......
> >
> > <xsl:if test="position() mod 2 != 0">
> >
> > <!-- WANT TO ADD OPENING TAG HERE like for open a table row <tr> -->
> >
> > <td>
> > <xsl:apply-templates select="headline"/>
> > </td>
> > </xsl:if>
> >
> > <xsl:if test="position() mod 2 = 0">
> > <td>
> > <xsl:apply-templates select="headline"/>
> > </td>
> >
> > <!-- WANT TO ADD END TAG HERE like for ending of table row </tr>-->
> >
> > </xsl:if>
> >
> > Any help regarding this will be appretiated.
> > Amit Kaushik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XSL formatting
Posted by Matthew Cordes <mc...@maine.edu>.
Hey Amit,
> In my XSL file i want to open a tag in one <xsl:if> tag and close it in to an another <xsl:if>.How can we do this.If i use <xsl:element> then it automatically close it at the creation place.Cocoon escape < or > character if i use it with the help of <xsl:text disable-output-escaping="yes">.
This is not legal xml. You will probably have a very hard time
doing what you want. Try www.mulberrytech.com in the future for
non-cocoon things like this.
Feel free to explain to me more precisely what you're trying to
achieve (off list) and I'd be happy to help.
-matt
On Tue, Dec 12, 2000 at 11:19:50AM +0530, Amit Kaushik wrote:
> Hi,
>
> In my XSL file i want to open a tag in one <xsl:if> tag and close it in to an another <xsl:if>.How can we do this.If i use <xsl:element> then it automatically close it at the creation place.Cocoon escape < or > character if i use it with the help of <xsl:text disable-output-escaping="yes">.
>
> Here is the code.......
>
> <xsl:if test="position() mod 2 != 0">
>
> <!-- WANT TO ADD OPENING TAG HERE like for open a table row <tr> -->
>
> <td>
> <xsl:apply-templates select="headline"/>
> </td>
> </xsl:if>
>
> <xsl:if test="position() mod 2 = 0">
> <td>
> <xsl:apply-templates select="headline"/>
> </td>
>
> <!-- WANT TO ADD END TAG HERE like for ending of table row </tr>-->
>
> </xsl:if>
>
> Any help regarding this will be appretiated.
> Amit Kaushik