XML schema

One Star

XML schema

Hello,
I am trying to create a schema for my XML file output. The problem with Open Studio is that whenever I have a tag OID, it takes a OID+number!
For example:

<Study OID=" ">
- <GlobalVariables>
<StudyName> </StudyName>
<StudyDescription> </StudyDescription>
<ProtocolName> </ProtocolName>
</GlobalVariables>
- <BasicDefinitions>
- <MeasurementUnit OID="mu.kg" Name="kilogram">
- <Symbol>
<TranslatedText xml:lang="de">kg</TranslatedText>
</Symbol>
</MeasurementUnit>
- <MeasurementUnit OID="mu.cm" Name="centimeter">
- <Symbol>
<TranslatedText xml:lang="de">cm</TranslatedText>
</Symbol>
</MeasurementUnit>
- <MeasurementUnit OID="mu.mg" Name="milligram">
- <Symbol>
<TranslatedText xml:lang="de">mg</TranslatedText>
</Symbol>
</MeasurementUnit>
</BasicDefinitions>

In the outPut format I have, OID, OID1, OID2, OID3
I thank you in advance.
Community Manager

Re: XML schema

Hi
It is impossible to create the attribute tag like OID, OID1, OID2...
You can use the method Numeric.sequence("s1",1,1) to generate the sequence number as a identifier.
For example

<Study OID=" ">
- <GlobalVariables>
<StudyName> </StudyName>
<StudyDescription> </StudyDescription>
<ProtocolName> </ProtocolName>
</GlobalVariables>
- <BasicDefinitions>
- <MeasurementUnit OID="mu.kg" ID=1 Name="kilogram">
- <Symbol>
<TranslatedText xml:lang="de">kg</TranslatedText>
</Symbol>
</MeasurementUnit>
- <MeasurementUnit OID="mu.cm" ID=2 Name="centimeter">
- <Symbol>
<TranslatedText xml:lang="de">cm</TranslatedText>
</Symbol>
</MeasurementUnit>
- <MeasurementUnit OID="mu.mg" ID=3 Name="milligram">
- <Symbol>
<TranslatedText xml:lang="de">mg</TranslatedText>
</Symbol>
</MeasurementUnit>
</BasicDefinitions>

Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: XML schema

Thank you very much