OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] RE: Namespaces Best Practice



At 12:28 PM 9/19/2001 -0700, Joe English wrote:
>Don't know if this will be helpful or not, but you should take a
>look at Henry Baker's papers [1] "Shallow Binding in Lisp 1.5" [2]
>and "Shallow Binding Makes Functional Arrays Fast" [3].
>He describes a data structure -- a "rerootable environment tree",
>originally designed to implement dynamic scoping in Lisp --
>that looks like it would be very handy for implementing XML
>namespace scoping rules.

I'll take a look - sounds like material that would solve my (Java) headache.

>You could store a pointer to the namespace environment at
>each node; then when cloning or moving a node you wouldn't
>need to copy any namespace declaration nodes at all, just
>the environment pointer.  When serializing, you could track
>the rerooting process to determine when to emit namespace
>declarations.  Extracting the list of in-scope namespace nodes
>at any point in the tree is also straightforward.

That's more or less the approach I'm hoping to end up with, though I'm 
working with portions of documents, so there may not be a declaration per 
se to point at.  I don't think that makes the overall approach any less 
sound, though.

Simon St.Laurent
Associate Editor
O'Reilly & Associates, Inc.