[jdom-interest] XSD->XML
Judith Andres
Judith.Andres at gmx.net
Thu Apr 12 13:54:42 PDT 2001
Zeus at http://zeus.enhydra.org works with JDOM, but right now it's just
DTDs but some XSD functionality will - hopefully - soon be implemented.
Judith
----- Original Message -----
From: "Warner Onstine" <warner at warneronstine.com>
To: <jdom-interest at jdom.org>
Sent: Thursday, April 12, 2001 5:26 PM
Subject: Re: [jdom-interest] XSD->XML
>
> ----- Original Message -----
> From: "Yoichi Takayama" <yoichi at webmcq.com>
> To: <jdom-interest at jdom.org>
> Sent: Wednesday, April 11, 2001 11:47 PM
> Subject: [jdom-interest] XSD->XML
>
>
> > Dear Warner,
>
> Hi Yoichi, as you'll find out I'm not the only one on the list, and
> certainly not the most experienced one ;-).
>
> > I am still very new to XML.
>
> Same here ;-).
>
> > I would like to be able to dynamically add/delete XML element from my
JDOM
> > tree. Of course, this has to be done under the constraints imposed by
the
> > schema file.
> >
> > I would like to be able to represent the current structure and values
held
> > by an XML JDOM in a GUI and to see what elements/attributes I can add or
> > delete, and I want the XML Element/Attribute objects to do the field
type
> > check and value range check automatically for me and so on.
>
> These are the same requirements I am looking for.
>
> > Can we implement <sequence> <complexType> <restriction> <enumeration>
etc.
> > Java Classes and extends JDOM Element class to achieve this??? So, it
is
> a
> > sort of XML/XSD JDOM, in which each element knows its
options/restrictions
> > set in the underlying XSD file. Elements yet to be created in the XML
> tree
> > must have some places to stay in the tree in this case, or they should
be
> > read from the schema file as they are needed.
>
> This sounds similar to data-binding, but I'm not sure. Have you looked at
> Castor (castor.exolab.org), or the jdom binding one (for the life of me I
> can't find it). This is actually the direction that I am starting to head
> in.
>
> > I could have the schema JDOM tree as a shadow tree (template of the XML
> > tree?) for the "front" XML tree (instance of the schema?) to do the
check
> > on the fly. In that case, there is no need to extend the JDOM Element
> > classes, but then how should we implement the interaction between the
> > two? Is there a good programming or object model for this?
>
> I can't think of one, but I'm not that familiar with patterns, anyone?
>
> > I tried IBM's facility to auto-generate Java Classes representing XML
from
> > DTD or Schema, but it has no value constraints built into these
> > classes. Also, at present, the facility is all hard-coded in terms of
the
> > DOM tree by using these "IBMXMLElement" Classes, and there is no
transfer
> > of information about what class(es) can be added/deleted. The last two
> > points can be done by writing up my own code to use these IBMXMLElement
> > classes, but the point here is how to automate such a task.
>
> This is definitely data-binding, Castor has the source-generator function
> that want to check out, is there something similar for jdom?
>
> -warner
>
> > Any good idea?
> >
> > Regards,
> > Yoichi
> >
> >
> > Warner R. Onstine mailto:warner at warneronstine.com
> > Thu, 22 Mar 2001 13:30:08 -0800
> > · Previous message: · FW: [jdom-interest] Newbie: Schema
> > validation of a document being built via JDOM
> > · Next message: · [jdom-interest] Why should I have to detach()?
> > · Messages sorted by: · [ date ] · [ thread ] · [
> subject ]
> > · [ author ]
> >
> > I would love to see something like this for both DTD and Schema. If not
an
> > integrated part it would be nice to see something in jdom/contrib for
> this.
> >
> > -warner
> >
> > ----- Original Message -----
> > From: "Kevin Baynes" <kbaynes at renex.com>
> > To: "Jdom-Interest" <jdom-interest at jdom.org>
> > Sent: Thursday, March 22, 2001 8:05 AM
> > Subject: FW: [jdom-interest] Newbie: Schema validation of a document
being
> > built via JDOM
> >
> >
> > > I'm just forwarding this to the group.
> > >
> > > -----Original Message-----
> > > From: Carsten Karkola [mailto:karkola at rcs.urz.tu-dresden.de]
> > > Sent: Thursday, March 22, 2001 2:31 AM
> > > To: Kevin Baynes
> > > Subject: RE: [jdom-interest] Newbie: Schema validation of a document
> > > being built via JDOM
> > >
> > >
> > > Maybe it could also be interesting to get all possible childs of an
> xml-
> > > node using the schema information (like psgml in emacs it does with
> > > a dtd).
> > > My scenario would be:
> > > I can ask an List element.getValidContent() and i can compare the
> > > type/name of the element/attribute, which I try to insert in my
> > > document against the result of the above method.
> > > I think this is also helpfull in a GUI. I can fill a popupmenu with
the
> > > reuslts build on the schema information and can avoid the insertion
> > > of wrong elements.
> > > In an second part I have to validate the document to find out missing
> > > elements/attributes via Document.validate().
> > >
> > > regards, carsten
> > >
> > > ==================================================
> > > ==
> > > == Dipl.-Ing. Carsten Karkola
> > > ==
> > > == TU Dresden - Dez.4; SG 4.2
> > > ==
> > > == Tel.: +49 351 463 7817
> > > == Fax: +49 351 463 7179
> > > == e-mail: karkola at rcs.urz.tu-dresden.de
> > > ==
> > > ==================================================
> > > _______________________________________________
> > > To control your jdom-interest membership:
> > >
> >
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> > t.com
> > >
> >
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> >
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> t.com
> >
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
More information about the jdom-interest
mailing list