Index: v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend
===================================================================
--- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend	(revision 86)
+++ v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend	(revision 87)
@@ -22,4 +22,5 @@
 import org.eclipse.xtext.generator.IGenerator
 import de.ugoe.cs.swe.bnftools.ebnf.SectionHeading
+import org.eclipse.core.resources.ResourcesPlugin
 
 /**
@@ -39,14 +40,14 @@
 				//generate pdf
 				var uri = (fsa as IFileSystemAccessExtension2).getURI(e.name + ".fo");
-				var String fullUri = workspacePath + uri.path.substring(10, uri.path.length);
-				var File file = new File(fullUri);
-
+				var String relativePath = uri.path.substring(10);
+				var String realPath = ResourcesPlugin.getWorkspace().root.findMember(relativePath).rawLocation.toOSString;
+				var File file = new File(realPath);
 				if (file.exists) {
 					//true -> pdf, false -> rtf
 					
 					if(mode){
-						FoToPdfOrRtf.createRtfFromFo(fullUri.substring(0, fullUri.length - 3));
+						FoToPdfOrRtf.createRtfFromFo(realPath.substring(0, realPath.length - 3));
 					}else{
-						FoToPdfOrRtf.createPdfFromFo(fullUri.substring(0, fullUri.length - 3));
+						FoToPdfOrRtf.createPdfFromFo(realPath.substring(0, realPath.length - 3));
 					}
 					
@@ -90,7 +91,7 @@
 	
 		<fo:page-sequence  master-reference="A4">
-			<fo:flow flow-name="xsl-region-body" font-family="verdana">
+			<fo:flow flow-name="xsl-region-body" font-family="Monospaced" font-size="8pt">
 				
-				<fo:block span="all"  text-align="center" text-indent="1em" font-family="Arial" font-size="20pt" font-weight="bold" background-color="#EEEEEE" line-height="20mm">«bnf.
+				<fo:block span="all"  text-align="center" text-indent="1em" font-family="Monospaced" font-size="20pt" font-weight="bold" background-color="#EEEEEE" line-height="20mm">«bnf.
 		name»</fo:block>
 						
@@ -113,13 +114,13 @@
 	def compile(SectionHeading sHeading) '''
 		
-		<fo:block role="H1" font-weight="bold"> «sHeading.sectionHeader» </fo:block>
+		<fo:block role="H1" font-family="SansSerif" font-size="12pt" line-height="2em"> «sHeading.sectionHeader» </fo:block>
 		
 	'''
 
-	def compile(Rule rule) '''«System.out.println(rule.name)»<fo:block><fo:inline id="«rule.name»"	color="purple">«IF rule.rulenumber != 0»«rule.
+	def compile(Rule rule) '''<fo:block><fo:inline id="«rule.name»"	color="black">«IF rule.rulenumber != 0»«rule.
 		rulenumber».	«ENDIF»«rule.name»</fo:inline>	::=	«rule.definitionList.compile»</fo:block>'''
 
-	def compile(DefinitionList dList) '''«IF dList!= null»«FOR sDef : dList.singleDefinition»«sDef.compile»«IF !sDef.equals(
-		dList.singleDefinition.last)» | «ENDIF»«ENDFOR»«ENDIF»'''
+	def compile(DefinitionList dList) '''«IF dList!= null»«FOR sDef : dList.singleDefinition»«sDef.compile+" "»«IF !sDef.equals(
+		dList.singleDefinition.last)»| «ENDIF»«ENDFOR»«ENDIF»'''
 
 	def compile(SingleDefinition sDefinition) '''«FOR term : sDefinition.terms»«term.compile»«ENDFOR»'''
@@ -127,21 +128,21 @@
 	def compile(Term term) '''«IF term.termAtom != null»«term.termAtom.compile»«ENDIF»«IF term.termOptionalSequence !=
 		null»«term.termOptionalSequence.compile»«ENDIF»«IF term.termRepeatedSequence != null»«term.termRepeatedSequence.
-		compile»«ENDIF»«IF term.termGroupedSequence != null»«term.termGroupedSequence.compile»«ENDIF»'''
+		compile»«ENDIF»«IF term.termGroupedSequence != null»«term.termGroupedSequence.compile»«ENDIF» '''
 
-	def compile(GroupedSequence gSequ) '''«FOR d : gSequ.definitionList»«d.compile»«ENDFOR»'''
+	def compile(GroupedSequence gSequ) '''( «FOR d : gSequ.definitionList»«d.compile+" "»«ENDFOR» )'''
 
-	def compile(RepeatedSequence rSequ) '''{«FOR d : rSequ.definitions»«d.compile»«ENDFOR»}«IF rSequ.morethanonce»+«ENDIF»'''
+	def compile(RepeatedSequence rSequ) '''{ «FOR d : rSequ.definitions»«d.compile+" "»«ENDFOR» }«IF rSequ.morethanonce»+«ENDIF»'''
 
-	def compile(OptionalSequence oSequ) '''(«FOR d : oSequ.definitionList»«d.compile»«ENDFOR»)'''
+	def compile(OptionalSequence oSequ) '''[ «FOR d : oSequ.definitionList»«d.compile+" "»«ENDFOR» ]'''
 
 	def compile(Atom atom) '''
 	«IF atom.atomRuleReference != null»«atom.atomRuleReference.compile»«ENDIF»«IF atom.atomStringRule != null»«atom.
-		atomStringRule.compile»«ENDIF»'''
+		atomStringRule.compile»«ENDIF» '''
 
 	def compile(RuleReference rRef) '''<fo:basic-link internal-destination="«rRef.ruleref.name»" text-decoration="underline" color="blue">«rRef.
-		ruleref.name»</fo:basic-link>	'''
+		ruleref.name»</fo:basic-link> '''
 
-	def compile(StringRule sRule) '''«IF sRule.colon != null»«sRule.colon»«ENDIF»«IF sRule.literal != null»«sRule.
-		literal.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")»	«ENDIF»'''
+	def compile(StringRule sRule) '''«IF sRule.colon != null»«sRule.colon»«ENDIF»«IF sRule.literal != null»«'"'+sRule.
+		literal.trim.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")+'"'»	«ENDIF»'''
 
 }
