Altova Mailing List Archives

[xsl] Data validations on XML elements..

From: himanshu padmanabhi <himanshu.padmanabhi@--------->
Date: 4/9/2009 5:34:00 AM

<?xml version='1.0'?>
<?xml-stylesheet href="abc.xsl" type="text/xsl"?>

            <label>Machine IP</label>
            <desc>specify target machine ip</desc>

<xsl:stylesheet version="1.0" xmlns:xsl="">

<xsl:template match="params">
    <table border="1">
    <form name="abcfile" method="POST" action="abc.cgi">
            <tr class="header_class">
                <td> Parameter </td>
                <td> Description </td>
                <td> Value </td>
            <xsl:apply-templates select="abc" />

<xsl:template match="abc">
    <tr class="form_td">
            <xsl:value-of select="label"/>
    <xsl:value-of select="desc"/>
             <input type="text" name="args1" value="{$value}">


Here,I want that user should only enter IP's in the text box 'args1' in form of
"digit.digit.digit.digit". Can I specify these things in XML?I am
currently not using 'mandatory' and 'Type' fields from XML.

If not,has the XSL,the power to accept only interger values in this
text box as 'Type' is specified as 'number' in XML File?

action form "abc.cgi" can recognize that,but that won't be a generic solution.

I am using Perl:LibXSLT processor.
Thanks and Regards,
Himanshu Padmanabhi


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.