dev@fi.java.net

Vocabulary API

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 04 Feb 2005 16:15:33 +0100

Hi,

Below is an outline of the vocabulary API (see below).

I have tried to keep the concept of vocabulary very simple while
allowing for implementations to optimize the internal details. Thus a
vocabulary implementation will be closely associated with the parser and
serializer implementation.

Before a parse or serialize it should be possible to set external,
initial and dynamic vocabularies

After a parse or serialize it should be possible to obtain the dynamic
and final vocabulary.

Such functionality would allow:

- for the reuse of external and initial vocabularies.

- reuse of a dynamic vocabulary over multiple serializations and parses
for specially optimized networked applications then only use a common
vocabulary but do not want to use an external vocabulary.

- simple tools to produce an external vocabulary from an XML document or
a fast infoset document e.g an document on the network.


Alan, for binary X3D documents it might be possible to use a well-formed
XML document that when converted to a fast infoset document produces a
final vocabulary that is used as the external vocabulary detailed in the
X3D specification. After all it is just a matter of putting the
namespaces, EIIs and AIIs in the correct order.

Paul.


vocabulary factory

        create vocabulary


vocabulary

        set/get table

        clear


referenced vocabulary

        set/get URI

        set/get vocabulary


generic serializer
        // before serialize

        set external vocabulary

        set initial vocabulary

        set dynamic vocabulary

        // after serialize

        get dynamic vocabulary

        get final vocabulary
        

generic parser
        // before parse

        set hash of external vocabularies

        set dynamic vocabulary

        // after parse

        get external vocabulary

        get initial vocabulary

        get dynamic vocabulary

        get final vocabulary

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