Revision 40799 branches/v02_desarrollo/libraries/sld/temp/org.gvsig.sldsupport.lib.impl/src/main/java/org/gvsig/sldsupport/impl/sld1_0_0/parsing/FeatureStyleElement.java
FeatureStyleElement.java | ||
---|---|---|
25 | 25 |
String txt = null; |
26 | 26 |
int tag = 0; |
27 | 27 |
SLDFeatureStyle resp = new SLDFeatureStyle(); |
28 |
txt = parser.getAttributeValue(null, SLDTags.VERSION_ATTR); |
|
29 |
resp.setVersion(txt); |
|
30 | 28 |
|
29 |
if (SLDUtils.isStr(ent_name, SLDTags.FEATURESTYLE)) { |
|
30 |
txt = parser.getAttributeValue(null, SLDTags.VERSION_ATTR); |
|
31 |
if (txt == null) { |
|
32 |
throw new SLDReadException("The 'version' attribute is mandatory in " |
|
33 |
+ SLDTags.FEATURESTYLE); |
|
34 |
} else { |
|
35 |
resp.setVersion(txt); |
|
36 |
} |
|
37 |
} |
|
38 |
|
|
31 | 39 |
tag = parser.nextTag(); |
32 | 40 |
String name = parser.getName(); |
33 | 41 |
while (!(SLDUtils.isStr(name, ent_name) && tag == KXmlParser.END_TAG)) { |
... | ... | |
70 | 78 |
resp.getRules().add(rule); |
71 | 79 |
break; |
72 | 80 |
} |
73 |
break; |
|
81 |
/* |
|
82 |
* Any other entity causes parsing error |
|
83 |
*/ |
|
84 |
throw new SLDReadException( |
|
85 |
"Bad SLD file. Unexpected entity in feature[type] style: " + name); |
|
74 | 86 |
case KXmlParser.END_TAG: |
75 | 87 |
break; |
76 | 88 |
case KXmlParser.TEXT: |
Also available in: Unified diff