Re: [xml] XPath question



On 04/08/04 19:26, Jesse Pelton wrote:
I think the operative thing here is, "Assuming foo is mapped to your
namespace name in the XPath context."  I probably should have mentioned
in my posting that I came up with my expression to deal with
environments where there was no mechanism to establish such mappings
other than by including a namespace prefix in the instance document.  As
far as I can see, XPath 1.0 does not specify such a mechanism, but
libxml does, of course.  So, my posting was not completely relevant to
this list.  I was excited to find a solution (even if inefficient) to a
real problem that I had; I hope I can be forgiven for choosing the wrong
forum to share it!

Peace. There is a misunderstanding here. You think you have solved the problem, I think you just hid it with another, ending up with two.

Whoever produces XML of the sort

  ...
  <a xmlns="foo">
    <n/>
  </a>
  <a xmlns="bar">
    <n/>
  </a>
  ...

should be made aware of the fact that the thing cannot be processed efficiently. Using namespace prefixes solves this without changing anything about the data the document contains.

Sure, it is customer's document, you have no control of it. If so, you are giving the customer an ill service if you let her get away with it. I cannot speak for everyone, but I'll appreciate an advice about my wrongdoing far more than silence and an inneficient workaround.

Peace now?

Ciao,
Igor



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]