|
Hi, i wanted to use the xpath directory generator. My pipeline is the following: <map:pipeline> <map:match pattern="dir-test"> <map:generate type="xpathdirectory" src=""> <map:parameter name="xmlFiles" value="\.xml$"/> </map:generate> <map:transform src=""/> <map:serialize type="xml"/> </map:match> </map:pipeline> After the genrator i receive the following data, which is exactly what i expected: <dir:directory name="data" lastModified="1134380175000" date="12/12/05 10:36 AM" size="4096" sort="name" reverse="false" requested="true"> <dir:directory name="CVS" lastModified="1134380175000" date="12/12/05 10:36 AM" size="4096"/> <dir:file name="data.xsd" lastModified="1131651460000" date="11/10/05 8:37 PM" size="39967"/> <dir:file name="data.xml" lastModified="1131651460000" date="11/10/05 8:37 PM" size="45002"/> </dir:directory> Then i want to transform it with the following stylesheet: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sql="http://apache.org/cocoon/SQL/2.0" xmlns:dir="http://apache.org/cocoon/directory/2.0."> <xsl:template match="/"> <content> <heading>text</heading> <xsl:variable name="count" select="count(dir:directory/dir:file)"/> <message> <line> <xsl:value-of select="$count"/> </line> </message> <table> <tableheader> <tablecell>Name</tablecell> <tablecell>Version</tablecell> </tableheader> <xsl:for-each select="dir:directory/dir:file"> <tablerow> <tablecell> <xsl:value-of select="@name"/> </tablecell> <tablecell> <xsl:value-of select="@date"/> </tablecell> </tablerow> </xsl:for-each> </table> </content> </xsl:template> </xsl:stylesheet> I thought i did everything as it should be, but i always get just the following result: <content> <heading>text</heading> <message> <line> 0 </line> </message> <table> <tableheader> <tablecell>Name</tablecell> <tablecell>Version</tablecell> </tableheader> </table> </content> Does anyone know recognize my fault? Thanks, Tino |
- Using the directory generator [EMAIL PROTECTED]
- Re: Using the directory generator Joerg Heinicke
- RE: Using the directory generator Ard Schrijvers
- RE: Using the directory generator Ard Schrijvers
