You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by robert burrell donkin <rd...@apache.org> on 2004/01/12 23:36:39 UTC
betwixt/start from java plans
i've created a simple Betwixt tutorial based on RSS 0.91:
http://jakarta.apache.org/commons/betwixt/guide/tutorial.html to give
JaxME people a bit of a head start. (apologies that it's not very full,
i hope to revisit when i have time.)
i plan to take a look (hopefully in the next few days) at generating
schema from XMLBeanInfo objects (these are used by betwixt to describe
how a bean is mapped to xml) working with the RSS code. it's probably
more convenient for me to start this from the betwixt codebase (since
an xml generation tool probably has reasonable utility to users in any
case).
there are probably going to be a few wrinkles since Betwixt has some
advanced features which are pretty dynamic. my plan is to try to
concentrate on the simple use cases but give some flexibility (probably
by pluggable strategies) for power users to tweak the mapping to
schema.
i'm considering creating a simple object model and using betwixt to
convert it to xml (this will allow it to be equally easily fed into a
SAX pipeline or serialized).
comments?
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: betwixt/start from java plans
Posted by Jochen Wiedmann <jo...@ispsoft.de>.
robert burrell donkin wrote:
> comments?
Yes. Attached you find the DTD, converted into a schema. :-)
Jochen
<?xml version='1.0'?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="rss">
<xs:complexType>
<xs:sequence>
<xs:element name="channel">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="title" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="link" type="xs:string"/>
<xs:element name="language" type="xs:string"/>
<xs:element name="item" maxOccurs="unbounded">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="title" type="xs:string"/>
<xs:element name="link" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="rating" minOccurs="0" type="xs:string"/>
<xs:element name="image" minOccurs="0">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="title" type="xs:string"/>
<xs:element name="url" type="xs:string"/>
<xs:element name="link" type="xs:string"/>
<xs:element name="width" type="xs:string"/>
<xs:element name="height" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="textinput" minOccurs="0">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="title" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="link" type="xs:string"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="copyright" minOccurs="0" type="xs:string"/>
<xs:element name="pubDate" minOccurs="0" type="xs:string"/>
<xs:element name="lastBuildDate" minOccurs="0" type="xs:string"/>
<xs:element name="docs" minOccurs="0" type="xs:string"/>
<xs:element name="managingEditor" minOccurs="0" type="xs:string"/>
<xs:element name="webMaster" minOccurs="0" type="xs:string"/>
<xs:element name="skipHours" minOccurs="0" type="xs:string"/>
<xs:element name="skipDays" minOccurs="0" type="xs:string"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string" fixed="0.91"/>
</xs:complexType>
</xs:element>
</xs:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org