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

Re: Towards a consensus draft (urgent)

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 10 Sep 2007 16:03:34 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2d4wqxp7t.fsf@nwalsh.com>
/ Murray Maloney <murray@muzmo.com> was heard to say:
| At 01:06 PM 9/10/2007 -0400, Norman Walsh wrote:
|>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.]
| Can anyone produce a pipeline that exemplifies the process known as
| "namespace fixup"?

I'm not exactly sure what you mean, but consider this pipeline:

<p:pipeline name="main" xmlns:p="...">

<p:input port="source1">
    <ex:document xmlns:ex="http://example.com/ns/ex">
        <ex:title>Chapter title</ex:title>

<p:input port="source2">
    <my:document xmlns:my="http://example.com/ns/my">

<p:viewport match="in:placeholder"
    <p:pipe step="main" port="source2">
    <p:input port="source" select="/out:document/out:chapter"
      <p:pipe step="main" port="source1"/>


What is the result of this pipeline? It's something like this:

<my:document xmlns:my="http://example.com/ns/my">
    <ex:title>Chapter title</ex:title>

Note in particular that the "ex:chapter" element, lifted out of its
original context, is still in the "http://example.com/ns/ex"
namespace. But we didn't copy any elements that had namespace
attributes which declared that the "ex" prefix was bound to that

There's nothing wrong with this document, as an object model or
infoset. But there's no direct serialization of this document that you
can use to recreate it. You need to perform namespace fixup. For

<my:document xmlns:my="http://example.com/ns/my">
  <ex:chapter xmlns:ex="http://example.com/ns/ex">
    <ex:title>Chapter title</ex:title>

This sort of thing can arise in various ways with a number of our

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | It is important what a man still plans
http://nwalsh.com/            | at the end. It shows the measure of
                              | injustice in his death.--Elias Canetti

Received on Monday, 10 September 2007 20:03:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:44 UTC