IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: guest
About
User Name: guest
Forum Rank: Guest
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Tuesday, December 13, 2005
Last Visit: Monday, July 13, 2020 5:03:28 AM
Number of Posts: 0
[0.00% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: XSLT conditional mapping on loop
Posted: Sunday, August 27, 2017 4:48:03 AM
Source Xml :
<LotDetails>

<GCode>Ship</GCode>

<ProductQuantity>2</ProductQuantity>
</LotDetails
<LotDetails>
<GCode>Reject</GCode>

<ProductQuantity>4</ProductQuantity>
</LotDetails>
<LotDetails>
<GCode>Gross</GCode>

<ProductQuantity>3</ProductQuantity>
</LotDetails>
<LotDetails>
<GCode>Acceptable</GCode>

<ProductQuantity>5</ProductQuantity>
</LotDetails>

TargetXml Field :
<LotQty>

Here the condition to check to map the target field is :

If LotDetails/GCode = "Acceptable" and the corresponding ProductQuantity (null and zero)
<LotQty> --> 5 [taken from the corresponding ProductQuantity ]

else if LotDetails/GCode = "Ship" and the corresponding ProductQuantity not (null and zero)
<LotQty> --> 2

else if LotDetails/GCode = "Gross" and the corresponding ProductQuantity not (null and zero)
<LotQty> --> 3
else
<LotQty> --> 0


Here the LotQty should happen only once based on any of the conditions
Please let know xslt experts on the best way to do this ?


Topic: How to map a xml file to text file if the file having multiple batches information
Posted: Wednesday, February 11, 2015 6:50:58 AM
Thanks pfisher44 and island

I got the above first part as on your guidlines.


Thank you once again.


Could you please help me on the second part of the above question

i.e. How to map a constant value to the end of a file multiple times based on the no of count(This count will tell to the no of lines added in the file).


Thanks in Advance.
Topic: How to map a xml file to text file if the file having multiple batches information
Posted: Tuesday, February 10, 2015 1:31:03 PM
Hi,

I would like to map xml file to a text file. Please find the attached files

CompanyInfo.xml - Input xml files

CompanyOutput.txt - Output text file.

Input file will be in the following structure

a)Each File Contains one FileHeader and File Control Record
b) Each File Contains Multiple Batches.
c) Each Batch Contains Multiple EntryDetails

Expected Output file should be in the following Manner.
FileHeaderInformation
FirstBatchHeaderInformation
EntryDetailInfomationLine1
EntryDetailInfomationLine2
EntryDetailInfomationLine3
FirstBatchControlInformation
SecondBatchHeaderInformation
EntryDetailInfomationLine1
EntryDetailInfomationLine2
SecondBatchControlInformation
FileControlInfomation

i have created Flex Text by using Altova Mapforce Flex Text in delimited floating based mode.
After executipon, Im getting the output in this manner.

FileHeaderInformation
FirstBatchHeaderInformation
SecondBatchHeaderInformation
EntryDetailInfomationLine1
EntryDetailInfomationLine2
EntryDetailInfomationLine3
EntryDetailInfomationLine1
EntryDetailInfomationLine2
FirstBatchControlInformation
SecondBatchControlInformation
FileControlInfomation

Could you please help me to get the expected output

2) Each and Every batch contains 10 EntryDetailInformation. if the block doesnt have 10 records, then need to append value "99999" to the file.

Let me take an example if the file having 2 batches with 15 records, then i need to add 5 lines of value "99999" to the file.
i.e. batchcount*10 = no of lines in a file.
i.e. 2*10 = 20 (lines in a file).

Could u please help me how to append a value dynamically no of lines to the file.


Thanks in Advance.


Topic: How to Iterate multiple elements to a single database table in xml - db mapping
Posted: Wednesday, April 23, 2014 2:40:25 PM
Hi,

I am creating mapping between xml - database.

Could you please find the attachement for mapping project, xml file, xsd files and database table sql query .

In the given sample file, i have <Box24> . In turn, which is having multiple <ClaimFormDetailsHCFA> In turn which is having multiple elements, Which are multiple times repeated.

similarly i have <Details>. In turn, which is having multiple <ClaimFormDetailsUB> In turn which is having multiple elements, which are multiple times repeated.

i have two tables in Database i.e .Test and Test1 tables which are having relation on each other based on Header Id.

Please Assist me how can i iterate the loop of both <ClaimFormDetailsHCFA> and <ClaimFormDetailsUB> to single dbo.test1 table.
How can i insert multiple values in a single table

Thanks in Advance.

Topic: How to iterate loop when XML - DB mapping
Posted: Tuesday, April 15, 2014 12:16:19 PM
Hi Ultrabeet,

Thank you for valuable reply,

I did same what u have given and got what am expected output.


Once again thank u....
Topic: How to iterate loop when XML - DB mapping
Posted: Tuesday, April 15, 2014 10:38:03 AM
Hi,

I am creating mapping between xml - database.

Could you please find the attachement for mapping project, xml file, xsd files and database table sql query .

In the given sample file, i have <Box21>. In turn, which is having eight subelements on the name of <d4p1:string>

I want to map all eight <d4p1:string> values into respective database columns.

Please Assist me how can i iterate the loop when xml - db mapping.

I am getting all eight column values when xml - xml mapping

Please help me out from this issue.

Thanks in Advance.
Topic: Getting SSL Certificate Error in Accessing Secured API
Posted: Tuesday, April 8, 2014 5:25:44 AM
Hi,

i am getting "Security certificate error for remote resource " Error when i am accessing secured url (https://) in altova mapforce 2014.

How can i access if the SSL certificate is expired.


Could you Please help me out .








Topic: Problem in Reloading excel spreadsheet in Mapforce
Posted: Monday, February 10, 2014 6:23:11 AM
Hi All,
I am new to mapforce and trying to execute excel mapping with xsd.I thought to modify some input data in excel sheet and also added new sheet to my excel file. As if i clicked on File->Reload , I couldn't able to find any reflection in my mfd excel input file. Can anyone help me to find out where my problem is and how to rectify it?
Topic: How can process two different files having similar structure to source component (mapforce flex tex
Posted: Wednesday, February 5, 2014 12:42:53 PM
hi

Thank You for Reply,

Please find the attached Updated Project

as you told tried in my Project,

but it is not giving correct output

Note - In Text File, Division Column having some values.
Topic: How can process two different files having similar structure to source component (mapforce flex tex
Posted: Wednesday, February 5, 2014 11:53:55 AM
Hi,

Thank You for Reply,

Could U please provide a sample example where should i write if condition in generated code or Mapping window

could u please provide brief explanation

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.