: I looked at the XSD and there is one thing I don't understand:
:
: If the desired way is to conform to the XSD (and hence the types used in XSD),
: then how would it possible to use user-defined fieldtypes as plugins?  
Wouldn't
: they violate the same principle?

The XSD is intended to match the behavior of the XmlResponseWriter and the
core solr code base ... if you write a new ResponseWriter (or use one of
the other built in ResponseWriters like JSON or Ruby) then all bets are
off.  if you are writing a new FieldType, then you might still be able to
use the XSD as is if your data can easily be represented using one of hte
"primative' types (ie: i might add a new LonLatFieldType class for
efficinetly storing/searching geographic coordinates, but when writing as
XML the syntax <str>+37.774395-122.422156</str> might work fine)

In a case like yours, where you genuinely need to extend the list of valid
tags, XMLSchema has a mechanism for that by letting you define your
own XSD which can reuse the elements defined in the main XSD. (the same
way DTDs can reuse elements from other DTDs)

all of this being a somewhat theoretical issue: since Solr doens't
currently do anything with that XSD ... I assume if/when it does, it will
be voluntary (ie: there might be a config option to have it include an XSD
of your choice in the XML header of the responses so you can validate if you
choose to)



-Hoss

Reply via email to