Hi,
I am trying to add a parameter to a LDAP request, by transforming it with a
XSLT stylesheet just before.
However, even if my XSLT stylesheet just copy the request without changing
it, there is an error in the LDAP transformer :
"Could not read resource file:/C:/Program Files/Apache Tomcat
4.0/webapps/cocoon-dev/ldap/requete_ldap.xml"
The XML after transformation looks great (if I suppress the LDAP transform).
My sitemap contains the rules :
---------
<map:match pattern="ldap-*.html">
<map:generate src="ldap/requete_ldap.xml"/>
<map:transform src="transforms/param-ldap.xsl">
<map:parameter name="name" value="{1}"/>
</map:transform>
<map:transform type="ldap"/>
<map:transform src="transforms/simple-xml2html.xsl"/>
<map:serialize type="html"/>
</map:match>
------------
and the "transforms/param-ldap.xsl" is :
----------
<xsl:stylesheet version = "1.0" xmlns:xsl =
"http://www.w3.org/1999/xsl/transform">
<xsl:param name="name" select="'paul'"/>
<xsl:template match="*|@*|processing-instruction()|comment()">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="my_name">
<xsl:value-of select="$name"/>
</xsl:template>
</xsl:stylesheet>
------------
To be complete, the ldap-requete.xml is :
--------------
<?xml version="1.0" encoding="utf-8"?>
<page xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">
<ldap:execute-query>
<ldap:attribute>mail</ldap:attribute>
<ldap:attribute>displayName</ldap:attribute>
<ldap:serverurl>ldap://4d-leader</ldap:serverurl>
<ldap:searchbase>o=4Dconcept,c=FR</ldap:searchbase>
<ldap:filter>cn=*<my_name/>*</ldap:filter>
</ldap:execute-query>
</page>
-------------
--
Paul TERRAY - Ing�nieur Syst�mes Documentaires
4Dconcept
Centre d'affaires - 22, rue Etienne de Jouy
78353 Jouy en Josas CEDEX
Tel. 01 34 58 70 70 - Fax. 01 39 46 06 90
email : [EMAIL PROTECTED]
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>