Open maxcollombin opened 3 months ago
@maxcollombin the stylingRuleList?
is the nested rules and the (propertyAssignmentList SEMI)?
is the symbolizer.
Like for the CartoSym-JSON, how the grammar / schema is defined does not necessarily need to use the exact same terms as the UML, since it expresses something different.
But we could try to make this a bit more consistent/obvious, by renaming to these to e.g., nestedStylingRulesList
and symbolizerPropertyAssignments
?
But the same stylingRuleList
also applies the top-level styling rules of the style, that's why it's not called nestedStylingRulesList
.
By name
, I imagine you mean the name of the stylingRule
for the legend labeling purpose? That one is missing right now.
Same remark/question for the name
property of the IdentifierExpression
class relative to the Expression class.
Does the name
property correspond to a grammar element? Sorry for the obvious questions (still learningđŸ˜†)
@maxcollombin
Does the name property correspond to a grammar element? Sorry for the obvious questions (still learningđŸ˜†)
There is not currently a single element corresponding to that in the CartoSym-CSS grammar.
It corresponds primarily to the IDENTIFIER
when used specifically in this rule:
idOrConstant: IDENTIFIER | expConstant;
We probably need to clarify whether the .
object member operator and the [ ]
array indexing operators are folded in and considered part of an IdentifierExpression, or their own expression types. In our CMSS implementation, these are separate classes of expressions, but these concepts do not exist yet in CQL2.
So whether you consider expression DOT IDENTIFIER
in this rule a single IdentifierExpression and that whole object.member
is its name is not yet well defined (same for array[10]
in this rule).
I'm also having some difficulty relating this class diagram:
to this part of the grammar:
///////////////////////////////
// High level style sheet rules
///////////////////////////////
styleSheet: metadata* stylingRuleList;
metadata:
'.' IDENTIFIER CHARACTER_LITERAL;
stylingRuleList:
stylingRule
| stylingRuleList stylingRule;
stylingRule:
( selector )*
LCBR
(propertyAssignmentList SEMI)?
stylingRuleList?
RCBR;
selector:
IDENTIFIER
| LSBR expression RSBR ;
///////////////////////////////
Regardin the Symbology Core Classes UML Diagram, I'd rather see something like this:
Here is the associated PlantUML code syntax:
StyleSheet : metadata 0..*
StyleSheet : stylingRuleList 1
Metadata : title: string[0..1]
Metadata : description: string[0..1]
Metadata : authors: string[0..*]
Metadata : keywords: string[0..*]
Metadata : geoDataClasses: string[0..*]
StylingRuleList : stylingRule: StylingRule[1..*]
StylingRule : name: string
StylingRule : symbolizer: Symbolizer[0..1]
StylingRule : selector: Expression[0..1]
StylingRule : nestedRules: StylingRuleList[0..1]
Symbolizer : visibility: bool
Symbolizer : opacity: float
Symbolizer : zOrder: integer
StyleSheet "1" -- "*" Metadata
StyleSheet "1" -- "1" StylingRuleList
StylingRuleList "0" *-- "*" StylingRule
StylingRule "0" *-- "1" Expression
StylingRule "0" *-- "*" Symbolizer
@maxcollombin
I'd rather see something like this:
In my view, conceptually a class with only one element is unnecessary.
It's cleaner to see it as a StylingRule with a 0..*
multiplicity.
The stylingRuleList
grammar rule is just a convenience for describing the grammar.
In my view, the grammar for the encoding does not directly relate to the conceptual / logical model at all (e.g., none of symbolizer properties / system identifier etc. appear at all in the grammar).
name
,symbolizer
andnestedRules
are present in the spec but not in the grammar