<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:gl="http://ananas.org/2003/tips/gallery"
xmlns:html="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="html">
<xsl:output method="xml" indent="yes" encoding="MacRoman"/>
<xsl:template match="html:html">
<xsl:variable name="date"
select="html:body/html:table/html:tr/html:td[2]
/html:font/html:br[3]
/preceding-sibling::text()[1]"/>
<gl:gallery>
<gl:title>
<xsl:value-of select="html:head/html:title"/>
</gl:title>
<xsl:for-each select="html:body/html:center/html:table
/html:tr/html:td">
<xsl:variable name="title"
select="html:font/html:br[3]
/preceding-sibling::text()[1]"/>
<xsl:variable name="image"
select="html:font/html:br[1]
/preceding-sibling::text()[1]"/>
<xsl:variable name="description"
select="html:font/html:br[2]
/preceding-sibling::text()[1]"/>
<gl:photo>
<gl:title><xsl:value-of
select="normalize-space($title)"/></gl:title>
<gl:date><xsl:value-of
select="normalize-space($date)"/></gl:date>
<gl:image><xsl:value-of
select="normalize-space($image)"/></gl:image>
<gl:description><xsl:value-of
select="normalize-space($description)"/></gl:description>
</gl:photo>
</xsl:for-each>
</gl:gallery>
</xsl:template>
</xsl:stylesheet>
|