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

Re: Towards a consensus draft (urgent)

From: Alex Milowski <alex@milowski.org>
Date: Mon, 10 Sep 2007 12:32:14 -0700
Message-ID: <28d56ece0709101232m3dd2336ep9517fc5427069f3c@mail.gmail.com>
To: public-xml-processing-model-wg@w3.org

On 9/10/07, Norman Walsh <ndw@nwalsh.com> wrote:
> / Alex Milowski <alex@milowski.org> was heard to say:
> | On 9/10/07, Norman Walsh <ndw@nwalsh.com> wrote:
> |> Dear Working Group,
> |>
> |> Please review the latest editor's draft (or at least sections 2.2 and
> |> the new 2.6.1, as well as p:label-elements) and *if you do not believe
> |> that we can go to Last Call with this draft* please *comment in email*
> |> as soon as possible.
> |
> | None of my proposal on having the steps "do the right thing" is in
> | this draft.  If
> | we can't (or don't want) to mandate that steps do the right thing, at least we
> | should add them as "should/may" or example of avoiding namespace
> | fixup.
>
> The whole point of 2.6.1 is to say globally, in one place, that all
> relevant fixup may be performed between each step and must be
> performed when documents are serialized.
>
> I think that all of the specific changes that you proposed for individual
> steps are covered by the statements now present in 2.6.1:
>
>    ...In particular, the information corresponding to the [Infoset]
>    properties [attributes], [base URI], [children], [local name],
>    [namespace name], [normalized value], [owner], and [parent] *must* be
>    preserved.
>
>    The information corresponding to [prefix], [in-scope namespaces],
>    [namespace attributes], and [attribute type] *should* be preserved,
>    with changes to the first three only as required for namespace
>    fixup. In particular, processors are encouraged to take account of
>    prefix information in creating new namespace bindings, to minimize
>    negative impact on prefixed names in content.

They aren't completely covered.  In some cases you (unwrap & rename),
you want to "push down" the in-scope namespace to preserve for the children
elements.   You'd need to add a "should" statement about that to cover that
case too.

>
> bearing in mind that namespace fixup says:
>
>    [Definition: Some steps can produce XML documents which have no
>    direct serialization (because they include nodes with conflicting
>    or missing namespace declarations, for example). To produce a
>    serializable XML document, the XProc processor must sometimes add
>    additional namespace nodes, perhaps even renaming prefixes, to
>    satisfy the constraints of Namespaces in XML. This process is
>    referred to as namespace fixup.]
>
> The advantage of these global statements over more specific ones is
> twofold: first, they apply to all of the changes that are necessary,
> even ones that may accidentally be left out a specific, per-step list
> of requirements and second, they apply not only to our steps but to
> implementation- and user-defined steps as well.

I'm fine with having a global statement but I really prefer we define a
repeatable behavior.  In each of the cases I outline a reasonable
strategy for both preserving and generating namespace declarations so
that namespace fixup does not have to occur.

> | We can't quite go to last call without addressing this.
> | p:add-attribute had a statement
> | about adding a namespace declaration and that is now labeled "FIXME".   Up until
> | now, no one has had issue with that sentence.
>
> Oversight. I should have deleted that sentence. It's now covered by
> 2.6.1.

I really believe our steps should not to generate infosets that
require namespace fixup.  In most cases, a simple statement would
suffice.

For example, XSLT 2.0 for xsl:element says:

"The prefix of the lexical QName specified in the name attribute (or
the absence of a prefix) is copied to the prefix part of the
expanded-QName representing the name of the new element node. In the
event of a conflict a prefix may subsequently be added, changed, or
removed during the namespace fixup process (see 5.7.3 Namespace
Fixup)."

XSLT 2.0 also has many options for handling namespaces in the
transformation a gives
control back to the stylesheet author.  See:

   http://www.w3.org/TR/xslt20/#xsl-element

-- 
--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 Monday, 10 September 2007 19:32:35 GMT

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