<?xml version="1.0" encoding="us-ascii"?>

<!--
q-image-info.html to a pretty page
-->

<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:dcterms="http://purl.org/dc/dcterms/"
  xmlns:x="urn:x-1-0ne-org:3/"
  xmlns:my="urn:x-1-0ne-org:1/"
  xmlns:a="urn:x-1-0ne-org:0/"
  xmlns:h="http://www.w3.org/1999/xhtml"
  xmlns="http://www.w3.org/1999/xhtml"
>
<xsl:output encoding="us-ascii"/>

<xsl:template match="/">
<xsl:result-document href="i0.html">

<html>
<head>
<title>Workin' on it&#x2026;</title>
</head>
<body>
<div>

<xsl:variable name="rows" select="document('q-image-info.html')/table/tr"/>
<xsl:for-each-group select="$rows[position() > 1]" group-by="td[1]">
<xsl:sort select="td[5]"/>

<xsl:variable name="thumb" select="current-group()[(td[3] le 128) and (td[4] le 96)]"/>
<a href="4/{substring-after($thumb/td[1], 'urn:x-1-0ne-org:2/')}.html"><img alt="" width="{$thumb/td[3]}" height="{$thumb/td[4]}" src="{substring-after($thumb/td[2], 'http://www.xyz.net/~one/4/')}"/></a>

<!--
<xsl:element name="img">
<xsl:attribute name="alt"/>
<xsl:attribute name="src">
<xsl:value-of select="substring-after(current-group()[td[3] le 128]/td[2], 'http://www.xyz.net/~one/4/')"/>
</xsl:attribute>
</xsl:element>
[<xsl:value-of select="position()"/>. <xsl:value-of select="td[1]"/>], 
-->
</xsl:for-each-group>

</div>
</body>
</html>

</xsl:result-document>
</xsl:template>


</xsl:stylesheet>