Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XSLT from a XSD spec. [Thread Next] Re: XSLT from a XSD spec.To: NULL Date: 10/4/2006 11:44:00 AM So what you're trying to do is generate a sample document from the schema? There have been many tools that do this. The problem is, there's generally a wide range of possible documents that match a given schema and no clear way to decide which choices to make. You either need to pick randomly and accept that your synthesized document may not in fact be similar to any "real" document (due to semantic constraints not expressed in the schema), or provide additional semantic info from some other source. There are a number of tools out there which will do this to a greater or lesser extent, for the purposes of generating "churn" test suites. It sounds like you ought to be investigating those before spending too much time attempting to solve the same problem. On the other hand, if you're just saying that you want to pretty-print XML, and (unlike most attempts in that direction, which risk breaking the document semantics when they insert the whitespace) you want to try to use the schema to recognize then it's safe (ie, when you're dealing with "element content")... I'm sure that too has been addressed many times, but at least it's something that has a clearer definition. On the other other hand, if you just want to pretty-print *with* the risk that indentation will change the document's semantics, you don't need the schema at all -- just track element nesting. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
