[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Data validations on XML elements..

Subject: Data validations on XML elements..
From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx>
Date: Thu, 9 Apr 2009 11:03:23 +0530
 Data validations on XML elements..

<?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="http://www.w3.org/1999/XSL/Transform">

<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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.