cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the structure of XSD file imported

former_member187447
Participant
0 Kudos

Hi

I have a requirement where in based on a condition the target structure's line item segment should have multiple occurrences. But the current Target structure which is EDI XSD has only 0..1 occurance which i need to change it to 0 to Unbound, which i am not able to do by going into the edit mode of the external definition. What options do i have to change the structure?

Accepted Solutions (1)

Accepted Solutions (1)

nabendu_sen
Active Contributor
0 Kudos

Hi Kalyan,

Please open the XSD with text pad. Search (Ctrl+F) with the <fieldname>. You will find like below.

<xsd:element name="<fieldname>" type="XXXXXX" minOccurs="0" form="XXXXX">.

change it to like below.

<xsd:element name="<fieldname>" type="XXXXXX" minOccurs="0" maxOccurs="unbounded" form="XXXXX"/>.

SAVE it and reupload it. You can find that the occurrence is changed.

Thanks,

Nabendu.

former_member187447
Participant
0 Kudos

Yeah i tried doing that but for this XSD i dont see max occurance for the segment i am looking for

</xs:annotation>

</xs:element>

<xs:element minOccurs="0" name="S_LIN">

Former Member
0 Kudos

can u tell me what process uhave followed.

chirag

nabendu_sen
Active Contributor
0 Kudos

Hi Kalyan

You can not see Max Occurence. You have to add explicitly like "maxOccurs="unbounded".

Go through my example.

Thanks,

Nabendu.

Former Member
0 Kudos

Hi Kalyan,

The occurence of the XML element is defined with the help of XML attributes minOccurs & maxOccurs.

Since you want the occurence to be 0..unbounded,

Add the "maxOccurs" attribute to your element definition as below:

<xs:element minOccurs="0" maxOccurs="unbounded" name="S_LIN">

This will solve your problem

Regards, Gaurav.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kalyan,

Try with this,

<xs:element name="S_LIN" minOccurs="0" maxOccurs="unbounded">

Thanks,

Former Member
0 Kudos

Hi,

If you dont find the maxOccurs,add it <xsd:element name="Data" minOccurs="0" maxOccurs="unbounded">

Regards,

Phani

Former Member
0 Kudos

use XMLspy or stylo studio tool and follow the process which was told by one of the contributor.

chirag