dev@fi.java.net

Re: Vocabulary API

From: Alan Hudson <giles_at_yumetech.com>
Date: Fri, 04 Feb 2005 09:29:17 -0800

Paul Sandoz wrote:

>
>Ah, there is a bug in my thinking i cannot see how external vocabulary
>URIs would get added thus an extra step is required for this :-(
>
>Yes, some additional information for encoding algorithms to be added to
>the table is required. Hmm... obviously this information needs to be
>filtered from the XML document before a vocab is generated, a simple SAX
>filter would do it, while it is filtering out the algorithms it could be
>adding them to the table.
>
>
My initial efforts at mapping encodings where based on using a simple
mapping, ie for attributes named "coord" use this algo. In the end
I had to go one further, which was a element.attribute lookup. Some of
the fields in X3D have the same name but different types.

This is likely how I will handle compressing files in a fast manner.

For maximum compression requests, my current thinking is to dynamically
discover the datatype. Ie take the value, find the smallest
representation possible. So "0.000000" would be stored as a byte, value
0. Or the string "ABCABCABCABCABC" might use a pattern matching algo
like lzw. In this case I wouldn't use the table supported algo URL.

But I expect I will have to have both as the second method is much
slower encoding the documents.