<feed xmlns="http://www.w3.org/2005/Atom" xmlns:foaf="http://xmlns.com/foaf/0.1/"><title>norman.walsh.name: Comments on /2006/03/28/jaxpNamespaceContext</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/03/28/jaxpNamespaceContext"/><id>http://norman.walsh.name/2006/03/28/jaxpNamespaceContext/comments.atom</id><updated>2012-02-13T10:42:15.165063Z</updated><entry><title>Comment 1 on /2006/03/28/jaxpNamespaceContext</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/03/28/jaxpNamespaceContext#comment0001"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0001</id><published>2006-03-29T00:36:23Z</published><updated>2006-03-29T00:36:23Z</updated><author><name>David Powell</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>That is #2 on my list of baffling API ommisions, narrowly beaten by JAF's lack of an in-memory DataSource implementation.
<a rel="nofollow" href="http://www.google.co.uk/search?q=ByteArrayDataSource">(google seems to back me up!)</a>.</p>
  </div></content></entry><entry><title>Comment 2 on /2006/03/28/jaxpNamespaceContext</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/03/28/jaxpNamespaceContext#comment0002"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0002</id><published>2006-03-29T15:28:41Z</published><updated>2006-03-29T15:28:41Z</updated><author><name>Jirka Kosek</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Seems that Sun is a really big company, where left hand doesn't know what a right hand is doing :-)

<p>At least in my copy of JAXP that comes as a part of JWSDP there is a file NamespaceContextImpl.java in jaxp/samples/XPath directory which provides basic implementation of this interface.

</p><p>I can see some logic (though little bit perverse I must admit) behind structure of JAXP interfaces, but it seems that they were not designed for daily usage. Why JAXP doesn't support something like:

</p><pre>
XPath xpath = XPathFactory.newInstance().newXPath();
xpath.setPrefixMapping("db", "http://docbook.org/ns/docbook");
</pre>

<p>Actually it was only 3 hours ago, when I was pointing some developer to NamespaceContext implementation for a last time. ;-(

</p><p>Do you think that in a future we can believe in a complete redesign of JAXP, or it will be only patched and upgraded to support new technlogies in a some way? 

</p><p>To be clear, I don't think that this is your fault, I'm just unhappy with JAXP and with default XML support in a Java platform. And I think that your NamespaceContext implementation will help to many developers (thought ability to do namespace aware XPaths without it, will be even better).</p></div></content></entry><entry><title>Comment 3 on /2006/03/28/jaxpNamespaceContext</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/03/28/jaxpNamespaceContext#comment0003"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0003</id><published>2007-06-11T14:52:30Z</published><updated>2007-06-11T14:52:30Z</updated><author><name>Henry2man</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Lot of thanks for share this solution! It was usefull for me.</p>
  </div></content></entry><entry><title>Comment 4 on /2006/03/28/jaxpNamespaceContext</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/03/28/jaxpNamespaceContext#comment0004"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0004</id><published>2008-02-22T06:15:01Z</published><updated>2008-02-22T06:15:01Z</updated><author><name>Justin</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Worked well for me too. Thanks.
</p>
    <p>
P.S. Thanks for providing the JUnit tests. Without them I could not include it in my source without ruining my code coverage. ;-)</p>
  </div></content></entry></feed>

