[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML [~serialization] and Objects

  • From: David Brownell <db@E...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Tue, 29 Sep 1998 10:44:55 -0700

dtd serialization
Mark Baker wrote:
> 
> David Brownell wrote:
> 
> >         <BEAN CLASS="com.example.foo.SimpleBean">
> >             <PROPERTY NAME="prop1" DCD:i4>49</PROPERTY>
> >             <PROPERTY NAME="prop2" DCD:string>hello world</PROPERTY>
> >             ...
> >             </BEAN>
> 
> <SimpleBean>
>   <prop1 DCD:i4>49</prop1>
>   <prop2 DCD:string>hello world</prop2>
> </SimpleBean>

(A different way to use java.beans.Introspector ... not using
a predefined DTD to ensure validatability ...)


> I think the most important goal of bidirectional Java/XML
> interop is in going *from* XML *to* Java, not the other
> way around.

But then where would the XML content come from?  I don't think
you can solve one problem without the other.  If one assumes Java,
then DCD tagging isn't needed:

	<com.example.foo.SimpleBean>
		<prop1>49</prop1>
		<prop2>hello world</prop1>
		</com.sun.example.foo.SimpleBean>

since all the type info is in the class for SimpleBean!  Not
particularly validatable unless you generate a DTD from the
class file, which may be an issue.  (I'm assuming there that
most Java names are legal XML names, but there are surely
some exceptions.)


>	  As such, asking document authors
> to follow a Bean-specific DTD isn't such a good idea.  Network
> effects are your friend! 8-)

The question was originally about serialization, so I was
assuming that such documents wouldn't generally be written
by a document author so much as by a tool of some kind.
Also, which particular network effects to leverage?  ;-)


One more comment:  I really see "serialization" approaches
as being in a different direction than document based ones.

That is, if I'm working with an OBI/OTP/OFX DTD for some
sort of E-Commerce system, the external format is defined
already.  There are elements in the DTD that won't match
the model of a property.  If we associate elements with
beans in at least some cases, they'll need to be able to
choose which elements correspond to properties.  Also, they
need to arrange "appropriate" handling for non-property
elements (whatever that may be).

- Dave

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.