Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2006, 03:28 PM
jz jz is offline
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default mozilla and ie xpath differences

I have an xslt which is working in ie but does not in mozilla. Here's the offending xml fragment:

  <Page id="1" number="1" />
    <Paragraph id="1">
       Here is some paragraph text for paragraph 1
    </Paragraph>
   <Paragraph id="2">
       Here is some paragraph text for paragraph 2
   </Paragraph>

the relevent xsl is where the current node is the <Page id="1" number="1"/> node:

<xsl:apply-templates select="following-sibling::node()[1]" mode="outsidePara"/>

in ie this works correctly evaluating for the <Paragraph id="1"> node but in mozilla the xsl:apply-templates evaluates nothing.

Does anybody know what and why the difference? I'd like my transform to work with mozilla (that is, firefox 1.5.0.3)

thanks,
jz



 
Old May 12th, 2006, 03:45 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Actually it's working correctly in Mozilla and incorrectly in IE. The node that immediately follows the Page element is a whitespace text node. But IE throws whitespace text nodes away. Use following-sibling::* if you want the next element, rather than the next node.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old May 12th, 2006, 04:51 PM
jz jz is offline
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you! Once again problem solved.
btw I have XSLT Programmer's Reference. Its invaluable (as is this forum)

jz






Similar Threads
Thread Thread Starter Forum Replies Last Post
XML differences mrame XSLT 4 October 6th, 2008 07:34 AM
mozilla/IE 7 differences Adam H-W CSS Cascading Style Sheets 2 July 9th, 2007 04:16 AM
Code differences afharris_83 BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 5 May 8th, 2007 10:14 AM
objDataAdapter Differences cpbittner BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 September 20th, 2004 08:09 PM
Differences between books Spivonious C# 4 August 12th, 2004 07:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.