On 2001.11.27 16:37:20 -0500 Anatoly Akkerman wrote:
> > 
> > Can Castor merge nested attributes from all the files into one object? 
> For
> > instance, there are elements under ejb-jar/enterprise-beans/entity and
> > jboss-cmp/enterprise-beans/entity that should all end up in
> > result-dd/enterprise-beans/entity.
> 
> Not that I know of. Doing XSLT, would, probably be the best way for such
> processing. Castor can only instantiate a new object tree that represents
> a given XML file. It cannot 'update' an existing tree from this
> 'incremental' unmarshalling. In general it is an impossible task. Think
> about it. Castor (or any other software) would have to know which pieces
> match where. Say, in the case of ejb descriptors, it would not be enough
> to match and <entity> </entity> from ejb-jar.xml with <entity> </entity>
> from jboss.xml. You would have to match _names_ and whatever else to make
> sure you are updating descriptor object for the right entity bean. This
> already is _semantic_ interpretation of what stands behind the data in
> the
> XML file. You can only write a custom combiner that would take 3 object
> trees (say, from ejb-jar.xml, jboss.xml and jaws.xml) and produce a
> combined tree, matching appripriate descriptors by hand. 
> 
> Actually, I don't know if XSLT will to that for you, it also does not
> know
> anything about the semantics of the XML files you are combining. It seems
> to me, this must be a custom combining solution.

Well, I think I figured out all the hard parts of using xslt to combine
them in this way.  Since all the xml can be validated by a dtd I think it
will work out fine.  Castor instead of jaxb might be an option still,
though.  I'd prefer to use a standards based solution but if licensing
makes it unavailable...


david jencks

> 
> Anatoly.
> 
> > 
> > Just having copies of all 3 docs in the super-jboss is probably easier
> with
> > including an xml entity;-)
> > 
> > david jencks
> > 
> 
> 
> 
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to