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

RE: building an object model of a XML schema

  • From: Jeff Lowery <jlowery@s...>
  • To: 'Ronald Bourret' <rpbourret@r...>, xml-dev@l...
  • Date: Wed, 25 Jul 2001 14:12:16 -0700

RE: building an object model of a XML schema

> However, I think this requires a big caveat -- that the generated
> objects are probably only a starting place for the real 
> objects. 

Yes, I think the generated objects represent the finest-grained level of
data access, on top of which layers of classes with higher-level
abstractions are built; efficiency could be concern, however. Now, it may be
possible to add information to a complex type that says 'treat this
atomically', so the generator knows that 

<element name="point">
	<complexType>
		<sequence>
			<element name="x" type="decimal"/> <!-- ne number,
ne decimal -->
			<element name="y" type="decimal"/>
			<element name="unit">
				<simpleType>
					<restriction base="string">
						<enumeration value="mm"/>
						<enumeration value="in"/>
						<enumeration value="pica"/>
						<enumeration value="pt"/>
					</restriction>
				<simpleType>
			</element>
		</sequence>
	</complexType>
</element>
<!-- pause while fingers uncramp -->

needs to have some interface implemented that allows the data content of all
three children to be set at once. I could see that being useful. Yes, it
does require the schema author to have knowledge of the application, but
some applications developers do talk to data modelers, so it's not
inconceivable.






> 
> Note that I'm not sure if the various data binding products 
> (e.g. JAXB,
> Castor) give you enough control to use objects that are substantially
> different from the XML. That is, they might rely on a strict mapping
> with few choices. In such a case, it might be necessary to 
> transform the
> XML document before creating objects and after serializing them. A lot
> of people who use my software to transfer data between XML 
> and databases
> do this.
> 
> By the way, I've added a reference to this discussion to the paper.
> 
> -- Ron
> 
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org 
<http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@l...

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.