First of all, I have been working on this forever. Thank you. Finally. Progress. It does however, lead me to a secondary issue. How to dynamically decide if I need to combine with the preceeding node or not. The code works as expected, I just don't know the correct way to determine whether it should This is my current output and xslt:
XSLT: I want to test if there is a price adjustment before I render the the condition.
<xsl:if test="PriceAdjustment">
<xsl:attribute name="condition">
<xsl:value-of select="preceding-sibling::Adjustments[1]/ConditionText"/>
<xsl:value-of select="ConditionText"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="PriceAdjustment">
<xsl:attribute name="price">
<xsl:value-of select="number(PriceAdjustment)"/>
</xsl:attribute>
</xsl:if>
Output: This works, but I need to combine the conditions, well, conditionally.
<product_adjustment condition="IF FICO >= 660 AND LTV <= 75.%" price="-0.125" rate="0" margin="0" srp="0" />
<product_adjustment condition=" AND LTV <= 75.%IF $100,000 <= Loan Amount < $150,000" price="0.05" rate="0" margin="0" srp="0" />
<product_adjustment />
<product_adjustment condition="IF State is TEXAS AND Waive Escrows is No" price="-0.2" rate="0" margin="0" srp="0" />
<product_adjustment condition=" AND Waive Escrows is No Total Adjustments" price="-0.275" rate="0" margin="0" srp="0" />
|