cancel
Showing results for 
Search instead for 
Did you mean: 

data type clarification

Former Member
0 Kudos

Hi y'all,

What is the primary used of an xsd:token data type? If a target element declared as xsd:token of min length – 1 and max length – 8 be mapped to an xsd:string element in the source?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I dont think its possible to map the sourse and target which are of two different types

unless you change the Type of one of the following fields in the structure

Amaresh

Former Member
0 Kudos

Hi,

According to me it should give an error

Amaresh

Former Member
0 Kudos

Hi,

The mapping which you are doing defines like that and the mapping rules which you are using it is right then it should be fine.... but i guess usually type should be the same of source and target message...

Amaresh

Former Member
0 Kudos

So if I understand correctly, if an element created with data type xsd:token (size 😎 has a data of “MONITOR “ with a space in the end and is mapped to a xsd:string target element would result in an error?

Former Member
0 Kudos

Hi,

As far as I'm concerned there should be an error.

Regards,

Wojtek

Former Member
0 Kudos

Thanks that what I was able to simulate and error it..What is the best possible fix when the source is a string with 8 chars and target is a token of 8 chars. I need to put in a logic which will work even if input data has some trailing spaces.

Former Member
0 Kudos

Hi,

1) Is it possible to change target structure string?

2) if it's no possible it will be quite hard, you can replace space with underscore '_' for numbers you can add leading zeros

Regards,

wojtek

Former Member
0 Kudos

Hi,

If you guarantee that your mappin fulfill the definition there will be no errors in other case you should get an error.

token represents tokenized strings. The ·value space· of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The ·lexical space· of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The ·base type· of token is normalizedString.

Regards,

Wojtek