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

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now