- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Tue, 27 Jan 2009 19:48:08 -0800
- To: Forms WG <public-forms@w3.org>
- Cc: xforms <www-forms@w3.org>
Good point. For reference, XInclude, XSLT 2 and XProc all have a notion of namespace fixup: http://www.w3.org/TR/xinclude/#namespaces http://www.w3.org/TR/xproc/#namespace-fixup http://www.w3.org/TR/xslt20/#namespace-fixup What happens upon insertion in XForms is similar to the operations described in those specifications. We should get some inspiration from them. -Erik On Jan 26, 2009, at 5:27 PM, John Boyer wrote: > > In bullet 6 of the insert action [1], it states that the origin > nodes are cloned. Step 8 then describes inserting the cloned nodes > into the XForms instances. > > [1] http://www.w3.org/MarkUp/Forms/specs/XForms1.1/index-diff.html#action-insert > > The specification assumes that the cloning/inserting will be done in > a way that preserves the integrity of the cloned nodes with respect > to XML namespaces. This is based on the statement that XForms is > backed by an XPath data model. However, since many implementations > use DOM machinery to implement, it is worth clarifying the > difference between simple DOM cloning versus what is actually > expected. > > For example, suppose you have an origin node E in the following > context: <prototypes xmlns="abc"> <E>hello</E> </prototypes> > > Now suppose you insert it into live data as follows: <livedata > xmlns="xyz"> </livedata> > > The question has arisen which of the two results is obtained: > > A) <livedata xmlns="xyz"> <E>hello</E> </livedata> > B) <livedata xmlns="xyz"> <E xmlns="abc">hello</E> </livedata> > > The answer should be choice B, since an element in the XPath data > model is defined by its local name plus its namespace URI. > > Further it is easier to see that this should be the case for > consistency with the following example. > > Suppose you have an origin node E in the following context: > <prototypes xmlns:e="abc"> <e:E>hello</e:E> </prototypes> > > Now suppose you insert it into live data as follows: <livedata > xmlns="xyz"> </livedata> > > A) <livedata xmlns="xyz"> <e:E>hello</e:E> </livedata> > B) <livedata xmlns="xyz"> <e:E xmlns:e="abc">hello</e:E> </livedata> > > It is clear that answer B is correct since answer A, where there is > an absence of proper namespace processing in the cloning process, > results in an XML well-formedness violation. > > John M. Boyer, Ph.D. > STSM, Interactive Documents and Web 2.0 Applications > Chair, W3C Forms Working Group > Workplace, Portal and Collaboration Software > IBM Victoria Software Lab > E-Mail: boyerj@ca.ibm.com > > Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer > Blog RSS feed: http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/
Received on Wednesday, 28 January 2009 03:48:50 UTC