You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi everyone,
I have manage to output my file in xml format and to csv format same fime.
However, now I need help to create xml format to look like as my XSD file.
In my orginal mapping and csv output I am having date in the format "20011-02-17" and if I do directly xml schem as what I am having in my mapping I am having xml output of date in the same format.
However, now I would like to split this date "2011-02-17" to be in the format as Year, Month, Date as seperat row like what I am having in my xsd file , see below:
Also I am having in my mapping colum for LongShor data and I would like my output in xml be split as Long one colum, L , Short , S all in different colum.. example below aswell..
If any chance I can do this even if I am not running full version of ToS I am on free one.
Thanks
Zeljka
---date format---
<xs:complexType name="NexusHistoricValue">
<xs:simpleContent>
<xs:extension base="xs:decimal">
<xs:attribute name="year" type="xs:nonNegativeInteger" />
<xs:attribute name="month" type="xs:positiveInteger" />
<xs:attribute name="day" type="xs:positiveInteger" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
-----------------------------------------------------------------------------------------
--- LongShort format -----------------------------
<xs:element name="LongShort">
<xs:simpleType>
<xs:restriction base="xs:normalizedString">
<xs:enumeration value="Long" />
<xs:enumeration value="L" />
<xs:enumeration value="Short" />
<xs:enumeration value="S" />
</xs:restriction>
</xs:simpleType>
Offline
Hi
The main problem in your case is to split this date "2011-02-17" to be in the format as Year, Month, Date, here I show you a way to split the date. see my screenshots
Best regards
Shong
Offline
Hi Shong,
Your answere is helping a lot to understand how I will split my date format to single format as year, month, day ..
However, my schema is quite complex and I am having one file output in csv, and one xml where I want to split my date.
I am not sure how to fit your example in my work as I am having so many outputs and also mappings.
Please see and I hope you can give me quick advice where actaull I can fit tFixedFlowInput and tjavaFlex in my work.
Thanks
Zeljka
Offline
Hi
I use the tFixedFlowInput to generate a input flow, you don't need it in your case. If I understand your request well, you should put the tJavaFlex between tReplicate and tAdvancedFileOutputXML. First of all, you need know the basic usage of tJavaFlex.
Best regards
Shong
Offline
Pages: 1