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 3:56 PM +0100 7/22/02, Jeni Tennison wrote:

But the hr element has a default namespace declaration on it, for the
http://www.w3.org/1999/xhtml namespace. The scope of a namespace
declaration is the element that it's on and the contents of that
element, so the default namespace declaration in scope on the hr
element is the one for http://www.w3.org/1999/xhtml, and thus the hr
element is in the namespace http://www.w3.org/1999/xhtml.

You're right. I missed that. Weird example.

Whether the XPath:

  //html:hr

should retrieve it is, of course, another matter, since it entirely
depends on the namespace associated with the prefix 'html' in the
context in which the XPath is being used...

Yes. That may be why it doesn't find it, because the html prefix is mapped to something else or not mapped at all.
--

+-----------------------+------------------------+-------------------+
| 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]