Giter VIP home page Giter VIP logo

xtext-xsd-resourceprovider's Introduction

xtext-xsd-resourceprovider

Two projects to make XSD references possible in your Xtext grammar. This project uses the concepts explained in https://christiandietrich.wordpress.com/2011/07/17/xtext-2-0-and-uml/.

Tech

  • Java 8
  • Xtext
  • Eclipse XML Schema Editor

How To Use

  • Import the org.eclipse.xtext.xsd and org.eclipse.xtext.xsd.ui projects into your workspace.
  • Add the following required bundles to the MANIFEST.MF of your core Xtext DSL project:
org.eclipse.xtext.xsd,
org.eclipse.xtext.xsd.ui,
org.eclipse.xsd
  • Add the following lines to your .mwe2 generate file:
Workflow {
  bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
    scanClassPath = true
    platformUri = rootPath
    registerGeneratedEPackage = "org.eclipse.xsd.XSDPackage"
    registerGenModelFile = "platform:/resource/org.eclipse.xsd/model/XSD.genmodel"
  }
}
  • Add the following import to your Xtext grammar file (.xtext):
import "http://www.eclipse.org/xsd/2002/XSD" as xsd

Note: Imports should be added between the grammar and generate declarations.

  • Now your Xtext DSL can reference to elements defined in XSD files. For example, the following rule is now possible:
TypeInstance:
  'instance' name=ID ':' type=[xsd::XSDTypeDefinition|QN];
  
QN:
  ID ('.' ID)*;

xtext-xsd-resourceprovider's People

Contributors

dvdkruk avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

xtext-xsd-resourceprovider's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.