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

Re: Using native XPath in IE with Javascript

Subject: Re: Using native XPath in IE with Javascript
From: "Manfred Staudinger" <manfred.staudinger@xxxxxxxxx>
Date: Tue, 19 Feb 2008 17:45:56 +0100
Re:  Using native XPath in IE with Javascript
Hi,

On 18/02/2008, Abel Braaksma <abel.online@xxxxxxxxx> wrote:
> Using XSLT in a browser through JavaScript is usually easiest with the
> excellent open source Sarissa, which takes away the burden of little
> differences in calling XPaths directly (i.e., the function parameter for
> the namespace is at the end in FF/Op and at the beginning in IE).
Thanks for remembering me on that. I had a look on it some time ago,
but I don't use it, mainly because it requires ActiveX to be activated
in the browser. But I certainly did not know the superb documentation
"Howto", which was a great help for me to sort things out

I did not, however, solve my IE6 problems. As it seems I don't have an
XML document:
	alert(document.xml); ... undefined
	alert(document.documentElement.nodeName); ... HTML
	document.setProperty("SelectionLanguage", "XPath"); ... Object
doesn't support this property or method

Here is my checklist:
1. the browser gets an xml file from the server with application/xml
2. the PI triggers the XSLT which is served with application/xsl+xml
3. the xsl:output method="xml"

Is something missing here? Or is my diagnosis wrong?

Regards,
Manfred
http://documenta.rudolphina.org/

On 18/02/2008, Abel Braaksma <abel.online@xxxxxxxxx> wrote:
> Manfred Staudinger wrote:
> > Hi,
> >
> > >From a posting back in 2004 by Dimitri Glazkov, speaking about IE (I
> > would be interested in the second case only):
> >    I mean, you can very much do XPath in JavaScript, except it can
> > only occur in two
> >    cases (that I know of):
> >    1) As call to an Msxml.DOMDocument object, created using the new
> >       ActiveXObject()   statement.
> >    2) If an HTML document was generated as a result of a client-side
> > XSL transformation
> >       from an XML file.
> > http://glazkov.com/blog/xpath-unleashed/
> >
>
> 3) on the current HTML document that is loaded in the browser. However,
> note that you have to reload it in a freethreaded DOM object to make it
> work with XSLT (iirc).
>
> 4) in an msxml:script object, though I wouldn't recommend it.
>
> Using XSLT in a browser through JavaScript is usually easiest with the
> excellent open source Sarissa, which takes away the burden of little
> differences in calling XPaths directly (i.e., the function parameter for
> the namespace is at the end in FF/Op and at the beginning in IE).
>
> Cheers,
> -- Abel Braaksma

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.