Please help: trying to transform the XML by removing leading **zeroes and spaces**; the below XSLT is not working for me:

```
    <?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="xalan://org.apache.commons.lang.StringUtils" 
exclude-result-prefixes="str">
<xsl:output method="xml" indent="yes" />

<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()" />
    </xsl:copy>
</xsl:template>

<xsl:template match="h1">
    <h1>
            <xsl:variable name="leadingZeroRemoved">
            <xsl:call-template name="removeLeadingZero">
                <xsl:with-param name="text" select="." />
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="leadingSpaceRemoved">
            <xsl:call-template name="removeLeadingSpace">
                <xsl:with-param name="text" select="$leadingZeroRemoved" />
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="trailingSpaceRemoved">
            <xsl:call-template name="removeTrailingSpace">
                <xsl:with-param name="text" select="$leadingSpaceRemoved" />
            </xsl:call-template>
        </xsl:variable>

        <xsl:value-of select="$trailingSpaceRemoved" />
    </h1>
</xsl:template>

<xsl:template name="removeLeadingZero">
    <xsl:param name="text" />

    <xsl:variable name="h1" select="$text" />
    <xsl:choose>
 <xsl:when test="starts-with($text,'0')">
            <xsl:call-template name="removeLeadingZero">
                <xsl:with-param name="text"
                    select="substring-after($text,'0')"/>
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="$text"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<xsl:template name="removeLeadingSpace">
    <xsl:param name="text" />

    <xsl:variable name="h1" select="$text" />
    <xsl:choose>
        <xsl:when test="starts-with($h1,' ')">
            <xsl:call-template name="removeLeadingSpace">
                <xsl:with-param name="text" select="substring-after($h1,' ')" />
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="$h1" />
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<xsl:template name="removeTrailingSpace">
    <xsl:param name="text" />

    <xsl:variable name="h1" select="$text" />
    <xsl:choose>
        <xsl:when test="str:ends-with($h1,' ')">
            <xsl:call-template name="removeTrailingSpace">
                <xsl:with-param name="text" select="str:substringBeforeLast($h1,' ')" />
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="$h1" />
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>
</xsl:stylesheet>

```

My input and output generated are:

```
$  cat newXMLTEST.FILE
<?xml version="1.0" encoding="UTF-8"?><School>
<Student>
<Id_Numer>0000034</Id_Numer>
<Name>   David</Name>
<Tot_Marks>000000100</Tot_Marks>
<Last_YearTot_Marks>000000000</Last_YearTot_Marks>
<Fee_Paid>000043.01</Fee_Paid>
</Student>
</School>
$  cat ne.xml
<?xml version="1.0" encoding="UTF-8"?>
<School>
<Student>
<Id_Numer>0000034</Id_Numer>
<Name>   David</Name>
<Tot_Marks>000000100</Tot_Marks>
<Last_YearTot_Marks>000000000</Last_YearTot_Marks>
<Fee_Paid>000043.01</Fee_Paid>
</Student>
</School> 

```

But what i am looking for is something like below:

```
<?xml version="1.0" encoding="UTF-8"?>
<School>
<Student>
<Id_Numer>34</Id_Numer>
<Name>David</Name>
<Tot_Marks>100</Tot_Marks>
<Last_YearTot_Marks>0</Last_YearTot_Marks>
<Fee_Paid>43.01</Fee_Paid>
</Student>
</School>

```

I am beginner to XSLT and Xpath.I modified some online version of XSLT and trying with it. Thanks in advance.