Re: [Xsltforms-support] control of namespaces in submissions
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2017-11-24 18:22:35
|
Hello Habs, Inline instances are first serialized by the XSLT engine then parsed in the browser then, finally, serialized by the browser. There is a known issue in Firefox: namespace axis has never been implemented in its XSLT engine (Transformiix). By default, XSLTForms 1.0 uses the native XML engine for each browser. As a consequence, it cannot be guaranteed by XSLTForms 1.0 that namespace declarations will be precisely at the same locations in the submitted XML data. Why is it a problem for you? --Alain Le 17/11/2017 à 15:49, Habs a écrit : > Hello xsltforms-support > > Question: how to control namespace exposure when submitting an > instance, so that the instance arriving at the sumbission endpoint > reflects exactly the original instance as in the xform ? > > > Considering this snippet from a xform: > > > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:my="http://thisdefaultnamespace" > xmlns:another="http://anothernamespace" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > my:dummy="whyisthisneeded"> > . > . > . > <xf:instance id="thisinstance"> > <root xmlns="http://thisdefaultnamespace" > xmlns:another="http://anothernamespace" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:type="aRootType"> > <child1/> > <child2/> > <section xsi:type="aSectionType"> > <another:child1 /> > <another:child2 /> > </section> > </root> > </xf:instance> > <xf:submission id="submitinstance" method="post" replace="all" > resource="echoitback.script"/> > . > . > . > </html> > > > It would seem that the instance above is a well-formed and valid > document (correct in its namespaces and their exposure etc) when > checked in an accurate xml editor program (xmlspy & editix). > > It seems that the instance document arriving at the specified > destination [submission] resource, has 'xmlns' attributes included > throughout the document in relation to xmlns:another and xmlns:xsi > namespace - e.g. : > > > <root xmlns="http://thisdefaultnamespace" > xmlns:another="http://anothernamespace" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:type="aRootType"> > <child1/> > <child2/> > <section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="aSectionType"> > <another:child1 xmlns:another="http://anothernamespace" /> > <another:child2 xmlns:another="http://anothernamespace"/> > </section> > </root> > > > These added namespace attributes are not required, therefore how is > namespace exposure controlled to prevent this and indeed, is this > too complicated for current xforms I wonder. > > Thank you for any comments, observations, corrections and so forth ? > > Regards > Habs > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |