How to create a XML template with DTDfiles ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   layout_crazy
Posted On:   Saturday, March 8, 2003 09:44 PM

hi,everyone
I am a beginner to java and xml,now I meet a


problem:


I want use some random DTD files

to create a XML template.


anybody can give me some suggestions ?


thanks a lot

Re: How to create a XML template with DTDfiles ?

Posted By:   Roseanne_Zhang  
Posted On:   Sunday, March 9, 2003 08:40 AM

The answer is NO unless it is an extreme trivial case. See the really trivial DTD bellow. We already have 4 possible "templates". Here we assume templates is the right word here. I use one line for each XML file for easy listing. For a little less trivial DTD, it is easy to imagine that all the combination and permutation will cause an exponential explosion. I don't think you want the result, let alone having the space to store the result or writing an application to use that result.


Trivial DTD file






Four possible XML "templates"


  1. some_name

  2. some_number

  3. one_of_the_two

  4. some_namesome_numberone_of_the_two



If you don't believe all four are valid against the DTD, try to validate them by yourself .
About | Sitemap | Contact