Java Reference
In-Depth Information
HTML from our requirements model. In this case, we also need to import the
XHTML schema into EMF to create our model. EMF then provides serialized
instance models that conform to the schema, thereby producing valid HTML doc-
uments. We'll be able to work only with model-to-model transformation scripts,
leaving the hassle of dealing with angle brackets for the requirements report.
6.7.1 Importing an XSD
Unfortunately, no XHTML model is present in our Metamodel Explorer view,
even with the WebTools project installed. Nevertheless, a simple search for
“xhtml xsd” on the Internet revealed what we need at www.w3.org/2002/08/
xhtml/xhtml1-strict.xsd.
We start by creating a new org.w3c.xhtml DSL Project and copying the
previous link to the Clipboard; as you will see, you don't need to download the
model. Right-click the model folder and select New
Other
Domain-Specific
Language
Domain Gen). Name the EMF
generator model xhtml.genmodel and proceed to the next page in the wizard,
where you select the XML Schema model importer. If you don't see this importer,
you need to install the XSD feature from the EMF or Ganymede update site. The
next page provides a Model URIs field where you paste the URL to the schema,
followed by Load . On the Package Selection page, check the org.w3._1999.
xhtml package in the Root packages table and the XMLNamespace Referenced
generator models table, as shown in Figure 6-14.
Domain Generator Model (Ctrl+3
Figure 6-14
New EMF Model dialog
Search WWH ::




Custom Search