[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Different results with different processors

Subject: Re: Different results with different processors
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 7 Jun 2007 23:37:03 +0100
Re:  Different results with different processors
best to make a complete 6 or 7 line input file and stylesheet that shows
different results, if we can confirm one of them is wrong then you can
post to the appropriate bug channel.


<xsl:apply-templates select="node()[name() != 'bar']" />

<xsl:for-each select="node()[name() != 'bar']">
  <xsl:apply-templates select="." />

thy should select the same nodes, and apply the same templates, they
could give different results as position() an last() are alwas 1 in the
second form, but in the first form position() runs from 1 to last()
which is the number of nodes selected.  So if your template use those
functions the output may be dufferent.

actually comparing against name() in an xslt1 system is implementation
dependent if theer are any namespaces around.

If the elements are in no-namespace then name() will return 'bar'
if and only if  the element name is bar.

However if the element bar is in a namespace but appears unprefixed due
to an xmlns="zzz" declaration, name() probably returns "bar" but it
could return "ns42:bar" or any other prefix it has chosen.  It's
generally better to write the test as node()[not(self::bar)] especially
in the namespace case, as then the behaviour is fully defined.


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.