[Geoserver-devel] [jira] (GEOS-6928) CSSParseException: Invalid input ' ', expected ClassName or 'n'

Tommaso Di Bucchianico created an issue

GeoServer / BugGEOS-6928

CSSParseException: Invalid input ’ ', expected ClassName or ‘n’

Issue Type:

BugBug

Affects Versions:

2.7-beta

Assignee:

Andrea Aime

Attachments:

buildings.css

Components:

CSS

Created:

06/Mar/15 1:44 AM

Environment:

Ubuntu 12.04

Labels:

css style

Priority:

MinorMinor

Reporter:

Tommaso Di Bucchianico

I’m trying to convert css styles to sld using the new css converter from the command line :

java -cp "lib/gs-css/*" org.geotools.styling.css.CssTranslator buildings.css buildings.sld

My css code (see also attachment):

/* fill */
[@scale > 5000.1] {
    fill: [fill_color];
    stroke: [border_color];
    stroke-width: [stroke_width];
}

/* special graphic fill */
[@scale > 5000.1] [key_external IN('fg')] : fill {

    stroke: #ffffff;
    stroke-width: 2.0;
}

Stacktrace:

> Exception in thread “main” org.geotools.styling.css.CSSParseException: Invalid input ’ ', expected ClassName or ‘n’ (line 9, column 68)
> at org.geotools.styling.css.CssParser.parse(CssParser.java:97)
> at org.geotools.styling.css.CssTranslator.main(CssTranslator.java:1636)

The converter fails because of the blank between : and the word “fill”:

[@scale > 5000.1] [key_external IN('fg')] : fill 

Blanks in this place were allowed from the old css converter.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo