OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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">
			<element name="x" type="decimal"/> <!-- ne number,
ne decimal -->
			<element name="y" type="decimal"/>
			<element name="unit">
					<restriction base="string">
						<enumeration value="mm"/>
						<enumeration value="in"/>
						<enumeration value="pica"/>
						<enumeration value="pt"/>
<!-- 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

> 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@lists.xml.org