RE: [xsl] RE: Re: Query re XMLSpy XPath engine

Subject: RE: [xsl] RE: Re: Query re XMLSpy XPath engine
From: Américo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Tue, 23 Jul 2002 11:42:59 +0100
Hi!
In this document we have two ns defenitions: one binding the ns
'http://www.w3.org/1999/xhtml' to the prefix 'html' and another setting
the default ns to 'http://www.w3.org/1999/xhtml'. Since XMLSpy evaluates
the expression in the context of the original document doesn't this
means that it's setting the html prefix or setting the default ns?? Wich
ns definition is return with //hr? xmlns="http://www.w3.org/1999/xhtml";
or xmlns:html="http://www.w3.org/1999/xhtml";??

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Dimitre
Novatchev
Sent: Tuesday, July 23, 2002 5:50 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] RE: Re: Query re XMLSpy XPath engine


> > Right. Probably Michael Leditschke can tell us in what context he's 
> > evaluating the expression. I don't have XMLSpy, the XPath
Visualiser
> > reproduces all namespace definitions from the source xml document
into
> > the stylesheet, which is then used to evaluate the XPath
expression.
> >
> > Thus, XPath expressions, containing fully-qualified names with
prefixes
> > defined in the source document, are evaluated successfully.
> >
> 
> 
> In XMLSpy, the XPath expression is calculated in the context of the
> active document, in my case the one included in the original email. 
> There is the option to evaluate it relative to the root or some other

> element. I did it relative to the root. The evaluator does use the
> namespace declarations active at the point at which you issue the 
> query - I have used this previously successfully but tried to keep 
> the example simple for the list.
> 
> So, to answer Elliotte's question, the namespace bindings in the
> source document do appear to be used (though in my example ?
> incorrectly). The context is the XPath evaluator functionality of 
> XMLSpy being applied to the root of the provided source document.
> 
> I agree with Jeni that the hr element is in the
> http://www.w3.org/1999/xhtml namespace because of the default 
> namespace declaration on it.
> 
> Hence I would still argue that //html:hr should return the element
> whereas //hr should not.

In this case, this seems really a bug. I know what similar tools are
supposed to do and this is to help the user evaluate an XPath expression
in the context of the source xml document, before they write a
stylesheet with this expression, or when debugging a stylesheet.

But you can use the XPath Visualiser -- it doesn't have that bug.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better http://health.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread