Subject: [xsl] Re: Query re XMLSpy XPath engine From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Mon, 22 Jul 2002 13:28:43 -0700 (PDT) |
--- Elliotte Rusty Harold <elharo at metalab dot unc dot edu> wrote: > > At 8:21 AM -0700 7/22/02, Dimitre Novatchev wrote: > > > > > > > At 1:23 PM +1000 7/22/02, Michael Leditschke wrote: > > > > > > I have the following document > > > > > > <root xmlns:html="http://www.w3.org/1999/xhtml";; > > > xmlns="http://www.a.com";;> > > > <hr xmlns="http://www.w3.org/1999/xhtml"/> > > > </root> > > > > > > > > As the "html" prefix is specified on the top element of the xml > > docoment, the evaluation of "//html:hr" must be return the element: > > > > <hr xmlns="http://www.w3.org/1999/xhtml"/> > > > > No, not necessarily. The XPath expression does not occur in the XML > document being queried. Thus the namespace bindings from the source > document do not apply to the XPath expression. We do not know in what > context the XPath expression at issue does appear (an XPointer? and > XSLT stylesheet? a W3C XML Schema? a Schematron schema? something > else). Thus we do not know which namespace bindings are in scope for > the XPath expression. We should not assume they are the same as in > the > source document itself. 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. ===== 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Query re XMLSpy XPath eng, Elliotte Rusty Harol | Thread | RE: [xsl] Re: Query re XMLSpy XPath, Michael Leditschke |
[xsl] asigning values to variables, Esteban Gonzalez | Date | Re: [xsl] asigning values to variab, James Fuller |
Month |