Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 55550 invoked from network); 11 Jun 2008 14:50:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 14:50:49 -0000 Received: (qmail 99259 invoked by uid 500); 11 Jun 2008 14:50:49 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 99198 invoked by uid 500); 11 Jun 2008 14:50:49 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 99187 invoked by uid 99); 11 Jun 2008 14:50:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 07:50:49 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [87.94.96.112] (HELO smtp2.dnainternet.fi) (87.94.96.112) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 14:49:59 +0000 Received: from [127.0.0.1] (238-247.adsl.lpoy.dnainternet.fi [78.27.92.247]) by smtp2.dnainternet.fi (Postfix) with ESMTP id D6B61CB61 for ; Wed, 11 Jun 2008 17:50:13 +0300 (EEST) Message-ID: <484FE623.40201@digikartta.net> Date: Wed, 11 Jun 2008 17:50:11 +0300 From: "Lehtonen, Mika" Organization: XML-Scanning Littoinen Ky User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: problem with document() function References: <484FB475.70409@memocomp.de> <484FD9E4.4010706@memocomp.de> <484FE3E7.8020104@memocomp.de> In-Reply-To: <484FE3E7.8020104@memocomp.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Johannes, maybe you could try absolute path like: * UNIX ... file:///foo/bar/this.xsl * Windows ... file:///C:/foo/bar/this.xsl Just to make sure that the file is fetched from the right location. - mika - Johannes Hoechstaedter kirjoitti: > The value of the variable $filename is correct, because I use this > variable three times in the same stylesheet within xi:include > statements, and it works. So the output of select="$filename" /> is correct. The output of select="document($filename)/*" /> is empty, and I get no error. Just > an empty value, where should be a value. > > The file is located in "COB-INF/resource/internal/sql/configuration", > and I access it by "resource/internal/sql/configuration/filename". I > think it is correct or?. > > Heather Rankin schrieb: >> Hi Johannes, >> >> Well firstly if you're using a variable to store your filename you >> shouldn't need quotes around it. Should just be > select="document($filename)/NodeA/NodeB/NodeC" /> >> >> If that doesn't work it could be a problem with the path to your file or >> the path to your nodes. The XML needs to be well formed, but if you're >> not getting an error then that shouldn't be a factor. I'd make sure the >> file path is correct by trying to output everything in the file >> or use doc-available to >> tell you. >> >> According to your XML input your xpath looks ok (assuming first >> is ). >> >> Heather >> >> -----Original Message----- >> From: Johannes Hoechstaedter [mailto:j.hoechstaedter@memocomp.de] >> Sent: 11 June 2008 14:58 >> To: users@cocoon.apache.org >> Subject: Re: problem with document() function >> >> Hi Heather, >> >> yes I thought the same. Thats what I tried, only to test the document() >> function: >> >> >> >> but I got no output. When I insert > select="doc-available('$filename')" /> for example, nothing works >> anymore :) >> >> The content of $filename is correct. >> >> The xml structure of the file is: >> >> >> >> text >> >> >> >> Could it be still a path issue? >> >> Heather Rankin schrieb: >> >>> Hi Johannes, >>> >>> You should be able to use the document() function to interrogate the >>> contents of an external XML file. It is also a good idea to use >>> doc-available() first to check for the existence of the file and build >>> >> >> >>> the tree in memory. >>> >>> Heather >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> >> >> http://www.bbc.co.uk/ >> This e-mail (and any attachments) is confidential and may contain >> personal views which are not the views of the BBC unless specifically >> stated. >> If you have received it in error, please delete it from your system. >> Do not use, copy or disclose the information in any way nor act in >> reliance on it and notify the sender immediately. >> Please note that the BBC monitors e-mails sent or received. >> Further communication will signify your consent to this. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org