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.

Optimized solution for Mandatory validation in parent child input xml Options · View
Posted: Friday, March 26, 2021 6:28:00 AM
Rank: Newbie

Joined: 3/26/2021
Posts: 1
Location: India

Step1: Please open the given mfd and refer Screenshot 1.

Step2: So if we go inside Validationchildparent udf, you can find itemValidationParentCheck(Screenshot 2).

Step3: Inside itemValidationParentCheck We can find the main logic for conditional and mandatory logic for group as I said earlier.(Screenshot 3).

Step4: We can find the TotalDutiableQuantity under ItemQuantity, TotalDutiableQuantity Is conditional whereas unitcode id mandatory according to specs(Screenshot 4).

Step5: Our requirement is we need to perform validation on this parent child relationship, for instance if the parent is present in input xml then we need to go and check the mandatory child(and throw exceptions if no data or tag is their) or else we don't need to check.

Step6: But the issue here is the whole group is repeating, the item in which the TotalDutiableQuantity is present will repeat for 50 times. Refer Screenshot 6 and 7.

Step7: So the validations what we implemented for this parent child is not working feasibly, can anyone suggest a optimized one.

Steps To Reproduce:

step 1: open the mfd file

step 2: add the xsd from the zip file(Input XSD\TN Spec for SDC\TradenetResponse.xsd)

step 3: add the json schema from the zip file(Output Json Schema\Jsonschema..json)

step 4: Add input file from the zip file(Input\DUMMY_T08GA0029H202102095041_TDBI038_INPPMT.xml)

step 5: Generate output -> Exceptions are not thrown clearly if you delete the tag or data in input xml
Posted: Thursday, June 10, 2021 12:56:15 PM
Rank: Newbie

Joined: 6/10/2021
Posts: 2
Location: India
HI Sudarshan,

I can help you if you would like to share your email Id.
Users browsing this topic

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

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