Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MoDisco/Components/XML/Documentation/0.8"

< MoDisco‎ | Components‎ | XML
(Install from SVN)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{MoDiscoXMLTabs}}
+
#REDIRECT&nbsp;[[MoDisco/Moved To Help Center]]
 
+
== XML Metamodel ==
+
 
+
=== Definition ===
+
 
+
[[Image:XML.ecorediag5.gif|frame|center|Ecore Generic XML metamodel definition]]
+
 
+
Concepts are described in [http://www.w3.org/TR/2008/REC-xml-20081126/ W3C XML Recommendation] (document and logical structures sections).
+
Concepts for Document Types Declarations are not managed here.
+
Note : there is no composite 'ownedAttribute' reference between Element and Attribute type to avoid ambiguous duplicate owning possibilities considering 'chidren' reference.
+
 
+
=== Requirements ===
+
 
+
To use the plug-in you need:
+
* JDK 1.5 or above
+
* a version of Eclipse 3.5 or above with the following set of plug-ins installed
+
** [[EMF|EMF]] 2.5.0 or higher
+
 
+
=== Install ===
+
 
+
==== Install from SVN ====
+
 
+
* connect to the SVN repository with anonymous access :
+
URL = https://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.modisco
+
 
+
* navigate in repository following 'plugins/trunk' path.
+
* check-out the project named 'org.eclipse.gmt.modisco.infra.xml.core' .
+
* Use "export" menu to export this project as a plug-in (Deployable plug-ins and fragments) in your Eclipse installation. Don't forget to choose the "Package plug-ins as individual jar archives" option.
+
* restart Eclipse to take in account this plug-in
+
 
+
== XML Discoverer ==
+
 
+
The goal of the Generic XML Discoverer plug-in is to allow generic extractions of XML information from a XML file, without the need for a metamodel dedicated to a conforming Document Type Definition(DTD) or XML Schema Description (XSD).
+
 
+
=== Details ===
+
 
+
Considering XML files conforming to DTD or XSD, it will be more convenient to have some dedicated metamodels to manipulate information. However, Generic XML Discoverer is an alternative for miscellaneous XML files (none or uncommon DTD/XSD).
+
 
+
This plug-in aims at analyzing any XML file providing a model describing the information found, conforming to [[#XML_Metamodel|Generic XML metamodel]].
+
Moreover, it allows to serialize back the xml file from the model. Thus, some m2m transformation might be used jointly to upgrade some xml files.
+
 
+
Since the metamodel is a subset of W3C XML concepts, the end user should be aware of some limitations in serializing back some advanced XML contents.
+
 
+
=== Requirements ===
+
 
+
To use the plug-in you need:
+
* JDK 1.5 or above
+
* a version of Eclipse 3.5 or above with the following set of plugins installed
+
** [[EMF|EMF]] 2.5.0 or higher
+
** [[MoDisco/Components/DiscoverersManager|Discoverers Manager]]
+
** [[#XML_Metamodel|Generic XML metamodel]]
+
 
+
=== User manual ===
+
 
+
==== Discovering and browsing from contextual menu ====
+
 
+
The plug-in provides the user with a contextual menu to easily create models.
+
 
+
By right-clicking on a container (folder or project) in the Eclipse Package Explorer view, you can quickly create the KDM Source model of your application (see next Figure). Each of these models can then be used with any other tool compliant with the corresponding metamodel.
+
 
+
[[Image:MoDisco-XML_popup_menu.png|frame|center|Menus in Eclipse to discover XML model]]
+
 
+
A progress bar will appear at the bottom of the window as soon as the operation begins. At the end of the process, the newly created model is automatically opened in the MoDisco model browser, if installed, or in default editor (see next Figure).
+
 
+
[[Image:MoDisco_XMLModelInBrowser.png|frame|center|XML model viewed with MoDisco browser]].
+
 
+
==== Discovering and serializing from Java ====
+
 
+
The plugin exposes a java class which allows to launch the discovering of XML model from a file (within the workspace or not), and get the resulting model.
+
Some options can be set for the discovering operation :
+
 
+
* OPTION_IGNORE_WHITESPACES : a parameter for indicating to ignore white spaces in text portions.
+
* OPTION_LIGHTWEIGHT_MODEL : to minimize the memory size of obtained model. If set to true : comments are ignored, text portions with only spaces and line delimiters are ignored.
+
* OPTION_SILENT_MODE : a parameter to indicate if a browser should be opened on model after discovering.
+
 
+
 
+
The XML content can be serialized back since the model elements are contained in a dedicated org.eclipse.emf.ecore.resource.Resource implementation.
+
 
+
For more details see java documentation on DiscoverXMLModel class.
+
 
+
=== Install ===
+
 
+
==== Install from SVN ====
+
 
+
* connect to the SVN repository with anonymous access :
+
URL = https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.modisco
+
 
+
* navigate in repository following the 'plugins/trunk' path.
+
* check-out the project named 'org.eclipse.gmt.modisco.infra.xml.discoverer' .
+
* Use the "export" menu to export this project as a plug-in (Deployable plug-ins and fragments) in your Eclipse installation. Don't forget to choose the "Package plug-ins as individual jar archives" option.
+
* restart Eclipse to take this plug-in into account
+
 
+
[[Category:MoDisco]]
+

Latest revision as of 11:38, 2 April 2012

  1. REDIRECT MoDisco/Moved To Help Center

Back to the top