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

Re: XHTML -> HTML problem

Subject: Re: XHTML -> HTML problem
From: Niclas Hedhman <niclas@xxxxxxxxxxx>
Date: Thu, 27 May 2004 01:47:30 +0800
xslt merge text
On Wednesday 26 May 2004 23:55, Angeshwar Deepak wrote:

> how can this be done, sounds too complex.

1. First you have to ensure your HTML is well-formed, i.e. no single <p>, 
<br>, <hr>, <li> and other tags that often been used in HTML.

2. You don't mention where xyz.xml comes from, I assume it is a 
parameter/varaible, and that you can manage to establish this by yourself.

3. I would assume that you can always match against the <h2><font> combo, and 
you would then end up with an xsl something like;

<xsl:template match="/" >
  <xsl:apply-templates />
</xsl:template>

<xsl:template match="h2/font" >
  <a>
    <xsl:attribtue name="href"><xsl:value select="$xyz" /></xsl:attribute>
    <xsl:apply-templates />
  </a>
</xsl:template>

<xsl:template match="*" >
  <xsl:copy>
    <xsl:copy-of select="@*" />
    <xsl:apply-templates />
  </xsl:copy>
</xsl:template>


Someone will probably say I am way off the mark, but I think this would work.

Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.