OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] convert XML to HTML

You can use XSLT 2.0 for this requirement.

Following is an XSLT stylesheet processing a directory, containing XML
files (of pattern test*.xml).

The stylesheet uses the XPath 2.0 'collection' function, and the XSLT
2.0 'result-document' instruction.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0">

 <xsl:output method="html" />

 <xsl:variable name="docs"

 <xsl:template match="/">
   <xsl:for-each select="$docs">
     <xsl:result-document href="{position()}.html">
             <!-- populate HTML -->


This is tested with Saxon

On 10/21/07, Carlos Narv√°ez <crakup@gmail.com> wrote:
> I need to convert a receiving XML into HTML, and save it as html.
> This has to be done as the application where it later shall be used
> does not support xml format (only html, tiff and pdf).
> So with the xsl I need to run through a directory, and convert all xml
> into html.
> Is there a freeware out there that handles this?
> Or does anyone have a good tip?
> --
> Carlos Narv√°ez
> http://www.fondosdepantalla.com.mx

Mukul Gandhi

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS