Paul Sandoz wrote:
>> Let's see. JAXB can probably symbolize or intern prefix, namespace URIs,
>> and local names. We can also tell you when prefix->namespace binding
>> begins and ends, but I guess that's something any SAX event generator
>> can tell you.
>>
>> JAXB doesn't maintain the 3-tuple, and I don't know if doing that inside
>> the JAXB RI is any easier/faster than doing it inside the FI writer.
>
> If a unique object (could be static) could be associated with each
> 3-tuple then it is possible to use a hash table with this object to
> return an index. Currently the impl is using a hash table on the local
> name (for Sax it could use the <prefix>:<localName> which is more
> efficient) and then check that the prefix and namespace names match
> (checking references first before performing String.equals.
I think JAXB can give you an unique object for each namespace URI /
local name pair, since in the typical case we know all such possible
pairs long before the marshaling starts.
But to maintain unique objects for 3-tuple, most likely we end up
creating a Map just like FI does it today. If we can communicate that
both URI and local names are interened, is there any boost in doing this
inside the JAXB RI, instead of the FI writer?
> This may however require that an extention to SAX or StAX be used that
> is specific to FI.
>
> Such objects may also be useful for an external vocabulary feature. An
> index could be part of this object which defined the external vocabulary
> index for the 3-tuple.
>
> Paul.
>
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_fi.dev.java.net
For additional commands, e-mail: dev-help_at_fi.dev.java.net