RE: [xsl] Importing HTML into my output

Subject: RE: [xsl] Importing HTML into my output
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 17 Jul 2002 10:23:41 +0300
Hi,

> I am using XSLT go generate HTML output. In my XML Document 
> data there is a 
> tag like <file name="foo.html" />
> 
> I want to write a xsl:template which will read the contents 
> of foo.html and 
> put it into the output which is being generated. (here 
> foo.html can also be 
> foo.wml of foo.xhtml)

<xsl:template match="file">
  <xsl:copy-of select="document(@name)" />
</xsl:template>
 
> How can I import the HTML data and then make it a part of the 
> output. The 
> content of the file foo.html should not be checked for 
> wellformed because 
> its html and not guaranteed to be well formed.

No can do with XSLT. You could output a processing instruction, e.g. <?file foo.html?> and then extend the serializer to include the HTML file.

Cheers,

Santtu

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread