This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]