Opened 11 years ago
Closed 11 years ago
#2300 closed defect (fixed)
XML Validation Error: SymbolDefinition-1.1.0.xsd
Reported by: | andymorf | Owned by: | jng |
---|---|---|---|
Priority: | low | Milestone: | Maestro-5.1 |
Component: | Maestro | Version: | 2.5.0 |
Severity: | critical | Keywords: | |
Cc: | External ID: |
Description
In Maestro layer editor, pressing the feature-style button the following error appears:
System.Exception: Der Remoteserver hat einen Fehler zurückgegeben: (559) MgDbXmlException.: An exception occurred in DB XML component. Error: XML Indexer: Parse error in document at line 53, char 114. Parser message: attribute 'version' is not declared for element 'SimpleSymbolDefinition' ...
Validating the same layer-document with eclipse-xml editor an equivalent error appears:
cvc-complex-type.3.2.2: Attribute 'version' is not allowed to appear in element 'SimpleSymbolDefinition'.
Changing server/schema/SymbolDefinition-1.1.0.xsd and moving the version-attribute definition from element definition to complexType definition the problem disappears.
Is this a problem with SymbolDefinition-1.1.0.xsd?
Attachments (2)
Change History (6)
by , 11 years ago
by , 11 years ago
Attachment: | SymbolDefinition-1.1.0_modified.xsd added |
---|
comment:1 by , 11 years ago
If you hit the "Edit as XML" toolbar button, then close the XML editor dialog that shows up without making any changes and then do what you were doing to trigger that error, does that error still occur?
comment:2 by , 11 years ago
If opening with "Edit as XML" and pressing "Save" follwing error appears:
System.Xml.Schema.XmlSchemaValidationException: Der Typ 'SimpleSymbolDefinition' ist nicht deklariert. bei System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
In my layerDef the SimpleSymbolDefinition element is without any attributes (as always so far) - but looking at the xsd this should not be allowed (use="required" fixed="1.1.0"). Or am I wrong?
comment:3 by , 11 years ago
Remarks: -If a SimpleSymbolDefinition is inlined in a LayerDefinition a "version" attribute is not permitted because "SimpleSymbolDefinition"-element is declared in LayerDefinition.xsd and references complexType "SimpleSymbolDefinition" in SymbolDefinition.xsd and both declarations don't specify a version attribute. -If a SimpleSymbolDefinition is a standalone document then the element declaration for "SimpleSymbolDefinition" does declare a version attribute.
my Conclusion: Currently Maestro 5RC1 is creating an invalid xml when pressing the feature style button with inlined SimpleSymbolDefinitions.
Question aside: if updating a v2.3 layerdef to v2.4 where does Maestro have its xsd-info from (LayerDefinition-2.4.0.xsd does not exist in ../Schema subdir...)
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed trunk (r7639) and 4.0.x (r7640)
To answer your question: We have strongly-typed classes generated from all the known xsds (up to 2.4) defined in the Maestro API assemblies, so the application code can work with classes and interfaces instead of raw XML documents.
Thus Maestro will work even if the xsd files aren't physically present in the Maestro install. However XML validation via the generic XML editor will fail if the matching xsd file is not present. That's what those files are currently used for.
Layer definition