Closed mchlrch closed 4 years ago
struggeling with indentions. default lists come without indentions, e.g. 'referenceables': https://github.com/zazuko/rdf-mapping-dsl/blob/issue_10_formatter/runtime-EclipseXtext/airport-mapping/airport-sources.xrm#L5
if we want to see an indention, maybe we need to add markers like curly braces. see here on 'classes': https://github.com/zazuko/rdf-mapping-dsl/blob/issue_10_formatter/runtime-EclipseXtext/airport-mapping/vocabularies.xrm#L8
@mchlrch let's talk.
indentions are fine now.
is there any test data for a DialectGroup?
RdfMappingFormatter.xtend is full of warnings - unfortunately this is by design, thanks to itemis.
is there any test data for a DialectGroup?
Odd, it seems like we implemented a feature that nobody is using ... or it is used but kept as a secret ;-)
Anyhow. I found a default dialect description for CSV here: https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions
{
"encoding": "utf-8",
"lineTerminators": ["\r\n", "\n"],
"quoteChar": "\"",
"doubleQuote": true,
"skipRows": 0,
"commentPrefix": "#",
"header": true,
"headerRowCount": 1,
"delimiter": ",",
"skipColumns": 0,
"skipBlankRows": false,
"skipInitialSpace": false,
"trim": false
}
In the DSL, this would look as follows:
dialect myCsvDialect {
delimiter ","
commentPrefix "#"
doubleQuote true
encoding "utf-8"
header true
headerRowCount 1
lineTerminators "\\r\\n"
quoteChar '\\"'
skipBlankRows false
skipColumns 0
skipInitialSpace false
skipRows 0
trim false
}
That would be equivalent to the default, besides lineTerminators
where we apparently only want to be able set one value, it seems.
So, that dialect could be added to one of the CSV example mappings, for example in elcom-strompreise
https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#formatting