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: Query re XMLSpy XPath engine


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.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+

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]