<feed xmlns="http://www.w3.org/2005/Atom" xmlns:foaf="http://xmlns.com/foaf/0.1/"><title>norman.walsh.name: Comments on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers"/><id>http://norman.walsh.name/2007/02/14/resolvers/comments.atom</id><updated>2012-02-13T08:34:56.019979Z</updated><entry><title>Comment 1 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0001"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0001</id><published>2007-02-15T11:48:36Z</published><updated>2007-02-15T11:48:36Z</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">
    <p>This is very cool, Norm. I haven't give it try yet, but I must do.
</p>
    <p>
I'm not Java expert, but wouldn't it be possible to store Java properties which change parser factories inside .jar file, so setup will be just about putting XML Resolver and Resolver factories JARs into classpath? That way installation would be even less difficult.</p>
  </div></content></entry><entry><title>Comment 2 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0002"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0002</id><published>2007-02-18T07:38:51Z</published><updated>2007-02-18T07:38:51Z</updated><author><name>Bob Stayton</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>I was going to try this out, but I couldn't see how to specify where the catalog file resides.  Do I still use a CatalogManager.properties file for such?</p>
  </div></content></entry><entry><title>Comment 3 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0003"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0003</id><published>2007-02-19T17:06:54Z</published><updated>2007-02-19T17:06:54Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Yes, Bob. Documentation, such as it is, is in the <a rel="nofollow" href="https://xmlresolver.dev.java.net/nonav/javadoc/org/xmlresolver/Catalog.html">JavaDoc</a>.</p>
  </div></content></entry><entry><title>Comment 4 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0004"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0004</id><published>2007-03-10T20:45:53Z</published><updated>2007-03-10T20:45:53Z</updated><author><name>Noel Bush</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Thanks for making this code available.  I'm hoping it will allow me to finally fulfill the following fantasy.  For some reason I've got it in my head that this is "the way things are supposed to work", but despite all my digging I can't seem to find anybody who's actually doing this.  It goes:</p>

<p>1.  I have a W3C Schema document myschema.xsd.  It starts off like:</p>

<pre>  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://my.tld/something" targetNamespace="http://my.tld/something" elementFormDefault="qualified" attributeFormDefault="unqualified"
  version="1.0" xml:lang="EN"&gt;</pre>

<p>2.  I have an instance document mydocument.xml.  It starts off like:</p>

<pre>  &lt;something xmlns="http://my.tld/something"&gt;</pre>

<p>3.  I have a catalog file.  It says that whenever somebody finds a document/element that says it belongs to namespace "http://my.tld/something" and wants to validate it, it should retrieve the schema from myschema.xsd.</p>

<p>4.  I can give this to somebody else and they can move the schema document to wherever they want, and just edit the catalog entry.</p>

<p>5.  There doesn't have to be anything at http://my.tld/something.  It doesn't even have to exist.</p>

<p>6.  I don't have to use xsi:schemaLocation location hints in my instance documents.  The namespace URI is enough to trigger all of this.</p>

<p>7.  My application doesn't have to have any special knowledge of the namespaces that will be used.  I want to potentially be able to validate content that belongs to namespaces I don't know anything about.</p>

<p>This is the whole idea of catalogs, right?  But I just can't seem to get it to work, either with the older XML resolver stuff or this new code.  I've been trying with Xerces's DOM package, with JDOM, with Xerces SAX, with Xerces LSParser....just always running into trouble.  Generally it seems that the validation isn't getting triggered -- the catalog gets read, but the association between the namespace URI and the schema location just doesn't take.  I'm using the &lt;uri/&gt; elements with the RDDL annotations noted above.</p>

<p>I'm willing to help out with finding bugs, but I'd just like to know whether I'm totally off the mark with my understanding of how things are intended to work.</p>

<p>Thanks!</p>
  </div></content></entry><entry><title>Comment 5 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0005"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0005</id><published>2007-03-11T02:16:08Z</published><updated>2007-03-11T02:16:08Z</updated><author><name>Noel Bush</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>I've sent you a patch that makes the namespace resolver stuff get used in my scenario.  Thanks -- this is great!</p>
  </div></content></entry><entry><title>Comment 6 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0006"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0006</id><published>2007-03-12T13:23:25Z</published><updated>2007-03-12T13:23:25Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>I'll take a look at your patch, but the problem I see with your scenario is that (to date) none of the APIs out there make use of the RDDL information.
</p>
    <p>
That is, the W3C XML Schema validator just asks for the namespace URI. It doesn't ask for the namespace URI for the purpose of validation. If it did, then everything would work just as you suggest.
</p>
    <p>
That's what the resolveNamespace API is for.</p>
  </div></content></entry><entry><title>Comment 7 on /2007/02/14/resolvers</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/02/14/resolvers#comment0007"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0007</id><published>2007-04-10T16:25:37Z</published><updated>2007-04-10T16:25:37Z</updated><author><name>Greg Deitrick</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>I also expected things to work as Noel Bush describes above and it has been difficult for me to recognize and accept that they _don't_ work that way.  Only today did I google RDDL to find <a rel="nofollow" href="http://www.oreillynet.com/pub/a/oreilly/xml/news/xmlnut2_0201.html">
this explanation</a> that corrects one of my misunderstandings.  Still, AFAIK, the schemaLocation and   noNamespaceSchemaLocation attributes from http://www.w3.org/2001/XMLSchema-instance associate a uri with a url; it seems logical that the associated url might go through the catalog resolver; another fantasy I suppose.  For now its back to work for me...</p>
  </div></content></entry></feed>

