Re: [xml] Generating XML-Documents from a given DTD

Date view Thread view Subject view Author view

From: H.-Arno Jacobsen (jacobsen@eecg.toronto.edu)
Date: Thu Jan 18 2001 - 08:41:38 EST


Thanks for the response.

Let me explain ...

I need this as a "test driver". I have an application that processes
XML documents (LOTS !!!!). To evaluate my app. I need LOTS-and-LOTS
of XML-documents - more than I ever want to store on my system.

Obviously, this is not what a DTD was intended for. The way I imagine
it to work is {<specification>, DTD} -> xml-docs.

The spec. would probabilistically describe what I expect on average
the resulting XML-doc. to look like.

Just hoped somebody had already implemented that.

I'll check out the functions you pointed out.

Thanks,

Arno

>
> On Wed, Jan 17, 2001 at 03:48:04PM -0500, H.-Arno Jacobsen wrote:
> >
> >
> > Hi,
> >
> > has anybody written a function to automatically generate
> > XML documents from a provided DTD for libxml ?
>
> Not that I know of.
> The main problem is that it is hard to make such a function
> given that a DTD can generate (quite often) an infinity of
> document instance conforming to it. A DTD which would generate
> a single instance is possible but I have never seen one :-)
>
> You could write a big ball of heuristics and try to get one
> document generated but chances are very high that it would
> not suit the needs of the caller...
> There is 2 functions which could help if you're trying to
> automatically generate such a tree (or a list of choices
> in a GUI):
> - xmlValidGetValidElements ()
> http://xmlsoft.org/html/gnome-xml-valid.html#XMLVALIDGETVALIDELEMENTS
> - xmlValidGetPotentialChildren ()
> http://xmlsoft.org/html/gnome-xml-valid.html#XMLVALIDGETPOTENTIALCHILDREN
>
> Daniel
>
> --
> Daniel Veillard | Red Hat Network http://redhat.com/products/network/
> veillard@redhat.com | libxml Gnome XML toolkit http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
> ----
> Message from the list xml@rpmfind.net
> Archived at : http://xmlsoft.org/messages/
> to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
>

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 18 2001 - 08:44:30 EST