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

Re: Comparing node for identity using union

Subject: Re: Comparing node for identity using union
From: António Mota <amsmota@xxxxxxxxx>
Date: Fri, 14 Jan 2005 19:46:42 +0000
firefox xsltprocessor
Thanks for that. I think i'm at that dangerous time when one thinks
allready knows their stuff, just to discover that that's a never
ending story...

I have everithing working again Ok, i didn't reach a conclusion on why
it stop working. I'm using now

<xsl:variable name="snode" select="(//Menu)[$pos]"/>
(...)
<xsl:when test="count($snode)=1 and count(parent::Menu|$snode)=1">

meaning "when my parent Menu is the Menu at position pos".

I had a wreck of a time because each processor gives me a diferent
thing in the debugger. Ex. Saxon gives a node-set(0) when watching
(//Menu)[0] but Xalan gives error, altought the output is functionaly
equal. And there were another diferencs too...

The problem wasn't exclusive on this, it was probably a chain of small
errors, but this was one of then.

However, and OT, this i has another STRANGE problem. I'm invoking the
XSLT from Javascript (sarissa) and when using the Firefox
XSLTProcessor i get a strange behaviour...

This is what i post in the Sarissa forum, altought this seems a bug on
the XSLTProcessor. I wonder if i should post this in here with a
expressive subject for the archives, in case someone get's the same
problem?

-----------------------
I tracked down the problem, and i just can4t believe this!!! In my
sheet i have

<xsl:variable name="snode" select="(//Menu)[$pos]"/>

for a XML like this:

<Menus>
<Menu> ->1
<Menu/> ->2
</Menu>
<Menu/> ->3
<Menus>

that must select the node 1,2,3 corresponding to the pos 1,2,3.

Now i just put a verification on XSLT

<xsl:message>count: <xsl:value-of select="count($snode)"/></xsl:message>

that i expected to ALLWAYS return 1, cause select="(//Menu)[$pos]"
select only one node.

Using

xml.transformNodeToObject(xslDoc, xmlResult); it

works as i expected. However with

var xmlResult = processor.transformToDocument(xmlDoc);

the result of the message is THE TOTAL COUNT of //Menu, in this example 3.

This is clearly a bug on XSLTProcessor, don't you think? What can i do
with this?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.