cancel
Showing results for 
Search instead for 
Did you mean: 

External definition: attributes mixed up?

Former Member
0 Kudos

Hi

I have an external definition imported and it looks like the following:

<xsd:element name="PayloadEntry">

<xsd:complexType>

<xsd:attribute name="format" type="xsd:string"

use="required" />

<xsd:attribute name="operation" type="xsd:string"

use="required" />

<xsd:attribute name="type" type="xsd:string"

use="required" />

</xsd:complexType>

</xsd:element>

When I send a message using this External Definition.

The order of the attributes of element PayloadEntry are changed in format, type, operation. (in External Definition it is format, operation, type)

Is this critical? How/Why can this happen?

Best Regards

Ron

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ron,

Most of the time this should not cause any issues in the integration scenario. However if the receiving end is particular in the sequence of incoming attributes, you will need to make some changes to the XSD.

Regards,

Ashish

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

This can happen, as the sequence of the attributes is not fix. This should not be a problem. Otherwise you have to define a sequence inside the XSD.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Do you know how to add a sequence for attributes? I wanted to add an AttributeGroup, But I have some problems with this importing in in XI and validating it in StylusStudio

Ron

Former Member
0 Kudos

Hi Ron,

Try using the following code:

<xsd:element name="PayloadEntry">

<xsd:complexType>

<xsd:sequence>

<xsd:attribute name="format" type="xsd:string"

use="required" />

<xsd:attribute name="operation" type="xsd:string"

use="required" />

<xsd:attribute name="type" type="xsd:string"

use="required" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

Pls acknowledge of this works.

Regards,

Ashish

Former Member
0 Kudos

Hi Ron,

I was witing for your reply.

Regards,

Ashish

Former Member
0 Kudos

Hi,

This doesn't work. I get the error

<attributeGroup> must have a name or a ref attribute - declaration ignored

in StylusStudio

Any Ideas how to continue?

Best Regards

Ron

former_member206604
Active Contributor
0 Kudos

Hi Ron,

<XSD:SEQUENCE> will not work for "attributes".

There should not be any problem because of this as you see the nodes can be read say FirtNode or LastNode or Node[index] but an attribute is read only by the name. There is nothing called 1st attribute or 2nd attribute. So the order will not be a problem in anycase.

Regards,

Prakash

Former Member
0 Kudos

Hi,

Thanks for the info. I got almost the same answer on the StylusStudio forum.

What you describe about the Nodes and Attributes is general XML processing? My counterpart of the receiving system tells me that the order of the attributes is critical...

I will discuss it also with him.

Best Regards

Ron

former_member206604
Active Contributor
0 Kudos

Hi Ron,

Yes thats how generally XML works. Anyways were you able to figure out why the order is being changed. Anyways you can discuss with them and it should not be a problem.

Attribute can either be optional of mandatory but there is no order for that.

Regards,

Prakash