- From: Alex Milowski <alex@milowski.org>
- Date: Fri, 7 Sep 2007 11:12:17 -0700
- To: public-xml-processing-model-wg@w3.org
On 9/7/07, Norman Walsh <ndw@nwalsh.com> wrote: > / Alex Milowski <alex@milowski.org> was heard to say: > | For example, p:insert or p:replace take whole element subtrees > | and put the into another document. If those elements have dependencies > | on in-scope namespaces, you'd break the content if the in-scope namespaces > | aren't copied. If you rely upon namespace fixup, you'd only get > | namespace declarations for the elements and attributes of that subtree and > | not extra ones that exist for the content (as they weren't copied). > > Why? The node that you're inserting has some number of in-scope > namespaces. I'd expect namespace fixup to preserve all of them without > regard to which ones were (or weren't) actually needed on the element > or its descendants. An implementation of p:insert/p:replace that does not perform any namespace fixup in the step could drop very easily omit all the in-scope namespaces that come from ancestors of the inserted or replacement element. That is, they copy only the declarations that exist and ignore the superset that is the in-scope namespaces. I want to avoid this by being explicit in the description of the step and say that in-scope namespace must be preserved. > > Perhaps we should tweak our definition of namespace fixup a little bit > to make that clearer: > > [Definition: Some steps can produce XML documents which could not > have been produced by directly parsing any instance document > (because they contain nodes which have in-scope namespaces that are > not declared or in-scope namespaces with conflicting prefixes, for > example). To represent such a document in a serializable way, 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.] I don't see how this solves the problem. -- --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 Friday, 7 September 2007 18:12:22 UTC