[Xsltforms-support] Submission losing qname prefixes
Brought to you by:
alain-couthures
From: Klotz, L. <Lei...@xe...> - 2010-04-28 21:58:16
|
If I have an instance which obtains the following by submission GET: <?xml version="1.0" encoding="UTF-8"?> <test xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <class xsi:type="xsd:string" /> <workaround> <xsd:string /> </workaround> </test> And I post it back, it comes out like this, and loses the qname namespace prefix. <test xmlns="" xmlns:pre2="http://www.w3.org/2001/XMLSchema-instance" xmlns:pre3="http://www.w3.org/2001/XMLSchema"> <class pre2:type="xsd:string"></class> <workaround> <pre3:string></pre3:string> </workaround> </test> Note that I put in the workaround <xsd:string /> both in the instance and in the XForms+XHTML host document. XForms is supposed to serialize all the prefixes used in the host document and the instance, because it doesn’t know if any are used in QNames in attribute or element text content. submission/@includenamespaceprefixes is there to allow the form author to override this behavior and to serialize all "visibly-used" prefixes (i.e., on element or attribute names) plus the ones listed in @includenamespaceprefixes, and have the processor ignore the host- and instance- declared prefixes that aren't visibly used. Without @includenamespaceprefixes, I should be getting all the namespace prefixes. Leigh. |