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 11:52 AM 9/20/2001 -0700, David Brownell wrote:
>Tree-trickery may not be possible in the context of stream
>based processing.  Sometimes "minimizing the decls" isn't
>an achievable goal.  You may end up adding a few decls
>in case they're needed later, but it turns out they aren't.

Sure.  What makes the work I'm doing now (which spun off the Regular 
Fragmentations project) fun is that I'm mixing trees and streams.  Damming 
the flow of events and creating structures, then releasing the dam and 
letting the structures flow out as events again.

In that context, tree-trickery can work quite nicely.  Since I don't 
necessarily have the entire tree, though, keeping track of namespace 
contexts from the event stream may be important and can add more 
information to the tree-trickery.  (I like that phrase!)

>"Minimizing the decls" is a global optimization problem,
>or an interesting way to compare policies.  The problem
>may not need to be solved; even when people look at
>the documents directly, it's not the same as "easy to
>understand" (which is an individualized issue, also very
>context-dependant, that sometimes values redundancy).

The optimizations I'm hoping to achieve are designed largely to minimize 
the impact of using Regular Fragmentations on a given target document.  I'd 
rather not double the size of a document if it gets re-serialized because 
of massively redundant namespace declarations.

More generally, I'd like these tools to support a number of different 
options which might be appropriate in particular contexts.

> > Finally, I don't think variable-scoping is a useful comparison for
> > namespace-scoping in XML documents.
>I was going for accuracy in explaining the name binding rules.
>Actually using those names is a different issue.

I suppose, though I'm not sure quite how you think it adds accuracy.

> >        Variable  scoping  is nicely contained by the logic of program
> > flow, while namespace scoping may be much more arbitrary.
>I guess I don't see that.  They're both used to characterize data;
>the scoping requirements aren't very different.  (The same values
>can be found in many variables ...)  Or are you maybe suggesting
>that most documents don't have lots of namespaces in use, while
>most programs have many variables?

No, I'm suggested that variable scope in programs is much simpler than 
namespace usage in documents, especially complex documents using things 
like XLink or xsi:type.  The scopes inside of programs don't typically 
cross-link that way, and you'd not normally think of defining variable 
scopes at the beginning of the entire program.

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