Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 58545 invoked from network); 12 Dec 2005 16:42:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Dec 2005 16:42:43 -0000 Received: (qmail 78042 invoked by uid 500); 12 Dec 2005 16:41:56 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 77954 invoked by uid 500); 12 Dec 2005 16:41:55 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Delivered-To: moderator for users@cocoon.apache.org Received: (qmail 51947 invoked by uid 99); 12 Dec 2005 16:22:44 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Message-ID: <439DA3B2.9000808@inf.tu-dresden.de> Date: Mon, 12 Dec 2005 17:22:10 +0100 From: "s9600916@inf.tu-dresden.de" User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051125) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Using the directory generator Content-Type: multipart/alternative; boundary="------------030806000600090304060800" X-Virus-Scanned: by amavisd_new at inf.tu-dresden.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------030806000600090304060800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, i wanted to use the xpath directory generator. My pipeline is the following: After the genrator i receive the following data, which is exactly what i expected: Then i want to transform it with the following stylesheet: text Name Version
I thought i did everything as it should be, but i always get just the following result: text 0 Name Version
Does anyone know recognize my fault? Thanks, Tino --------------030806000600090304060800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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="../resources/data">
                    <map:parameter name="xmlFiles" value="\.xml$"/>
                </map:generate>
                <map:transform src="styles/directory2content.xsl"/>
                <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
--------------030806000600090304060800--