Re: [C2b2] document() function not working?
If you are getting nothing back when you use the document() function, make sure the file you are opening with document() is valid XML. I found out the hard way that document() fails silently (at least in Cocoon 1.8.2) when the XML is bad. Try opening the XML document in IE or something like that to make sure it parses successfully. If this is still true in C2, it might make a good FAQ entry. -Christopher - 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]
[Fwd: Re: [C2b2] document() function not working?]
Hi, I'm one step further!! The problem: I looked in the wrong logfile. In the logfile for Tomcat there is written nearly the same as for Cocoon, but no errors ;-) Now I could change the link to the called XML-file. But there is still a problem: javax.xml.transform.TransformerException: Can not load requested doc: home at org.apache.xalan.templates.FuncDocument.warn(FuncDocument.java:448) at org.apache.xalan.templates.FuncDocument.getDoc(FuncDocument.java:385) at org.apache.xalan.templates.FuncDocument.execute(FuncDocument.java:221) at org.apache.xpath.Expression.asIterator(Expression.java:261) at org.apache.xpath.axes.FilterExprWalker.setRoot(FilterExprWalker.java:156) at org.apache.xpath.axes.WalkingIteratorSorted.reset(WalkingIteratorSorted.java:164) What does this mean? What are the possible errors? Regards, Joerg Original-Nachricht Betreff: Re: [C2b2] document() function not working? Datum: Wed, 22 Aug 2001 17:22:38 +0200 Von: Jörg Heinicke [EMAIL PROTECTED] An: [EMAIL PROTECTED] Referenzen: [EMAIL PROTECTED] Hi Christopher, thanks for your reply, but it must be another problem. I tested the stylesheet with all the XML-files on the commandline with Ant/Xalan and without Cocoon - it works fine. But I want to use Cocoon for doing this transformation on the fly. For the document()-function I have a question: Will the called XML-file handled by the sitemap ( - So do I need a correct matcher in it? - inclusive link-resolving? ) e.g. like a HTML-redirect for JPGs/GIFS or does it work completely without Cocoon (direct access to the XML-file)? I think that I tested all possibilities, but I had no success. I also searched the logfiles - no success. No error messages from document(). Regards, Joerg - 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]
Re: [C2b2] document() function not working?
Yes, I solved the problem. I hadn't realized that the path needed to be relative to the stylesheet (kind of a no-brainer in retrospect). Wes Morgan Jörg Heinicke wrote: Hello Wes, did you solve your problem? I also have my problem with this function, equal to relative/absolute path and so on, it seems to me, that the document()-function doesn't work. Best proof: class a href={$from-path}xsl:value-of select=$from-path//a xsl:variable name=test select=document('Object.xml')/test/@test/ bxsl:value-of select=$test//b /class I won't get my a href=/a in the output-document, if it is written after the xsl:variable .. /. And I don't get neither the b nor the value of $test. I work with C2b2, Tomcat 3.2.3 and Sun JDK 1.3. What could be the problem or a workaround? Joerg Subject: [C2b2] document() function not working? From: Wes Morgan [EMAIL PROTECTED] Date: Thu, 02 Aug 2001 10:08:36 -0400 To: [EMAIL PROTECTED] Has anyone successfully used the document('otherfile.xml') function to access nodes in a different XML file from within an XSLT stylesheetunder Cocoon2 beta1 or 2? It seems to be unimplemented right now, but I can't tell for sure if it's just because I'm using it incorrectly. If you have gotten it to work, could you post your working code? Thanks. Wes Morgan Subject: Re: [C2b2] document() function not working? From: [EMAIL PROTECTED] (Rajkumar, Joseph) Date: Thu, 02 Aug 2001 11:31:23 -0400 To: [EMAIL PROTECTED] Hi Wes Yes, I have used the document('otherfile.xml') and it works under cocoon2. Put the file 'otherfile.xml' in the same directory in which you have your xsl file or give the relative path to 'otherfile.xml' relative to the directory where you have your 'xsl' file. Regards Joseph Rajkumar Wes Morgan wrote: Has anyone successfully used the document('otherfile.xml') function to access nodes in a different XML file from within an XSLT stylesheet under Cocoon2 beta1 or 2? It seems to be unimplemented right now, but I can't tell for sure if it's just because I'm using it incorrectly. If you have gotten it to work, could you post your working code? Thanks. Wes Morgan - 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] - 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]
Re: [C2b2] document() function not working?
Hi Wes Yes, I have used the document('otherfile.xml') and it works under cocoon2. Put the file 'otherfile.xml' in the same directory in which you have your xsl file or give the relative path to 'otherfile.xml' relative to the directory where you have your 'xsl' file. Regards Joseph Rajkumar Wes Morgan wrote: Has anyone successfully used the document('otherfile.xml') function to access nodes in a different XML file from within an XSLT stylesheet under Cocoon2 beta1 or 2? It seems to be unimplemented right now, but I can't tell for sure if it's just because I'm using it incorrectly. If you have gotten it to work, could you post your working code? Thanks. Wes Morgan - 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] - 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]