[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How Handle Html Heading Tag using XSL

Subject: Re: How Handle Html Heading Tag using XSL
From: "Byomkesh" <bkesh@xxxxxxxxxxxxxxx>
Date: Tue, 27 Jun 2006 18:08:24 +0530
table tag in xslt
Thank you Mukul for the help!

I have one problem. How handle the html h1, h2, h3 etc., coding. I would
like to close </h1> tag before start in another <h1> tag.

Example...

Input file
---------

<h1>Heading 1</h1>
<p>Some text here</p>
<h2>Heading 2</h2>
<p>Some text here</p>
<h3>Heading 3</h3>
<p>Some text here</p>
<h1>Heading 1</h1>
<p>Some text here</p>

I want.....
--------

<section1>
<title>Heading 1</title>
<p>Some text here</p>
<section2><title>Heading 2</title>
<p>Some text here</p>
<section3><title>Heading 3</title>
<p>Some text here</p>
</section3></section2></section1>
<section1><title>Heading 1</title>
<p>Some text here</p>
.....
.....
.....

Thanks

Byomkesh




----- Original Message -----
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
To: "Byomkesh" <bkesh@xxxxxxxxxxxxxxx>
Cc: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, June 27, 2006 5:15 PM
Subject: Re:  How count the Table cell (Cals Table) using XSL


> Hi Byomkesh,
>   There are some problems in your code. Following corrections are
required:
>
> <xsl:variable name="rtf">
>     <xsl:call-template name="FindMaxStringLength">
>         <xsl:with-param name="n" select="count(//tr[3]/td)" />
>     </xsl:call-template>
> </xsl:variable>
> (in <xsl:template match="table"> )
>
> and, (please note //. You wrote /)
>
> <xsl:for-each select="//tr[2]/th[$n] | //tr/td[$n]">
>    <xsl:sort select="string-length(.)" order="descending" />
>    <xsl:if test="position() = 1">
>      <xsl:value-of select="string-length(.)" />
>    </xsl:if >
> </xsl:for-each>
>
> With these changes, I get following in the output:
>
> <colgroup>
>    <col width="21.74%"/>
>    <col width="36.96%"/>
>    <col width="41.3%"/>
> </colgroup>
>
> Regards,
> Mukul

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.