membrane / soa-model

Toolkit and Java API for WSDL, WADL and XML Schema.
http://www.membrane-soa.org/soa-model/
Apache License 2.0
93 stars 73 forks source link

Refactor method getForm() in Element #157

Closed keshavarzi closed 10 years ago

keshavarzi commented 11 years ago

getForm() returns the result of the FormCreator for the respective element. Steps to do:

  1. Rename the method to getHTMLForm()
  2. getForm() should return the value of the form attribute of the element, if available.
keshavarzi commented 11 years ago

Thanks paulo for reporting this bug in the mailing list: https://groups.google.com/forum/#!topic/soa-model/GgAnvUBQqX0 Paulo wrote:

Hello,

I'm trying to get the value of "form" attribute from an element in my wsdl and I'm getting something unexpected.

The snippet:

...
<xs:complexType name="myType">
<xs:sequence>
<xs:element form="qualified" minOccurs="0" name="myElem" type="xs:string"/>
</xs:sequence>
</xs:complexType>
...

My code:

element.getForm();

Result:

<table>
  <tbody id='xpath:/Value' minOccurs='1' maxOccurs='1'>
    <tr>
      <td colspan='2'>
        <b>Value (1..1)</b>
      </td>
    </tr>
    <tr>
      <td width='100'>
        <input name='xpath:/Value' type='text' />
        <span />
        <br />
      </td>
    </tr>
  </tbody>
</table>
pcmnac commented 11 years ago

Thanks for the great support!

keshavarzi commented 10 years ago

Has to be implemented in SchemaCreator.