Re: How to do numeric validations in DTD

Subject: Re: How to do numeric validations in DTD
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Thu, 20 Jan 2000 15:14:17 -0500
At 02:04 PM 01/20/2000 -0500, Con_Shravan Gunda wrote:
How to do numeric validations in DTD??

Like i written one xml like this..

<personalinfo>
        <ssn>123456789</ssn>
</personalinfo>

How to write a DTD, which validates the value of SSN as numeric.

The question's off-topic for XSL-List, but the short answer is that DTDs are (with trivial exceptions) datatype-blind: you can't "validate as [fill in datatype here]" anything with a DTD. You might want to take a look at XSchema, which will replace/enhance DTDs (including datatype support) using XML syntax... and then, of course, ask further questions on XML-L or XML-DEV. :)


===================================================================
John E. Simpson            |  I spilled spot remover on my dog.
simpson@xxxxxxxxxxx        |  He's gone now.
http://www.flixml.org      |  (Stephen Wright)


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread