You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/08/23 11:22:43 UTC

Generating form models from XML Schemas

Has anyone made any attempt to do a mapping between
an XML Schema, and a CForms model representation of
the data... I assume it would need a stylesheet of some
kind, or is there any other way?

For example, the extract from this article
( http://www.xml.com/lpt/a/2000/11/29/schemas/part1.html )
suggest a mapping to a Java class:

"The xs:annotation elements can be added at the beginning 
of most schema constructions, as shown in the example 
below. The appinfo section demonstrates how custome 
namespaces and schemes might allow the binding of an 
element to a Java class from within the schema.

<xs:element name="book">
 <xs:annotation>
<xs:documentation xml:lang="en">
  Top level element.
</xs:documentation>
<xs:documentation xml:lang="fr">
  Element racine.
</xs:documentation>
<xs:appinfo source="http://example.com/foo/">
  <bind xmlns="http://example.com/bar/">
      <class name="Book"/>
   </bind>
  </xs:appinfo>
 </xs:annotation>
"

Ideas welcome.

Derek.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Generating form models from XML Schemas

Posted by Tim Larson <ti...@keow.org>.
On Mon, Aug 23, 2004 at 11:22:43AM +0200, Derek Hohls wrote:
> Has anyone made any attempt to do a mapping between
> an XML Schema, and a CForms model representation of
> the data... I assume it would need a stylesheet of some
> kind, or is there any other way?

This might get you started:
  http://wiki.apache.org/cocoon/Schema2CocoonForms

--Tim Larson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org