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.
MoDisco/Components/XML
The Generic XML Metamodel represents a subset of concepts defined in W3C XML Recommendation.
Its purpose is to represent XML content without taking care of conformance to concepts described in a Document Type Definition(DTD) or in a XML Schema Description (XSD) (i.e. without having a metamodel dedicated to one or many DTD/XSD).
It is an alternative to the metamodel definition provided with EMF plugins (nsuri : http://www.eclipse.org/emf/2003/XMLType) : we think that a more understandable model navigation, without the use of the Extended Ecore Modeling FeatureMap type, can be proposed to the end user. In return, some filtering (on node children) might be more time expensive.
Contents
Definition
W3C XML Recommendation describes those concepts in document and logical structures sections. Concepts for Document Types Declarations are not managed here.
km3 definition
package XML {
abstract class Node { attribute name : String; reference parent[0-1] : Element oppositeOf children; }
class Attribute extends Node { attribute value : String; }
class Text extends Node {
}
class Element extends Node { reference children[*] ordered container : Node oppositeOf parent; }
class Root extends Element { reference namespaces[*] ordered container : Namespace; reference dtd[0-1] container : DocumentTypeDeclaration; }
class Namespace extends Attribute {
}
class Comment extends Node {
}
class DocumentTypeDeclaration extends Node { attribute publicID[0-1] : String; attribute systemID[0-1] : String; }
class CDATA extends Text {
}
class ProcessingInstruction extends Node { attribute data : String; } }
package PrimitiveTypes { datatype Boolean; datatype Integer; datatype String; }
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 2.5.0 or higher
Team
Fabien Giquel (Mia-Software)
Associated Discoverers
The Generic XML discoverer : XML Discoverer
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 'plugins/trunk' path.
- check-out the project named 'org.eclipse.gmt.modisco.infra.xml.core' .
- Use "export" menu to export this project as a plugin (Deployable plugins and fragments) in your Eclipse installation. Don't forget to choose "Package plug-ins as individual jar archives" option.
- restart Eclipse to take in account this plug-in