Lists Home |
Date Index |
How is an XML Schema non-generative?
There are top level elements that show what the root element is. This element has a type, which has child elements, etc.
If there are multiple top level elements in the schema, just pass in a parameter to the stylesheet with the name of the root element you want in your result document and follow the tree all the way to the end.
See http://www.xml.com/pub/a/2003/01/15/transforming-schemas.html?page=1, or the "User Interface Generation" chapter from the following paper, which describes how one can generate an XForms from a schema using XSLT (and borrowed heavily from the examples in the xml.com article): http://dream.sims.berkeley.edu/CDE/report/go-five-final-report.html
1400 Fashion Island Boulevard
San Mateo, CA, 94404
(650) 212 8434 phone
(650) 212 8499 fax
Red Herring "Top 10 Companies to Watch"
InfoWorld "Top 100 Technology Innovators"
Enterprise 2002 "Top 5 New Big Thing"
From: Klotz, Leigh [mailto:Leigh.Klotz@pahv.xerox.com]
Sent: Friday, August 08, 2003 1:22 PM
To: 'Cameron Shorter'; 'email@example.com'
Subject: RE: [xml-dev] Looking for a schema->html form XSL transform
An XML Schema is not generative; i.e., doesn't have enough information in it
to provide the basic structure of a document, so you need to start with
something that says what the root element it, what elements come next, etc.
If you start with a sample XML document with blanks for the content, then
you can use any XForms processor to do what you're asking. You do need to
provide the human-readable labels for the fields you want the user to edit,
and an XPath expression that says where those fields are in the initial
document. If you specify one or more XML Schemas, they will be used to
validate the resulting document before it is POSTed back as XML.
See http://www.w3.org/MarkUp/Forms and
fully-conformant implementations, one of which runs inside Internet
fully conformant with the XForms spec, but might be good enough for your
purposes. IBM has one available form download and testing.
From: Cameron Shorter [mailto:firstname.lastname@example.org]
Sent: Friday, August 08, 2003 2:01 PM
Subject: [xml-dev] Looking for a schema->html form XSL transform
I want to:
1. Use XSL to build a HTML form from a schema, then
2. Build XML from the elements in the form and POST the xml back to a
Cameron Shorter http://cameron.shorter.net
Open Source Developer http://generguide.sourceforge.net
Senior Software Engineer http://www.adi-limited.com
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription