XSD default property

Hi All,

Good evening.

I have a requirement where I need to send blank as an output for a String field whenever the field doesn’t have a value.

Example: In a document has three string field string1,string2 and string3 … String n .

When string 1 has value I need to set other fields from String 2 to n as blank ,
When String 1 and 2 has value ,then I need to set fields other than string 1 and 2 as blank.

We can hard code the value by using branch condition but doing the same for many fields may be tedious as the number of output field is more than 100.

I came across an XSD property default ,where a field can take a default value in case if doesn’t contain any value. But the same is not working for me in wM.

Any idea would be helpful. Right now ,we are hardcoding blanks for evry condition.

Thanks,
Sathya

Hi Sathyaraj,

what is your wM Version?

What is the source of this document?

One option might be to use a XSLT-Transformation here (check WmXSLT package).

If you are mapping from one document to another you can pre-initialize the target with all fields to blank and then map the fields which are filled. Copy Conditions on the mapping might be helpful as well.

Check Designer-Users-Guide for hints on this.

Regards,
Holger

Hi ,

it is version 9.0 and the source of document is xsd created using altova xml spy.

Pre-intialize option is helpful.

Thanks,
Sathya

Hi Sathyaraj,

I was not referring to how the doc type was created, but more likely to the origin of the contents of the strings.

Creation of the doc type from xsd is straight forward in this case.

Regards,
Holger