SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : XML Technologies :

Previous DiscussionNext Discussion
 XSL & XML in FireFox

HI,

I have an application in IE and I'm moving it to FireFox.

There is one section I didn't find match functionality:

currSort1DirNodeVal = xsl.documentElement.selectSingleNode("//xsl:param[@name=\"sort1Dir\"]/@select").nodeValue;

xsl example is:

......................

<?xml version="1.0" ?>

- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="sortByDummy" select="' '" />
  <xsl:param name="sort1By" select="'time'" />
  <xsl:param name="sort1Dir" select="'ascending'" />
  <xsl:param name="sort1Type" select="'number'" />
  <xsl:param name="sort2By" select="' '" />
  <xsl:param name="sort2Dir" select="'ascending'" />

..................................

Can you help

 

thanks :-)

 

Started By en on Jan 18, 2006 at 5:03:13 AM

14 Response(s) | Reply

Earlier Replies | Replies 1 to 7 of 14 | Later Replies
Goto Page: 2 1
MHenke on Jan 18, 2006 at 5:32:42 AM (# 1)

var currSort1DirNodeVal = xmlDocument.evaluate(("//xsl:param[@name=\"sort1Dir\"]/@select", xmlDocument, null, 9, null).singleNodeValue;


Check out document.evaluate() for details.


LETS HELPS EACH OTHER TO EARN $$$$$$$ on Jan 18, 2006 at 5:02:04 PM (# 2)

This user account has been disabled. Click here to read the message.
en on Jan 19, 2006 at 2:30:00 AM (# 3)

Hi,

 

thanks,

I keep getting error

 missing ) after argument list
    var currSort1DirNodeVal = doc.evaluate(("//xsl:param[@name=\"sort1By\"]/@select", doc, null, 9,null).singleNodeValue;

 

Do you know what is wrong?

Efrat

Code:

--------------------

 xsl.load("eventlogger.xsl");

 xsltProcessor = new XSLTProcessor();
    xsltProcessor.importStylesheet(xsl);
 var doc = xsltProcessor.transformToDocument(xsl);

    var currSort1DirNodeVal = doc.evaluate(("//xsl:param[@name=\"sort1By\"]/@select", doc, null, 9,null).singleNodeValue;
   


en on Jan 19, 2006 at 2:33:50 AM (# 4)

Hi,

Well, I fixed it but now I receive this error:

 uncaught exception: [Exception... "An attempt was made to create or change an object in a way which is incorrect with regard to namespaces"  code: "14" nsresult: "0x8053000e (NS_ERROR_DOM_NAMESPACE_ERR)" 

Any suggestion?

thanks in advance.

 

 


MHenke on Jan 19, 2006 at 3:05:19 AM (# 5)
This message has been edited.

Hum, the evaluate() function takes a "NamespaceResolver" as optional argument and you're using the xsl: namespace in your XPath. Maybe you've to set up an appropriate NSResolver, lookup the docu i've posted in #1.


BachusII on Jan 19, 2006 at 6:39:16 AM (# 6)

Bingo. Luckily FX provides one. Tucked away in a little known corner.

document.createNSResolver( document.documentElement ) returns such a function for document.evaluate to use.


MHenke on Jan 19, 2006 at 8:10:56 AM (# 7)

Fine. Thanks for verifying my SWAG...  8)


Earlier Replies | Replies 1 to 7 of 14 | Later Replies
Goto Page: 2 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.