Subject: AW: [xsl] include, document and namespaces From: Patrick Reuter <patrick.reuter@xxxxxxxxxxxxxxxxxxx> Date: Wed, 20 Jun 2001 19:13:44 +0200 |
Hi Ruben, I have exactly the same problem with Cocoon and I don't think this is a XSLT issue. I would sugest to discuss this problem on the COCOON-users-List http://xml.apache.org/cocoon/mail-lists.html Patrick -----Ursprüngliche Nachricht----- Von: Ruben Inoto [mailto:ris2@xxxxxxxxx] Gesendet: Mittwoch, 20. Juni 2001 17:59 An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Betreff: [xsl] include, document and namespaces Hi everybody! I have found a very strange behaviour using XSL under Tomcat with Cocoon when I mix namespaces and includes. Suppose I have 4 documents: a) A.xml -> procesed by A.xsl b) A.xsl -> processes A.xml, acceses B.xml with 'document()' and includes C.xsl c) B.xml -> with some data I want to retrieve from A.xsl. Uses xsp:namespace d) C.xsl -> with some functions used by A.xsl The problem: when (and only when) I include C.xsl inside A.xsl I cannot access the data in B.xml; I get the error: 'cannot load requested doc'. I've tried to reduce the files to the minimum, but I still have the same problem. Here you have the reduced examples of the files: A.xml --------------------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <?cocoon-process type="xslt"?> <?xml-stylesheet type="text/xsl" href="/xsl/A.xsl"?> <nothing> </nothing> --------------------------------------- A.xsl --------------------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://www.apache.org/1999/XSP/Core"> <!-- When I comment this line I have no problems at all --> <xsl:include href="C.xsl" /> <xsl:template match="/"> <html> <xsl:value-of select="document('B.xml')//nombre" /> </html> </xsl:template> </xsl:stylesheet> --------------------------------------- B.xml --------------------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <?cocoon-process type="xsp"?> <?cocoon-process type="xslt"?> <?xml-stylesheet type="text/xsl" href="D.xsl"?> <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:accesoBD="http://www.e-inteligentia.com/accesoBD"> <nombre>the data I want to retrieve</nombre> </xsp:page> --------------------------------------- C.xsl --------------------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://www.apache.org/1999/XSP/Core"> <!-- Even if it does nothing I get the problem --> </xsl:stylesheet> --------------------------------------- What am I doing wrong? Have I forgotten to declare a namespace or something? Is it a Cocoon problem? I would really appreciate any help, thank you in advance... XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Background color change n, Jeni Tennison | Thread | [no subject], Betty . Risher |
[xsl] Background color change not w, Betty . Risher | Date | Re: [xsl] recursions?, Jeni Tennison |
Month |