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: mfebres
About
User Name: mfebres
Forum Rank: Newbie
Real Name:
Location USA
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Thursday, April 4, 2019
Last Visit: Thursday, October 10, 2019 5:38:53 PM
Number of Posts: 3
[0.02% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Conditional Constant or similar
Posted: Thursday, October 10, 2019 4:27:33 PM
Hello,

I need to generate 2 XSLT versions of the same project but with a few different function and constants. Right now I have them in 2 different mapping files but I am wondering if there is an easy/better way to manage both projects under just one project. Right now, If I need to do a change or add/remove something I need to do it in both files as they share almost 95% of the logic.

I guess it is possible to use an if else to assign those constants but that logic will be available in the XSLT and I would like to avoid that. Is there any other way to do it?

Thanks,
Miguel



Topic: Functions does not appear in code
Posted: Thursday, April 4, 2019 5:23:36 PM
I found the reason: The generated XSD based on the original XML defined that Line1 as complex type rather than string.
Topic: Functions does not appear in code
Posted: Thursday, April 4, 2019 2:48:36 PM
Hello,

I am wondering why the logic to map Line1 to AddressLine1 does not appear in the generated XSLT. The logic is very simple: If the length of the Line1 value is equal or greater to 3, the value should be used otherwise the default value of "---".

What I am doing wrong?

Mapping:


Generated XSLT v2.0:


Otput:


Original XML:


Miguel Febres

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