Re: DTD to web form
by Tod Harter other posts by this author
Jun 16 2006 5:27AM messages near this date
view in the new Beta List Site
Re: DTD to web form
|
Re: DTD to web form
& XSLT Well, it COULD be possible, under certain conditions. Not every DTD
contains enough information to create a form. Some DTDs only specify
that elements or attributes COULD exist, or that they could exist in
variable quantities.
I built a set of modules a good while back that would let you create a
'mapping' file, essentially a set of pairs of XPATH statements and XSD
simple data type declarations which describes the equivalence between
values in one XML and another. Other parts of the system built a simple
XML representation of a POST/GET, and another managed the whole binding
and translation. The result is a web based tool that can insert form
data into a fairly arbitrary XML target document, and also extract XML
from the document and use an XSLT stylesheet to insert values into
(X)HTML and thus round trip back and forth to a form. Still its not all
that 'automatic', you have to build the mapping file, and build the form
by hand.
A further step would be building the form automagically from a DTD, but
as I said before, you would have to make a bunch of assumptions about
your DTD and target document (mainly that each thing you want to edit is
a unique element of the target document). I'd say its possible within
limits and it would be a fairly nice tool. If I had the time I'd build
something myself. If you want I can gift you with some code. Its
certainly not 'CPAN quality' code, but it might be somewhat helpful ;).
johns@[...].com wrote:
> hi
>
> ( 06.06.15 06:58 -0700 ) Joshua Santelli:
>
> > There is a demand for a GUI to edit each of
> > these configuration files from the web.
> >
>
> ouch!
>
>
> > The ideal solution would be to create a DTD (or
> > schema) and have some code that would generate a web
> > form from that DTD.
> >
>
> um, why wouldn't you send the XML of the config file. the DTD is only a
> template used to validate the 'well-formed-ness' of various XML files.
>
>
> > Does anyone know of anything out that that does
> > something like this?
> >
>
> javascript can take the input XML and output HTML to the browser. it
> means using the DOM alot, which you may or may not be able to do.
>
>
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Joshua Santelli
Rick Frankel
Tod Harter
johns
Tod Harter
Joshua Santelli
Les Richardson
|