On Dec 5, 2005, at 9:07 PM, Yonik Seeley wrote:
There is one little problem with XML though... It's inability to
directly represent binary data, or even all unicode code points (no,
entities don't fix this). I use binary data in lucene to represent
some numerics, and that can't be represented in standard XML. An
application specific escaping mechanism can be used, but then you are
a step away from standard XML.
example: <tag>�</tag> is not valid XML
If we go with XML, I think this must be solved (or else we are at the
point where we can only represent a subset of queries that lucene can
handle again).
Can you give an example of a query that needs binary information?
Also I'd be curious to see a problem with Unicode code points in XML,
if you have one handy.
Even something like setBoost(float f) isn't taking a String. But the
XML->Query mapping would translate <Query boost="2.0"> by parsing the
boost attribute and calling setBoost appropriately. Is this what you
mean?
For example, Ant has this sort of type mapping capability built-in.
Here's some info on how that works:
http://ant.apache.org/manual/develop.html#writingowntask
("Conversions Ant will perform for attributes" section)
I described this in some more detail in a JavaPro article a couple of
years ago also:
http://www.fawcette.com/javapro/2003_02/magazine/features/ehatcher/
(must register to see the full article, unfortunately)
I'm confident that XML can accommodate our needs just fine, and any
other text transmission would have to re-solve many issues that XML
has already solved.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]