cancel
Showing results for 
Search instead for 
Did you mean: 

Empty element value in mapping

steve_coombes
Participant
0 Kudos

Hello,

I would like to map all elements/attributes from one XML message to another where the structure for both messages is the same, but one of the element values is not being populated. The problem element is called 'Description'.

It looks fine in when I 'Display queue' :

Three elements are created as expected but the value is empty for all three when I test :

From the mapping trace:

Start tag [Description]

Add attribute: [xml:lang]=[EN]

Close tag [Description]

From the message schema:

regards

Steve

Accepted Solutions (1)

Accepted Solutions (1)

vinaymittal
Contributor
0 Kudos

change the type of the attribute from xml:lang to xsd:string (the value in red) also change the attribute name from xml:lang to possible just lang

steve_coombes
Participant
0 Kudos

Hello Vinay

Thanks for your suggestion but I'm using an imported schema (cXML) which I would rather not change.


And the lang attribute is being populated. It's the element value which is empty. Would this be affected by the attribute data type?

Steve

stefan_grube
Active Contributor
0 Kudos

You cannot assign values to "description" because it is not an element. It has a sub node.

former_member186851
Active Contributor
0 Kudos

To add more to Stefan comments,

If you assingn value it will show display queue but not in mapping test.

steve_coombes
Participant
0 Kudos

Many thanks to everyone who replied to my question.

I can assign the value from Description to the subnode so Stefan and Raghuraman are correct. I understand that an element with text and child nodes is valid according to the XML standard, so I'm surprised PI does not support it.

The xml namespace is usually available implicitly but is not explicitly defined in my schema which is why PI shows an error. But I don't think this is relevant.

Steve

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Steve is it throwing any error or just no values are coming in the test Tab?

Because there is Red sign in the Schema,Which means there is an issue.