[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Hello,
I'm trying to produce an Encore model and Sources from a Schema. The
goal is to produce documents which adhere to the schema by having users
work with editors generated using EMF (pretty basic). However, I'm
encountering issues because the xml files (and model) all have the
Element "DocumentRoot" in the root position, which will not do. Is there
any way I can stop the generation of a "DocumentRoot" model type and
element? It seems strange that the api makes the assumption that when
attempting to generate a model from a schema, that somehow the developer
doesn't want the content to be valid against said schema. If 1.1
supported production of valid content (ie no DocumentRoot), what was the
decision in 2.0 that diverged from this logic?
From
http://dev.eclipse.org/viewcvs/indextools.cgi/emf-home/main.html?rev=1.74
Added support for document roots. In EMF 1.1, a global element
declaration was mapped to an EClass. In 2.0, every namespace will
have a single special EClass, by default named DocumentRoot, which
contains a feature for every global element or attribute declaration
in the namespace. These represent open content features which may be
used in feature maps corresponding to wildcards. An instance document
based on an XML Schema will now contain a single instance of the
document root, exactly one feature of which will be set to contain
the actual root element.
Cheers,
Mark Diggory
--
Mark Diggory
Open Source Software Developer
Apache Jakarta Project
http://jakarta.apache.org