You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2006/05/26 08:19:46 UTC

Home for XML Schema? (SOLR-17)

Mike Baranczak has provided a nice litle XSD for Solr update/response
docs, the question is what should we do with it?

Presumably XMLResponseWriter should start refrencing it in the XML it
creates, but via what URL?  Should it only live in the solr.war, or should
it also live at some world accessible *.apache.org/* URL?

Does anyone know if there is an oficial Apache policy on DTDs and
XSDs and such?





-Hoss


Re: Home for XML Schema? (SOLR-17)

Posted by Mike Baranczak <MB...@ePublishing.com>.
On May 26, 2006, at 2:57 AM, Erik Hatcher wrote:

> (would Solr ever need to use the XSD itself?)


Probably not at runtime, but it might be useful in unit testing, to  
ensure that Solr is creating proper output.

I think the primary utility is for people who write code that has to  
talk to Solr. I myself am working with a system that makes heavy use  
of the XmlBeans library, so an XSD makes my job a lot easier.

-MB


Re: Home for XML Schema? (SOLR-17)

Posted by Yoav Shapira <yo...@apache.org>.
Hi,

> > http://lucene.apache.org/solr/1.0/solr-http.xsd
>
> I like the idea of adding schema support for Solr's output, but I'm
> afraid most of my XML experience is with non-validated stuff.
>
> Can we use a full name like that w/o clients trying to hit the real
> lucene.apache.org website looking for the schema?

Yeah.  This is done fairly routinely: you can see, for example, how
Tomcat packages the web.xml DTD/XSD files alongside the servlet-api.
Every web.xml file has the full DTD/XSD URL for the web-app element,
but 99.9% of the time the lookup is local, no network connection
needed.

> I assume the xsd would go under webapp/resources somewhere?

Sure, it's as good a place as any.  I suggest NOT putting it under
WEB-INF, so that developers can easily see the actual raw XSD file in
their browser while developing / testing.

Yoav

Re: Home for XML Schema? (SOLR-17)

Posted by Yonik Seeley <ys...@gmail.com>.
On 5/26/06, Mike Baranczak <MB...@epublishing.com> wrote:
> I looked at a few randomly selected files from various Apache
> projects, and it doesn't seem like there are any naming conventions
> at all, or if there are, nobody else knows them either. I propose the
> following:
>
> http://lucene.apache.org/solr/1.0/solr-http.xsd

I like the idea of adding schema support for Solr's output, but I'm
afraid most of my XML experience is with non-validated stuff.

Can we use a full name like that w/o clients trying to hit the real
lucene.apache.org website looking for the schema?

I assume the xsd would go under webapp/resources somewhere?

-Yonik

Re: Home for XML Schema? (SOLR-17)

Posted by Mike Baranczak <MB...@ePublishing.com>.
On May 26, 2006, at 3:24 AM, Chris Hostetter wrote:

>
> : It is not necessary, and actually frowned upon (maybe even  
> prohibited
> : by the ASF at this point) for there to be a real file responding to
> : the *URI* which happens to be a WWW http:// *URL*.  We're free to
> : create whatever URI we want, and simply configure any internal  
> parser
> : that uses it (would Solr ever need to use the XSD itself?) to map  
> the
> : URI to a URL accessible schema schema (local filesystem, even within
> : JAR's, WAR's, etc).  The apache.org web servers get beat up  
> enough as
> : it is, and having the world point to an online DTD adds brittleness
>
> right .. we can certianly put the file in  solr.war, and configure the
> XMLResponseWriter to refrence it via a relative path so any client  
> of a
> particular solr instance can retrieve it from that instance. ..  
> likewise
> any clients generating update docs that want to refrence the schema  
> can do
> some using the same URL .. my question was more regarding policy:
>
>  1) are there any Apache xmlns namespace policies/conventions?
>  2) are there any Aapache policies regarding real word URLs for xmlns
>     URIs?
>  3) are there any Apache naming convetions for DTDs/XSDs files?
>  4) are there any Apache policies regarding real world URLs for DTD/ 
> XSD
>     URIs?  (it sounds like the answer is "yes: don't do it")


I looked at a few randomly selected files from various Apache  
projects, and it doesn't seem like there are any naming conventions  
at all, or if there are, nobody else knows them either. I propose the  
following:

http://lucene.apache.org/solr/1.0/solr-http.xsd

-MB


Re: Home for XML Schema? (SOLR-17)

Posted by Chris Hostetter <ho...@fucit.org>.
: It is not necessary, and actually frowned upon (maybe even prohibited
: by the ASF at this point) for there to be a real file responding to
: the *URI* which happens to be a WWW http:// *URL*.  We're free to
: create whatever URI we want, and simply configure any internal parser
: that uses it (would Solr ever need to use the XSD itself?) to map the
: URI to a URL accessible schema schema (local filesystem, even within
: JAR's, WAR's, etc).  The apache.org web servers get beat up enough as
: it is, and having the world point to an online DTD adds brittleness

right .. we can certianly put the file in  solr.war, and configure the
XMLResponseWriter to refrence it via a relative path so any client of a
particular solr instance can retrieve it from that instance. .. likewise
any clients generating update docs that want to refrence the schema can do
some using the same URL .. my question was more regarding policy:

 1) are there any Apache xmlns namespace policies/conventions?
 2) are there any Aapache policies regarding real word URLs for xmlns
    URIs?
 3) are there any Apache naming convetions for DTDs/XSDs files?
 4) are there any Apache policies regarding real world URLs for DTD/XSD
    URIs?  (it sounds like the answer is "yes: don't do it")



-Hoss


Re: Home for XML Schema? (SOLR-17)

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 26, 2006, at 2:19 AM, Chris Hostetter wrote:
> Mike Baranczak has provided a nice litle XSD for Solr update/response
> docs, the question is what should we do with it?
>
> Presumably XMLResponseWriter should start refrencing it in the XML it
> creates, but via what URL?  Should it only live in the solr.war, or  
> should
> it also live at some world accessible *.apache.org/* URL?
>
> Does anyone know if there is an oficial Apache policy on DTDs and
> XSDs and such?

It is not necessary, and actually frowned upon (maybe even prohibited  
by the ASF at this point) for there to be a real file responding to  
the *URI* which happens to be a WWW http:// *URL*.  We're free to  
create whatever URI we want, and simply configure any internal parser  
that uses it (would Solr ever need to use the XSD itself?) to map the  
URI to a URL accessible schema schema (local filesystem, even within  
JAR's, WAR's, etc).  The apache.org web servers get beat up enough as  
it is, and having the world point to an online DTD adds brittleness  
to deployments.  Developers thing the system works fine, and they  
deploy to a production server that is more firewalled off and  
suddenly configuration files don't parse and the system is unusable.   
Local resolution only is the way to go.

	Erik