Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2005, 06:04 AM
Registered User
 
Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to use Min,Max,Abs functions

Guys,
   I have been trying to transform and XML file using XSLT 1.0 but haven't been able to as i want to get the minimum value,abs. I tried using EXSLT but cannot get it running as i keep getting one or the other stupid errors. If possible please provide me with a sample if ur using the namespace http://exslt.org/dynamic or math or func or sumthing.

I wanna loop thru Each Row which can contain more then 1 company nodes which in turn wuld be having one title node each containing 7 nodes each. I want to loop thru each row then company wise get the count of companies and then fetch the values of the 4th node(Title/*[4]) of the title node and then compare all the values and output the minimum value.

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="FinancialForm.xsl"?>
<Import xmlns:sql="urn:schemas-microsoft-com:xml-sql">

    <Form Fid="105" name="SCHEDULE OF QUOTED RATES FOR SUPPLY OF UPVC PIPES - 63 MM TO 315 MM DIA (RINGFIT) WITH ISI MARK. (A) 0.4 mpa (4 kg/cm2) (With Excise duty) ">
        <Row Id="584" Title="0.4 mpa (4kg/cm2 ) 63/4 ">
            <Company Id="47" Name="Prince Pipes &amp; Fitting Pvt Ltd." gujBasedSSI="Yes" gujBasedSSIVal="1.1">
                <Title Name="4kg ( With ED)">
                    <C>25.77</C>
                    <C>0.38</C>
                    <C>4.27</C>
                    <C>30.42</C>
                    <C>3.04</C>
                    <C>33.46</C>
                    <C>thirty-three point four six</C>
                </Title>
            </Company>
            <Company Id="49" Name="Kriti Industries Ltd." gujBasedSSI="No" gujBasedSSIVal="1">
                <Title Name="RATE WITH EXCISE DUTY">
                    <C>24.66</C>
                    <C>0.74</C>
                    <C>4.15</C>
                    <C>29.55</C>
                    <C>2.95</C>
                    <C>32.50</C>
                    <C>thirty-two point five zero</C>
                </Title>
            </Company>
            <Company Id="55" Name="Intigrated thermoplastic Ltd." gujBasedSSI="Yes" gujBasedSSIVal="1.1">
                <Title Name="4 kgf with ED">
                    <C>25.44</C>
                    <C>1.78</C>
                    <C>4.44</C>
                    <C>31.66</C>
                    <C>1.26</C>
                    <C>32.92</C>
                    <C>thirty-two point nine two</C>
                </Title>
            </Company>
        </Row>

        <Row Id="590" Title="0.4 mpa (4kg/cm2 ) 160/4 ">
            <Company Id="47" Name="Prince Pipes &amp; Fitting Pvt Ltd." gujBasedSSI="Yes" gujBasedSSIVal="1.1">
                <Title Name="4kg ( With ED)">
                    <C>153.78</C>
                    <C>2.31</C>
                    <C>25.47</C>
                    <C>181.56</C>
                    <C>18.16</C>
                    <C>199.72</C>
                    <C>one hundred and ninety-nine point seven two</C>
                </Title>
            </Company>
            <Company Id="48" Name="Jain Irrigation System Ltd." gujBasedSSI="Yes" gujBasedSSIVal="1.1">
                <Title Name="63mmto315mmx4kg with excise duty">
                    <C>154.96</C>
                    <C>4.06</C>
                    <C>25.29</C>
                    <C>184.31</C>
                    <C>18.43</C>
                    <C>202.74</C>
                    <C>two hundred and two point seven four</C>
                </Title>
            </Company>
            <Company Id="49" Name="Kriti Industries Ltd." gujBasedSSI="No" gujBasedSSIVal="1">
                <Title Name="RATE WITH EXCISE DUTY">
                    <C>152.88</C>
                    <C>4.59</C>
                    <C>25.70</C>
                    <C>183.17</C>
                    <C>18.32</C>
                    <C>201.49</C>
                    <C>two hundred and one point four nine</C>
                </Title>
            </Company>
            <Company Id="55" Name="Intigrated thermoplastic Ltd." gujBasedSSI="Yes" gujBasedSSIVal="1.1">
                <Title Name="4 kgf with ED">
                    <C>152.42</C>
                    <C>10.66</C>
                    <C>26.61</C>
                    <C>189.69</C>
                    <C>7.58</C>
                    <C>197.27</C>
                    <C>one hundred and ninety-seven point two seven</C>
                </Title>
            </Company>
        </Row>

    </Form>
</Import>

Tried using EXSLT but keep getting errors.

Regards,
Wilbur








Please take a look at the below XML data i'm trying to manipulate.









Similar Threads
Thread Thread Starter Forum Replies Last Post
MAX/MIN Value Help slbibs SQL Server 2005 4 November 6th, 2007 04:00 AM
MIN( MAX( UPDATE Stuart Stalker SQL Language 3 February 21st, 2007 07:10 AM
MAX and MIN ON TD cleytonjordan XSLT 7 July 27th, 2005 12:39 PM
SQL Max() and Min() functions help shana Oracle ASP 1 April 25th, 2005 08:34 PM
SQL Max() and Min() Functions Help need... shana Access 1 September 7th, 2004 09:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.