/ / पेंटाहो डेटा एकीकरण: दो एक्सएमएल फाइलों को एक - xml, xslt-1.0, पेंटाहो में मिलाएं

पेंटाहो डेटा एकीकरण: दो एक्सएमएल फाइलों को एक - xml, xslt-1.0, पेंटाहो में मिलाएं

पेंटाहो डेटा एकीकरण के साथ दो एक्सएमएल फ़ाइलों को एक में कैसे विलय करें? निम्नलिखित मेरी 2 एक्सएमएल फाइलें हैं:

एक्सएमएल फ़ाइल 1:

<Root>
<OLD>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</OLD>
<OLD>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</OLD>
<Root>

एक्सएमएल फाइल 2:

<Root>
<NEW>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</NEW>
<NEW>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</NEW>
<Root>

दोनों नोड्स वाली फाइलें। अपेक्षित आउटपुट फ़ाइल:

<Root>
<OLD>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</OLD>
<OLD>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</OLD>
<NEW>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</NEW>
<NEW>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
<Node> </Node>
</NEW>
<Root>

उत्तर:

जवाब के लिए 0 № 1

प्रश्न 2:

एक्सएमएल फ़ाइल।

<roots>
<root>
<text1>increased by</text1>
<value1>10</value1>
<text2>decreased by<text2>
<value2>-7</value2>
</root>
</roots>

अपेक्षित एचटीएमएल आउटपुट:

increased by 10 --(value 10 in green color)
decreased by -7 -- (value -7 in red color)

और Iam नीचे XSLT लागू करने की कोशिश कर रहा है ...

<xsl:template match="value1">
<xsl:if test="value1 >= 0">
<font color="green"><xsl:apply-templates/>/></font>
</xsl:if>
</xsl:template>

<xsl:template match="value1">
<xsl:if test="value1 < 0">
<font color="red"><xsl:apply-templates/>/></font>
</xsl:if>
</xsl:template>