Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 30581 invoked by uid 500); 24 Feb 2003 07:34:14 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 30568 invoked from network); 24 Feb 2003 07:34:14 -0000 Received: from virt4e.webintellects.com (216.98.153.12) by daedalus.apache.org with SMTP; 24 Feb 2003 07:34:14 -0000 Received: from lisa ([62.90.163.230]) (authenticated (0 bits)) by virt4e.webintellects.com (8.11.6/8.11.6) with ESMTP id h1O7erB25724 for ; Sun, 23 Feb 2003 23:40:54 -0800 Message-ID: <010501c2dbd7$09f073c0$a800000a@lisa> From: "Anna Afonchenko" To: References: <01ac01c2d8dd$10400bc0$a800000a@lisa> <3E5545B8.2000103@yahoo.de> Subject: Re: XPath problems in Cocoon? Date: Mon, 24 Feb 2003 09:33:32 +0200 Organization: UBAccess MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thank you very much for answering and sorry to ask XSL question on Cocoon list. But now my problem stays only in Cocoon. I did as you advice and edited my test.xsl file to Now, if I apply this stylesheet on html file test.html using the batch file: c:\saxon\saxon -o outTest.xml testAnchors.html testAnchors.xsl I get the right answer: One and this is great. But when I tried to apply this stylesheet using cocoon, I still got the empty root element as a result. I.e. now my stylesheet works everywhere except for Cocoon. So I guess the problem that I have now IS with Cocoon. So I am really sorry to ask this again, but I still don't understand this issue. My pipeline is: I would be happy to hear any suggestions. Thank you very very much for help. Anna ----- Original Message ----- From: "J.Pietschmann" To: Sent: Thursday, February 20, 2003 11:16 PM Subject: Re: XPath problems in Cocoon? Anna Afonchenko wrote: > Even if the white spaces are supressed, the algorythm will stay right, > because algorythm should check all a tags that are followed by another a tag, > and the only node between them MAY (not MUST) be white-space only text node. The problem is here select="//a[name(following-sibling::node()[1][not(self::text() and ^^^^^ You select the following nodes including all text nodes ^^^^ The grab the first. For these two nodes in the source: One Two MSXML gets the second element node, because it strips the text node with the space between the two elements. All other processors see this text node instead of the second node at this point and the whole select turns out empty. Add a to the beginning of your style sheet in order to get the same results for all processors. Alternatively, try select="//a[following-sibling::a[1][not(normalize-space())]" but perhaps you even want select="//a[following-sibling::a[not(normalize-space())][1]" instead. BTW you should ask XSLT questions on the XSLT list: http://www.mulberrytech.com/xsl/xsl-list/ J.Pietschmann --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-users-help@xml.apache.org