users@fi.java.net

Re: using external vocabularies

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 27 Jul 2005 12:32:40 +0200

Hi Karl,

Pauls, Karl wrote:
> I’m interested in using external vocabularies with FI. I see
> DecodingTest.testDecodeWithVocabulary() and I’m working with the SAX
> VocabularyGenerator but I don’t yet see a preferred method for
> serializing the vocabulary. I’m assuming that I should simply parse a
> prototypical xml file in order to form the initial vocabulary for each
> FI document that follows. Is that correct?
>
>
>
> Is this part of the API changing or is there anything that I should
> watch out for?
>

I am not sure what you mean by serializing a vocabulary. By their
definition external vocabularies are never serialized and encoded within
an FI document, only a referece to the vocabulary, a URI, is encoded.
Hence they are useful when further message reduction is required,
especially for small messages when the fixed size cost of encoding the
strings is larger.

This URI represents a contract between the producer and consumer of an
FI document. FI does not specify how such a vocabulary is specified
and/or communicated between the producer and consumer.

Currently, in the code for testing purposes i generate the external
vocabulary form the document itself, which is obviously not what would
be done in practice!

An external vocabulary could be specified from a schema, e.g. W3C XML
Schema. FI related tools to generate such vocabularies could be
implemented, e.g. using XSOM [1].


A general vocabulary API that interacts with the parsers/serializers has
not been defined yet. It needs some thought, and any ideas you have on
such an API would be greatly received. One thing i did not want to
dictate was any form of implementation specific requirements on the
vocabulary representation used by parsers and serializers as it is an
area where significant optimization can be performed.

Paul.

[1] https://xsom.dev.java.net/

>
>
> -Karl
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109