Hello,
I have something like:
xdocs/books/moderntrends/
/book1/
- pdf file
- pdf file
/book2/
- pdf file
- pdf file
etc
what I want:
show the pdf files when I go to http://blablabla../books/moderntrends/book1
and link to those files
my sitemap:
<map:pipeline>
<map:match pattern="books/moderntrends/**" type="wildcard">
<map:generate type="directory"
src="{project:content.xdocs}/books/moderntrends/{1}/">
<map:parameter name="depth" value="8"/>
<map:parameter name="sort" value="directory"/>
<map:parameter name="include" value="^({1})"/>
</map:generate>
<map:transform type="xslt" src="{project:resources.stylesheets}dir2.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
my stylesheet:
<xsl:template match="dir:directory|dir:file">
<li>
<xsl:value-of select="@name"/>
<xsl:if test="name(.)='dir:directory'">
<!-- creating subdirectories -->
<ul><xsl:apply-templates/></ul>
</xsl:if>
<xsl:for-each select="@name">
<a href="{generate-id(.)}">
<xsl:value-of select="."/>
</a>
</xsl:for-each>
</li>
</xsl:template>
<xsl:template match="/dir:directory">
<ul>
<xsl:value-of select="@name"/>
<!-- creating subdirectories -->
<xsl:apply-templates/>
</ul>
</xsl:template>
this works for http://blablabla../books/moderntrends/
not for http://blablabla../books/moderntrends/book1
also I get something like:
<li>
487-Infection_of_Mouse.pdf
<a href="N10D95">487-Infection_of_Mouse.pdf</a>
</li>
?
<li>
491-Cocultivation_as_a.pdf
<a href="N10D9A">491-Cocultivation_as_a.pdf</a>
</li>
the href shows something wrong.
any ideas?
thanks
erik stunkat