Hi people, I posted this question on the users list three days ago, but got no reply, so I thought I'd better bother you :). In the meantime I partially solved the problem but uncovered a possible bug in C2.RC1a (or Xerces or Xalan).
........................................................ I have a problem in C2.0rc1a with one of my logicsheets. This logicsheet uses another builtin taglib, like for instance xsp-request (please have a look at the attached test.xsl file). The problem is that the elements of the xsp-request taglib are NOT expanded by the XSP generator, so they are copied verbatim to the output. The attached test1.xsp file, when processed, produces the output that is contained in the attached test1.xml file. This only happens with the RC1a release, whereas everything works correctly with 2.0b2. The funny thing is that, if you restart the servlet container and remove all work files, it works correctly with 2.0rc1a but ONLY THE FIRST TIME the page is requested. If you reload the page, the bug manifests itself. I have verified this behavior with Tomcat 4.0 under Linux and with Tomcat 3.2.3 under Solaris 8 (BTW, I cannot compile mod_webapp under Solaris 8, so I am forced to use Tomcat 3.2.3, but this is a problem for the Tomcat list). ........................................................ Having had no reply, I tried to change the order of namespace declarations and "fixed" the problem. I have concluded that, if the "test" taglib logicsheet uses the "xsp-request" taglib, everything works ONLY if, in the XSP document, the namespace declaration for "test" comes BEFORE the namespace declaration for "xsp-request". That is, in the attached test1.xsp file, change <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:log="http://apache.org/xsp/log/2.0" xmlns:test="http://caterina.cbim.it/xsp/test/1.0"> to <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:log="http://apache.org/xsp/log/2.0" xmlns:test="http://caterina.cbim.it/xsp/test/1.0" xmlns:xsp-request="http://apache.org/xsp/request/2.0"> Under C2b2 this is not the case, the order does not matter. I was under the impression that the order of namespace declarations is irrelevant in XML and that parsers and/or XSLT processors are not required to report them to the application in any particular order. Should this behavior be classified as a bug or as an undocumented feature? ;) Best Regards, Ugo -- Ugo Cei - Consorzio di Bioingegneria e Informatica Medica P.le Volontari del Sangue, 2 - 27100 Pavia - Italy Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]
<?xml version="1.0" encoding="ISO-8859-1"?> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:log="http://apache.org/xsp/log/2.0" xmlns:test="http://caterina.cbim.it/xsp/test/1.0" > <page> <content> <para> The parameter q is equal to "<xsp-request:get-parameter name="q"/>" </para> </content> </page> </xsp:page>
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:test="http://caterina.cbim.it/xsp/test/1.0" > <xsl:template match="test:test"> <para> The parameter q is equal to `<xsp-request:get-parameter name="q"/>' </para> </xsl:template> <xsl:template match="@*|*|text()|processing-instruction()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
<page xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:test="http://caterina.cbim.it/xsp/test/1.0"> <content> <para> The parameter q is equal to `SOMEVALUE' </para> <para> The parameter q is equal to `<xsp-request:get-parameter name="q"/>' </para> </content> </page>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]