W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > September 2007

Re: Proposal for Additions for Namespace Fixup

From: Alex Milowski <alex@milowski.org>
Date: Thu, 6 Sep 2007 15:33:40 -0700
Message-ID: <28d56ece0709061533p1cb405c2vdb7b2d98cabdee8@mail.gmail.com>
To: public-xml-processing-model-wg@w3.org

On 9/6/07, Norman Walsh <ndw@nwalsh.com> wrote:
> / Alex Milowski <alex@milowski.org> was heard to say:
> | This proposal gets us a long way there.
>
> This proposal is of the form, "We're going to spell it all out, and
> here it is. We believe we got it exactly right, we've enumerated every
> possible errors and described precisely what to do in each case."
>
> I had hoped not to attempt to got here.
>
> | In general:
> |
> | "Unless stated otherwise, when a namespace binding is added, a unique prefix
> | is generated."
>
> I'm not sure I understand this rule. Given what follows, does it ever
> apply? What steps "add a namespace binding"?

When you add a namespace declaration and the prefix you'd like to use is
bound to something else.  In that situation, you have to generate a prefix.

I was trying to have a generic statement that says we generate prefixes
when we can use the ones we have.

>
> | "Any element or attribute generated by a step in this library as output
> |  must have a namespace name binding in the in-scope namespaces of that
> |  generated element."
> |
> | 1. p:add-attribute:
> |
> | If a namespace binding does not exist for the namespace name
> | of the attribute, a namespace binding must be added where the prefix
> | from the QName should be used if it is not already bound to another
> | namespace.  Otherwise, the prefix bound to the attribute's namespace
> | in the in-scope namespaces is used in the attribute information item generated.
>
> The "Otherwise" clause here goes with "If a namespace binding does not
> exist...", right? (And especially, not with the second "if" clause.)

Right.

>
> Haven't you overlooked p:pack and p:unescape-markup?

I'll have to look at p:pack.

p:unescape-markup must come from well-formed XML.  As such,
there can't be any undeclared prefixes.

> If we're going to go to this level of detail, do we need to provide a
> step for adding a binding explicitly? Consider the case where you use
> p:string-replace to change an attribute value that happens to contain
> a QName.

Hmm... I suppose that's true.

I wonder if we could all set-attributes to do that...


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 6 September 2007 22:33:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:54 GMT