Set field as mandatory

Hi,
I'm saving a datawindow result set in a XML file (export). I
would like to define some elements (or fields) as mandatory.

I get this:
<xsd:element name="Name" type="xsd:string" />

I would like to know how can I define an element as
mandatory in the datawindow, and get the following result:

<xsd:element name="Name" type="xsd:string" nillable="false"
minOccurs="1" maxOccurs="1" />

Best regards,
Joana Carvalho
0
Joana
11/30/2009 2:14:07 PM
sybase.powerbuilder.xml 546 articles. 0 followers. Follow

4 Replies
481 Views

Similar Articles

[PageSpeed] 53

Hi Joana,

Did you try changing the properties of the field in the datawindow painter 
(on the Edit tab, check the box next to 'Required') to required?

Paul


<Joana Carvalho> wrote in message 
news:4b13d32f.7b69.1681692777@sybase.com...
> Hi,
> I'm saving a datawindow result set in a XML file (export). I
> would like to define some elements (or fields) as mandatory.
>
> I get this:
> <xsd:element name="Name" type="xsd:string" />
>
> I would like to know how can I define an element as
> mandatory in the datawindow, and get the following result:
>
> <xsd:element name="Name" type="xsd:string" nillable="false"
> minOccurs="1" maxOccurs="1" />
>
> Best regards,
> Joana Carvalho 


0
Paul
11/30/2009 9:13:17 PM
Hi Paul,
Yes I tried it. Maybe I'm not selecting the correct XML
options?
Regards,
Joana

> Hi Joana,
>
> Did you try changing the properties of the field in the
> datawindow painter  (on the Edit tab, check the box next
> to 'Required') to required?
>
> Paul
>
>
> <Joana Carvalho> wrote in message
> news:4b13d32f.7b69.1681692777@sybase.com...
> > Hi,
> > I'm saving a datawindow result set in a XML file
> > (export). I would like to define some elements (or
> fields) as mandatory. >
> > I get this:
> > <xsd:element name="Name" type="xsd:string" />
> >
> > I would like to know how can I define an element as
> > mandatory in the datawindow, and get the following
> result: >
> > <xsd:element name="Name" type="xsd:string"
> > nillable="false" minOccurs="1" maxOccurs="1" />
> >
> > Best regards,
> > Joana Carvalho
>
>
0
Joana
12/1/2009 10:15:03 AM
Joana,

I am somewhat green in this area.  Can I ask you what you are trying to 
achieve?  It seems like you are trying to create a schema and or web 
service?  Would not creating a webservice target (I use PB 11.2) generate a 
WSDL that specificies what is required and what is not?

If you are simply saving data in XML format, the datawindow itself should 
enforce what is required befor you invoke the save, no?

Paul


<Joana Carvalho> wrote in message 
news:4b14eca7.4383.1681692777@sybase.com...
> Hi Paul,
> Yes I tried it. Maybe I'm not selecting the correct XML
> options?
> Regards,
> Joana
>
>> Hi Joana,
>>
>> Did you try changing the properties of the field in the
>> datawindow painter  (on the Edit tab, check the box next
>> to 'Required') to required?
>>
>> Paul
>>
>>
>> <Joana Carvalho> wrote in message
>> news:4b13d32f.7b69.1681692777@sybase.com...
>> > Hi,
>> > I'm saving a datawindow result set in a XML file
>> > (export). I would like to define some elements (or
>> fields) as mandatory. >
>> > I get this:
>> > <xsd:element name="Name" type="xsd:string" />
>> >
>> > I would like to know how can I define an element as
>> > mandatory in the datawindow, and get the following
>> result: >
>> > <xsd:element name="Name" type="xsd:string"
>> > nillable="false" minOccurs="1" maxOccurs="1" />
>> >
>> > Best regards,
>> > Joana Carvalho
>>
>> 


0
Paul
12/1/2009 8:48:49 PM
Hi Paul,
My objective is to get an xml file with the schema and the
rows.
I have something like this:
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="pf_position_openarea" type="xs:string"
/>
  <xs:element name="pf_position_opendate" type="xs:dateTime"
/>
  <xs:element name="vessels_cal_sdwt" type="xs:double" />
  <xs:element name="vessels_cal_cbm" type="xs:int" />
  <xs:element name="area_area_name" type="xs:string" />
  </xs:schema>
Apart of the field type I would like to join the information
mandatory=yes/no.
I will try to do some more testing.
Best regards,
Joana Carvalho

> Joana,
>
> I am somewhat green in this area.  Can I ask you what you
> are trying to  achieve?  It seems like you are trying to
> create a schema and or web  service?  Would not creating a
> webservice target (I use PB 11.2) generate a  WSDL that
> specificies what is required and what is not?
>
> If you are simply saving data in XML format, the
> datawindow itself should  enforce what is required befor
> you invoke the save, no?
>
> Paul
>
>
> <Joana Carvalho> wrote in message
> news:4b14eca7.4383.1681692777@sybase.com...
> > Hi Paul,
> > Yes I tried it. Maybe I'm not selecting the correct XML
> > options?
> > Regards,
> > Joana
> >
> >> Hi Joana,
> >>
> >> Did you try changing the properties of the field in the
> >> datawindow painter  (on the Edit tab, check the box
> next >> to 'Required') to required?
> >>
> >> Paul
> >>
> >>
> >> <Joana Carvalho> wrote in message
> >> news:4b13d32f.7b69.1681692777@sybase.com...
> >> > Hi,
> >> > I'm saving a datawindow result set in a XML file
> >> > (export). I would like to define some elements (or
> >> fields) as mandatory. >
> >> > I get this:
> >> > <xsd:element name="Name" type="xsd:string" />
> >> >
> >> > I would like to know how can I define an element as
> >> > mandatory in the datawindow, and get the following
> >> result: >
> >> > <xsd:element name="Name" type="xsd:string"
> >> > nillable="false" minOccurs="1" maxOccurs="1" />
> >> >
> >> > Best regards,
> >> > Joana Carvalho
> >>
> >>
>
>
0
Joana
1/7/2010 8:07:17 AM
Reply: