[Xsltforms-support] empty namespace created on submission
Brought to you by:
alain-couthures
From: Stephen C. <Ste...@ut...> - 2010-03-24 01:19:56
|
Hello, I have a problem that is created due to my need to avoid a server side error. This relates to the server declaring invalid any xml that contains the same gml:id attribute twice. As a quick workaround to avoid this problem I can just globally delete the gml:id attribute before submission, however this has the effect of creating a namespace declaration in the submitted xml as follows: xmlns:pre3="" This is also rejected by the server with the message "Prefixed namespace bindings may not be empty". The following xform is a simplified example of what I am doing. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:aatams="http://www.imos.org.au/aatams" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml"> <head> <xf:model id="m1"> <xf:instance id="data"> <wfs:Insert> <wfs:FeatureCollection> <gml:featureMember> <aatams:device> <aatams:name>device-1</aatams:name> <aatams:device_model> <aatams:device_type gml:id="aatams.device_type.1"> <aatams:name>RECEIVER</aatams:name> </aatams:device_type> </aatams:device_model> </aatams:device> </gml:featureMember> <gml:featureMember> <aatams:device> <aatams:name>device-2</aatams:name> <aatams:device_model> <aatams:device_type gml:id="aatams.device_type.1"> <aatams:name>RECEIVER</aatams:name> </aatams:device_type> </aatams:device_model> </aatams:device> </gml:featureMember> </wfs:FeatureCollection> </wfs:Insert> </xf:instance> <xf:instance id="response"> <dummy xmlns=""/> </xf:instance> <xf:submission id="s01" ref="instance('data')" method="post" action="../../deegree-wfs/services" replace="instance" instance="response"> <xf:action ev:event="xforms-submit"> <xf:delete nodeset="instance('data')//@gml:id" /> </xf:action> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> </xf:model> </head> <body> <xf:submit submission="s01"> <xf:label>Submit</xf:label> </xf:submit> </body> </html> The xml arriving at the server is as follows: <Transaction xmlns="http://www.opengis.net/wfs" xmlns:pre1="http://www.opengis.net/gml" xmlns:pre2="http://www.imos.org.au/aatams" xmlns:pre3="" version="1.1.0" service="WFS"> <Insert> <FeatureCollection> <pre1:featureMember> <pre2:device> <pre2:name>device-1</pre2:name> <pre2:device_model> <pre2:device_type> <pre2:name>RECEIVER</pre2:name> </pre2:device_type> </pre2:device_model> </pre2:device> </pre1:featureMember> <pre1:featureMember> <pre2:device> <pre2:name>device-2</pre2:name> <pre2:device_model> <pre2:device_type> <pre2:name>RECEIVER</pre2:name> </pre2:device_type> </pre2:device_model> </pre2:device> </pre1:featureMember> </FeatureCollection> </Insert> </Transaction> I am hoping that this is a quickly fixed, if not please advise. Thanks -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |