cancel
Showing results for 
Search instead for 
Did you mean: 

data type creation error

Former Member
0 Kudos

Hi,

I create a data type, and i have an element with an attribute, and define some restrictions like minlength, maxlength in the details description of that element, but when i try to create an attribute of this element, an error message pop up "Entries in details column will be deleted. Continue?" if click yes,the attribute is created,but the restriction details are gone, if click no, then the attribute cant be created.

is there any way to solve this issue?

Thanks a lot

Jessica Ding

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

An attribute can be created only for those elements for whom you define only cardinality (occurence)...if you try to define any extra parameters you will get the result which you are getting now.....

So you either define attribute to an element or you define the restrictions and other stuff.

Same is the case with creating Subelements ....just try creating a subelement for an element with type, restrictions and you will see same thing happening

Regards,

Abhishek.

Edited by: abhishek salvi on Apr 21, 2009 7:21 PM

Answers (5)

Answers (5)

Former Member
0 Kudos

it is not possible to mention the minlength, maxlength for an attribute

Former Member
0 Kudos

Hi, ravi

i am working on PI 7.0. i can create an element with minlength and maxlength too, but i cant create an attribute of this element , can you do that in XI 3.0?

Thanks a lot

Jessica Ding

former_member181962
Active Contributor
0 Kudos

Yes I am able to do that.

I place my cursor on my element.

From the menu, i say Insert Attribute.

Give a name and type.

Double click on the details column and give the min and max lengths.

Regards,

Ravi

Former Member
0 Kudos

Hi, ravi

actually even i set the element type as xsd:string, and then set the minlength, maxlength, i still met this issue.

Hi, madhav

my actually data type is really complex, so i just try a really simple one, like:

<EmpDetail>

<name></name>

<telphone></telphone>

<empid></empid>

<address zipcode=""></address>

</EmpDetail>

if i set minlength,maxlength of address element, and try to create the zipcode attribute i will get that issue.

Thanks a lot

Jessica Ding

former_member200962
Active Contributor
0 Kudos
actually even i set the element type as xsd:string, and then set the minlength, 
maxlength, i still met this issue.
if i set minlength,maxlength of address element, and try to create the zipcode attribute 
i will get that issue.

You should not (rather you cannot) do this.....you cannot set anything other than Occurence for an element if you want to define an attribute under it....there is no workaround for this.

Regards,

Abhishek.

former_member181962
Active Contributor
0 Kudos

Hi ,

Which version of XI are you on?

I am on XI 3.0 and I am able to define the details like minlength and maxlength for an element of a data type.

Regards,

Ravi Kanth Talagana

former_member181962
Active Contributor
0 Kudos

Hi,

If you are trying to create an element of Integer type and provide Details like min length and max length, which are relevant only for xsd: string, then you lose the information provided in the details column.

Otherwise, there should not be any issue.

Regards,

ravi

Former Member
0 Kudos

hi,

can you please mention the exact Structure u required?