Created
August 15, 2012 18:44
-
-
Save andrewminton/3362322 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<data> | |
<griffith-portfolio> | |
<entry><title>test</title><description>kufgkehfkeuhgf</description></entry> | |
<entry>test2</entry> | |
<entry>wrgre</entry> | |
<entry>eerererre</entry> | |
<entry>fdbfdfnt</entry> | |
<entry>ewee greg</entry> | |
<entry>ewgreg eg</entry> | |
<entry>ewggg rgg</entry> | |
<entry>eeeg fbtrhr</entry> | |
<entry>scsqe2wqw</entry> | |
<entry>ssfs</entry> | |
<entry>efgweeg</entry> | |
<entry>feqfgeqwgew</entry> | |
<entry>fafeqgegeg</entry> | |
<entry>adgwgweg</entry> | |
<entry>agfqegwebds</entry> | |
<entry>adveewbewb</entry> | |
</griffith-portfolio> | |
</data> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output omit-xml-declaration="yes" indent="yes"/> | |
<xsl:template match="data"> | |
<html> | |
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
</head> | |
<body> | |
<xsl:apply-templates select="griffith-portfolio"/> | |
</body> | |
</html> | |
</xsl:template> | |
<xsl:template match="griffith-portfolio/entry[position() mod 12 = 1]"> | |
<ul><xsl:attribute name="class">poop</xsl:attribute> | |
<xsl:apply-templates mode="inGrpoup" select= | |
".|following-sibling::*[not(position() > 11)]"/> | |
</ul> | |
</xsl:template> | |
<xsl:template match="entry" mode="inGrpoup"> | |
<li class="thumbimg"> | |
<a href="#" title="."><img src="" alt="{.} thumbnail image"/> | |
</a><span class="text"><xsl:value-of select="."/></span></li> | |
</xsl:template> | |
<xsl:template match="text()"/> | |
<!-- grouping by UL every 12 --> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment