Hi all,
My XML schema defines a customer to be of type UK or Non-UK European making use of xsi:type.
The difference between the complex UK and Non-UK European customer types is they have an additional TWO extra fields from the standard customer type.
UK customer additionaly have CustomerCounty & CustomerPostcode Non-UK European have CustomerAddressline5(optional) & Timezone(I dont need to print this)
However in my XSL I'm hardcoding the selecting of element names in (see code below).
I've looked at <xsl:if> but dont know how to compare the complex xsi type.
Can anyone help please to suggest away I only print the fields based on the xsi type?
Also as elemnt addresslline5 is optional for complex type NonUKEuropean customer is there a way to check if the field is present i.e. nulls before selectign the value?
I guess I could just reference all fields and if there empty or not present they wont print, but I'm sure there's a much better solution outthere.
Read more about it at buzzycode.com |