Hi, our problem is that cocoon generates the namespace xmlns:[EMAIL PROTECTED]@#="[EMAIL PROTECTED]@#" at the end of a pipeline containing two session transformations, two cinclude transformations and two xslt transformations. As a result the last xslt transformation does not work properly.
Inside the pipeline we do the following: Use the session transformer to get the names of two files that were passed to cocoon by a multipart form and include the content of those files into our document with cinclude. The files now have to be sent as parameters to two different servlets, together with other parameters of the original multipart form. So we use an xslt to generate a cinclude:includexml element with two cinclude:src elements. Before we use the cinclude transformer a second time we use the session transformer again to obtain parameters of the original form via the “parametervalues” path of the request. We do this because it returns the parameters formatted as cinclude parameters and also because we know no other way of accessing equally named parameters (the original form contains several input fields that have the same names). Up to this Point everything works fine and after the second cinclude transformation we have the data from our two servlets in one xml document. Now we would have to merge the two sets of data using a last xslt and that´s were everything goes really, really wrong because the xslt transformation simply does not work in a proper way anymore. We can´t access child nodes by name, only relatively using *[1] and the above mentioned namespace shows up making the result document invalid. We are quite sure that the problem does not lie with the xml data generated by our servlets as it also shows up using static data. Does anybody have any suggestions as to what the problem might be? I included the pipeline and the important xml and xslt below. Thanks in advance for any ideas. Peter <map:pipeline> <map:match pattern="form-handler"> <map:generate src="result.xml"/> <map:transform type="session"/> <map:transform type="cinclude"/> <map:transform src="add_include.xslt"/> <map:transform type="session"/> <map:transform type="cinclude"/> <map:transform src="merge.xslt"/> <map:serialize/> </map:match> </map:pipeline> ---------------------------------------------------------------------- result.xml <?xml version="1.0" encoding="iso-8859-1"?> <page xmlns:cinclude="http://apache.org/cocoon/include/1.0" xmlns:session="http://apache.org/cocoon/session/1.0"> <bpel> <cinclude:includexml> <cinclude:src> <session:getxml context="request" path="/parameter/bpelFilename"/> </cinclude:src> </cinclude:includexml> </bpel> <wsdl> <cinclude:includexml> <cinclude:src> <session:getxml context="request" path="/parameter/wsdlFilename"/> </cinclude:src> </cinclude:includexml> </wsdl> </page> ---------------------------------------------------------------------- add_include.xslt <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <result xmlns:session="http://apache.org/cocoon/session/1.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0"> <cinclude:includexml> <cinclude:src>http://foo:6060/MatchmakingEngineServlet/bpel/query</cincl ude:src> <cinclude:configuration> <cinclude:parameter> <cinclude:name>method</cinclude:name> <cinclude:value>POST</cinclude:value> </cinclude:parameter> </cinclude:configuration> <cinclude:parameters> <cinclude:parameter> <cinclude:name>content</cinclude:name> <cinclude:value> <foo> <xsl:apply-templates/> </foo> </cinclude:value> </cinclude:parameter> <cinclude:parameter> <cinclude:name>role</cinclude:name> <cinclude:value> <session:getxml context="request" path="/parameter/role"/> </cinclude:value> </cinclude:parameter> </cinclude:parameters> </cinclude:includexml> <cinclude:includexml> <cinclude:src>http://foo:8080/inquirymanager</cinclude:src> <cinclude:configuration> <cinclude:parameter> <cinclude:name>method</cinclude:name> <cinclude:value>POST</cinclude:value> </cinclude:parameter> </cinclude:configuration> <session:getxml context="request" path="/parametervalues"/> </cinclude:includexml> </result> </xsl:template> <xsl:template match="*"> <xsl:copy-of select="*"/> </xsl:template> </xsl:stylesheet> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]