How to find min and max value using xslt1.0?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
file_1.xml
<pre class="lang-xml prettyprint
Code:
<span class="tag <productlist><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Pen<span class="tag </item><span class="pln <br/>        <span class="tag <price><span class="pln 8<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Pen<span class="tag </item><span class="pln <br/>        <span class="tag <price><span class="pln 5<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Pen<span class="tag </item><span class="pln <br/>        <span class="tag <price><span class="pln 10<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Bag<span class="tag </item><span class="pln <br/>        <span class="tag <price><span class="pln 15<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Bag<span class="tag </item><span class="pln <br/>        <span class="tag <price><span class="pln 22<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Bag<span class="tag </item><span class="pln <br/>        <span class="tag <price><span class="pln 20<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/><span class="tag </productlist><span class="pln <br/>
[/code]
file_2.xml
<pre class="lang-xml prettyprint
Code:
<span class="tag <productlist><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Pen<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Bag<span class="tag </item><span class="pln <br/>    <span class="tag </items><span class="pln <br/><span class="tag </productlist><span class="pln <br/>
[/code]
need out put like below with max and min value using xsl 1.0
<pre class="lang-xml prettyprint
Code:
<span class="tag <productlist><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Pen<span class="tag </item><span class="pln <br/>        <span class="tag <min><span class="pln 5<span class="tag </min><span class="pln <br/>        <span class="tag <max><span class="pln 10<span class="tag </max><span class="pln <br/>    <span class="tag </items><span class="pln <br/>    <span class="tag <items><span class="pln <br/>        <span class="tag <item><span class="pln Bag<span class="tag </item><span class="pln <br/>        <span class="tag <min><span class="pln 15<span class="tag </min><span class="pln <br/>        <span class="tag <max><span class="pln 22<span class="tag </max><span class="pln <br/>    <span class="tag </items><span class="pln <br/><span class="tag </productlist><span class="pln <br/>
[/code]


View the full article
 
Back
Top