Re: [xsl] Converting HTML-like to OpenDocument

Subject: Re: [xsl] Converting HTML-like to OpenDocument
From: Alex Hudson <home@xxxxxxxxxxxxxx>
Date: Wed, 31 May 2006 13:33:08 +0100
Hi Prakash,

On Wed, 2006-05-31 at 17:15 +0530, omprakash.v@xxxxxxxxxxxxx wrote:
> This is an FAQ.
> 
> http://www.dpawson.co.uk/xsl/sect2/N4486.html#d5171e526

Hmm, it _almost_ is...

The issue with the above is that I'm not going from HTML to HTML, but
OpenDocument. So, I can't just use an xsl:copy in the mode="copy"
template. But, I'm not sure how to replace that without repeating all my
templates from earlier...? 

Doing something like:

<xsl:template match="*" mode="copy">
   <!-- <xsl:copy-of select="." /> -->
   <xsl:apply-templates select="." />
   <xsl:if test="not(following-sibling::node()[1]
	  [self::p or self::table or self::ul or self::ol])">
      <xsl:apply-templates select="following-sibling::node()[1]"
mode="copy" />
   </xsl:if>
</xsl:template>

... doesn't seem to work. :/

Cheers,

Alex.

Current Thread