|
Subject: Re: [xsl] XHTML -> HTML problem From: Niclas Hedhman <niclas@xxxxxxxxxxx> Date: Thu, 27 May 2004 01:47:30 +0800 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] XHTML -> HTML problem, Angeshwar Deepak | Thread | [xsl] xml/xslt 'merge' query, Laurie Knight |
| RE: [xsl] This could be simple, but, Andreas L. Delmelle | Date | RE: [xsl] xml/xslt 'merge' query, Andreas L. Delmelle |
| Month |