[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|