cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Kaushik" <smartkaus...@yahoo.co.uk>
Subject Re: XSL formatting
Date Wed, 13 Dec 2000 07:36:06 GMT
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 <mcorde61@maine.edu>
To: <cocoon-users@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


Mime
View raw message