You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <ja...@hp.com> on 2003/10/02 10:56:14 UTC
How to work with XMLs?
Hi,
I'm going to enhance o.a.g.xml.deployment.LocalEntityResolver so that it
will look up publicIds and systemIds in its catalogue. The idea is
very well described in the javadoc of EntityResolver class -
http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/EntityResolver.html.
As the catalogue is to be an xml file, the question I couldn't find an
answer to is how to handle XMLs?
The run:main goal invokes xmlbeans to generate POJOs for the standard
DDs, but I haven't yet been able to figure out why it's done. On the
other hand, I'd bet we agreed to not use any of generators and handle
the binding ourselves, i.e. create a Loader that maps elements to
appropriate POJOs. Is that correct? If so, should the loader and POJO
belong to o.a.g.xml.deployment package?
Unless such a page already exists, once I have finished it I'l describe
how Geronimo handles XML files in Wiki.
Cheers,
-Jacek
RE: How to work with XMLs?
Posted by Jeremy Boynes <je...@coredevelopers.net>.
Couple of things.
The plan was to do something quick to sort out the data model we needed
internally. The loader uses raw DOM for now but should migrate to
something better (XMLBeans) in the future; this will probably happen in
conjunction with the JSR88 tool impl that needs to write out valid
documents.
For a more general solution, we have been thinking about persistence to
XML in general (e.g. in a form that the CMP impl could use). This hasn't
got much beyond the "neat idea" stage, but if anyone want to pick it up
the wiki may be good place to start.
--
Jeremy
> -----Original Message-----
> From: Jacek Laskowski [mailto:jacek.laskowski@hp.com]
> Sent: Thursday, October 02, 2003 3:54 AM
> To: geronimo-dev@incubator.apache.org
> Subject: Re: How to work with XMLs?
>
>
> James Strachan wrote:
>
> > The xbeans module was an experiment and used BEA's XMLBeans (now at
> > Apache), JAXB and Castor. Out of the 3 the best solution
> appeared to be
> > XMLBeans.
> > Though we've decided to write our own beans by hand & hand
> code the
> > marshalling ourselves via Digester (I think)
>
> Digester? Well, that would help a lot, but alas Geronimo
> doesn't use it
> at all. I spent some time yesterday trying to figure out how
> it's done
> and it looks to me that it's necessary to handle binding elements and
> attributes by ourselves. It means we don't use any tool
> (besides Xerces)
> to work with XMLs. That's different than how I used to manage
> it, but it
> gave me another idea.
>
> What about a service that would allow handle XML binding
> automatically?
> Whatever it means. What benefits would it provide besides
> being opaque
> to the 3 listed above - I don't know. I can't imagine how
> it'd work at
> all, but hope to see others who pick it up and materialize :-)
>
> -Jacek
>
>
Re: How to work with XMLs?
Posted by Jacek Laskowski <ja...@hp.com>.
James Strachan wrote:
> The xbeans module was an experiment and used BEA's XMLBeans (now at
> Apache), JAXB and Castor. Out of the 3 the best solution appeared to be
> XMLBeans.
> Though we've decided to write our own beans by hand & hand code the
> marshalling ourselves via Digester (I think)
Digester? Well, that would help a lot, but alas Geronimo doesn't use it
at all. I spent some time yesterday trying to figure out how it's done
and it looks to me that it's necessary to handle binding elements and
attributes by ourselves. It means we don't use any tool (besides Xerces)
to work with XMLs. That's different than how I used to manage it, but it
gave me another idea.
What about a service that would allow handle XML binding automatically?
Whatever it means. What benefits would it provide besides being opaque
to the 3 listed above - I don't know. I can't imagine how it'd work at
all, but hope to see others who pick it up and materialize :-)
-Jacek
Re: How to work with XMLs?
Posted by James Strachan <ja...@yahoo.co.uk>.
The xbeans module was an experiment and used BEA's XMLBeans (now at
Apache), JAXB and Castor. Out of the 3 the best solution appeared to be
XMLBeans.
Though we've decided to write our own beans by hand & hand code the
marshalling ourselves via Digester (I think)
On Thursday, October 2, 2003, at 10:15 am, Juan Albisu wrote:
> Maybe we can use Jaxb
> At 10:56 02/10/2003 +0200, you wrote:
>> Hi,
>>
>> I'm going to enhance o.a.g.xml.deployment.LocalEntityResolver so that
>> it will look up publicIds and systemIds in its catalogue. The idea
>> is very well described in the javadoc of EntityResolver class -
>> http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/
>> EntityResolver.html.
>>
>> As the catalogue is to be an xml file, the question I couldn't find
>> an answer to is how to handle XMLs?
>>
>> The run:main goal invokes xmlbeans to generate POJOs for the standard
>> DDs, but I haven't yet been able to figure out why it's done. On the
>> other hand, I'd bet we agreed to not use any of generators and handle
>> the binding ourselves, i.e. create a Loader that maps elements to
>> appropriate POJOs. Is that correct? If so, should the loader and POJO
>> belong to o.a.g.xml.deployment package?
>>
>> Unless such a page already exists, once I have finished it I'l
>> describe how Geronimo handles XML files in Wiki.
>>
>> Cheers,
>> -Jacek
>
>
James
-------
http://radio.weblogs.com/0112098/
Re: How to work with XMLs?
Posted by Juan Albisu <ju...@juanalbisu.com>.
Maybe we can use Jaxb
At 10:56 02/10/2003 +0200, you wrote:
>Hi,
>
>I'm going to enhance o.a.g.xml.deployment.LocalEntityResolver so that
>it will look up publicIds and systemIds in its catalogue. The idea is
>very well described in the javadoc of EntityResolver class -
>http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/EntityResolver.html.
>
>As the catalogue is to be an xml file, the question I couldn't find an
>answer to is how to handle XMLs?
>
>The run:main goal invokes xmlbeans to generate POJOs for the standard DDs,
>but I haven't yet been able to figure out why it's done. On the other
>hand, I'd bet we agreed to not use any of generators and handle the
>binding ourselves, i.e. create a Loader that maps elements to appropriate
>POJOs. Is that correct? If so, should the loader and POJO belong to
>o.a.g.xml.deployment package?
>
>Unless such a page already exists, once I have finished it I'l
>describe how Geronimo handles XML files in Wiki.
>
>Cheers,
>-Jacek