<html>
  <head>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-forward-container">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <font face="Helvetica, Arial, sans-serif">Hello list,<br>
        I am trying to save features to a PostGIS DB using tinyows.
        Saving geometries alone works fine, updating records works well,
        but as soon as I combine attributes and geometries, I get an
        error from tinyows indicating that the XML is not in the right
        format. I have noticed a difference between the 3 scenarios. For
        instance, when I save a geometry without attributes, I get the
        following: (this works fine)<br>
      </font>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><wfs:Insert>
    <feature:parcels xmlns:feature=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.tinyows.org/">"http://www.tinyows.org/"</a>>
    <feature:geom>
        <gml:MultiSurface xmlns:gml=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a> srsName="EPSG:3857">
        <gml:surfaceMember>
            <gml:Polygon>
                <gml:exterior>
                    <gml:LinearRing>
                        <gml:posList>-10752.....</gml:posList>
                    </gml:LinearRing>
                </gml:exterior>
            </gml:Polygon>
        </gml:surfaceMember>
    </gml:MultiSurface>
</feature:geom>
</feature:washco_parcels>
</wfs:Insert>
</pre>
      <br class="Apple-interchange-newline">
      <br>
      <font face="Helvetica, Arial, sans-serif">And, when I add
        attributes, I get the following: (generates an error to teh
        effect that "<feature:address1>test" is unexpected)<br>
        <br>
      </font>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><wfs:Insert>
    <feature:parcels xmlns:feature=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.tinyows.org/">"http://www.tinyows.org/"</a>>
    <feature:geom>
        <gml:MultiSurface xmlns:gml=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a> srsName="EPSG:3857">
        <gml:surfaceMember>
            <gml:Polygon>
                <gml:exterior>
                    <gml:LinearRing>
                        <gml:posList>-10752.....</gml:posList>
                    </gml:LinearRing>
                </gml:exterior>
            </gml:Polygon>
        </gml:surfaceMember>
    </gml:MultiSurface>
</feature:geom>
<b><feature:address1>test</feature:address1></b>
</feature:washco_parcels>
</wfs:Insert>
</pre>
      <br class="Apple-interchange-newline">
      Finally, if I do a simple UPDATE, I get the following: (works
      fine)<br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><wfs:Update xmlns:demo=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.tinyows.org/">"http://www.tinyows.org/"</a> typeName="demo:parcels">
<wfs:Property>
    <wfs:Name>geom</wfs:Name>
    <wfs:Value>
        <gml:MultiSurface xmlns:gml=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a> srsName="EPSG:3857">
        <gml:surfaceMember>
            <gml:Polygon>
                <gml:exterior>
                    <gml:LinearRing>
                        <gml:posList>-10737.....</gml:posList>
                    </gml:LinearRing>
                </gml:exterior>
            </gml:Polygon>
        </gml:surfaceMember>
    </gml:MultiSurface>
</wfs:Value>
</wfs:Property>
<b><wfs:Property>
    <wfs:Name>objectid</wfs:Name>
    <wfs:Value>18785</wfs:Value>
</wfs:Property></b>
</pre>
      .......<br class="Apple-interchange-newline">
      <br>
      <font face="Helvetica, Arial, sans-serif">The first difference is
        in the namespace used (feature vs wfs). Any reason why it is
        doing so? Another difference is in the way attributes are
        included:<br>
      </font>
      <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><wfs:Property>
    <wfs:Name>objectid</wfs:Name>
    <wfs:Value>18785</wfs:Value>
</wfs:Property></pre>
      vs<br>
      <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><feature:address1>test</feature:address1></pre>
      The third example (using wfs:Property) seems to be the correct way
      to specify information in a WFS file. The first example works fine
      despite not using that format, because I suspect the GML schema is
      more flexible and since it does not have attributes that are not
      geometries, it is considered valid.<br>
      <br>
      So I tried turning off schema checking in the tinyows.xml file and
      the problem payload go through without issues. So this seem to
      indicate that some of the XSD used are strict and don't allow
      attributes to be defined like
      <feature:address1>test</feature:address1>.<br>
      <br>
      So my question is how do I fix this best?<br>
      <ol>
        <li>remove schema enforcing at the tinyows level. Couldn't this
          lead to potential security issues with the server?</li>
        <li>Change the XSD files to allow both ways to define
          attributes. Wouldn't this go against the WFS standard?</li>
        <li>Change the way OL generates the payload. Not sure where it
          does it or how to force it to use a different one.<br>
        </li>
      </ol>
      <font face="Helvetica, Arial, sans-serif"><br>
      </font><font face="Helvetica, Arial, sans-serif">BTW, I am using
        OL 2.12 and Tinyows 1.0.0</font><br>
      thanks!<br>
      Eric<br>
      <br>
      <br>
    </div>
    <br>
  </body>
</html>