• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

XML Validation with DTD ( with Length of datatype mentioned in DTD)

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing one problem in XML.I need your help.

I need to validate the XML with DTD ,where in DTD I would like to
specify the length of the datatype .

Is there any way by which Length of the datatype (ie.,the precision )
could be specified in DTD for each of the elements and thus be validated
against the XML?

Please help me in this regard.
 
Sheriff
Posts: 26771
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't see anything like that in the DTD references and tutorials I looked up on the Internet.
 
Kavya Anjali
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes sir...even I am confused as to what can be done in this regards. Are there any alternatives with regards to the length of a datatype. If it cannot be expressed in the DTD where else can we put that requirement?
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The length restriction ,nor the type restriction can be put using a DTD.But using xsd you can put the type constraint.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are lot of limitations are there while using DTD'd like

DTD is not integrated with Namespace technology so users cannot import and reuse code
DTD does not support data types other than character data, a limitation for describing metadata standards and database schemas
Applications need to specify document structure constraints more flexibly than the DTD allows for

To can get more information google DTD limitations.

Regards
Sarath
 
I'm still in control here. LOOK at this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic