Problem

XML Spy validates XML files, but the CDB itself reports strange errors

Solution

There are many cases where XML Spy 5 validates XML files that are not consistent with the XML specifications. This FAQ intends to provide some insight into the stranger error messages emitted by the configuration database.


ERROR MESSAGE

CDB complains about a specific BACI property(???)


PROBLEM

XML Spy will not complain about excess spaces for attributes. An example:

Bad - <xs:attribute name="relative_address " type="xs:int" use="optional" default="9"/>
Good - <xs:attribute name="relative_address" type="xs:int" use="optional" default="9"/>

ERROR MESSAGE

XMLerror : SAXException java.lang.NullPointerException
CDB.XMLerror: IDL:cosylab.com/CDB/XMLerror:1.0
    at CDB.XMLerrorHelper.read(XMLerrorHelper.java:65)
    at CDB._DALStub.get_DAO(_DALStub.java:29)
    at CDBImpl.DALClient.main(DALClient.java:59)
[david@midnight-vml CDB]$


PROBLEM

This is caused by a misnamed attribute:

<xs:attribute name="double min_delta_trig" type="xs:double" use="optional" default="0.11719"/>

ERROR MESSAGE

XMLerror : XML parser error: Line=8: cvc-elt.1: Cannot find the
declaration of element 'DC2DCConv_Node'.


PROBLEM

A guess is that the "urn:...:...:1.0" must be the same name as the schema, but this needs to be verified. In any event, the name of the schema must be �DC2DCConv_Node� in this specific case.


ERROR MESSAGE

DALClient alma/ABM1/LORR -k corbaloc::midnight-vml:4005/DAL
XMLerror : SAXException org.xml.sax.SAXParseException: An invalid XML
character (Unicode: 0x0) was found in the comment.
CDB.XMLerror: IDL:cosylab.com/CDB/XMLerror:1.0


PROBLEM

???


ERROR MESSAGE

The CDB complains about a specific BACI property.


PROBLEM

Overriding the type of an attribute is not possible:

<xs:attribute name="default_timer_trig" type="xs:integer" use="optional" default="3000000000"/>

should be of type "xs:int".


ERROR MESSAGE

alma/ABM1/FECOMP1 -k corbaloc::midnight-vml:4005/DAL
XMLerror : SAXException org.xml.sax.SAXParseException: Content is not
allowed in prolog.
CDB.XMLerror: IDL:cosylab.com/CDB/XMLerror:1.0
    at CDB.XMLerrorHelper.read(XMLerrorHelper.java:65)
    at CDB._DALStub.get_DAO(_DALStub.java:29)
    at CDBImpl.DALClient.main(DALClient.java:59)


PROBLEM

(Presumably) caused by this (relative_address is not part of a ROEnum):

<xs:restriction base="baci:ROEnum">
    <xs:attribute name="description" type="xs:string" use="optional" default="Helium Compressor Status"/>
    <xs:attribute name="format" type="xs:string" use="optional" default="%04X"/>
    <xs:attribute name="id" type="xs:int" use="optional" default="3"/>
    <xs:attribute name="relative_address" type="xs:int" use="optional" default="6"/>
</xs:restriction>

ERROR MESSAGE

XMLerror : XML parser error: Line=37: src-resolve.4: Components from
namespace 'urn:schemas-cosylab-com:BACI:1.0' are not referenceable from
schema document
'file:/export/home/midnight-vml/david/introot/config/CDB/schemas/FECOMP_Node.xsd'.


PROBLEM

This was caused because the following was missing from FECOMP_Node.xsd:

<xs:import namespace="urn:schemas-cosylab-com:BACI:1.0"/>

ERROR MESSAGE

XML parser error: Line=278: derivation-ok-restriction.2.1.2: Error for
type '#AnonType_set_fridge_stateFECOMP_Node'.  An attribute use in this
type has a type which is not validly derived from the type of the
matching attribute use in the base type.
CDB.XMLerror: IDL:cosylab.com/CDB/XMLerror:1.0


PROBLEM

Caused by this (must specify name, type, use, default):

<xs:attribute name="min_value" default="0"/>

ERROR MESSAGE

The CDB complains that properties inherited from another device�s schema are not available.


PROBLEM

It seems that it is not possible to inherit BACI properties from other schemas. Most likely a problem with expat, but not verified. Could also be something missing from the derived schema.


ERROR MESSAGE

Record does not exists: alma/TICSSIM/DC2DCCONV/getCurrent24VCnv


PROBLEM

This is caused because the "default" of an attribute was not specified:

<xs:attribute name="description" type="xs:string" use="optional"/>

Here are some of Bogdan's additional comments:

<attribute name=�double min_delta_trig � �/> 
cause Null pointer exception in exapt,  but XMLSpy validates it. In inheritance by restriction 
XMLSpy just ignores �new� attributes as �double min_delta_trig � in our case!

<attribute name=�min_delta_trig � �/> (space at the end !!) 
expat interpret as �min_delta_trig� (w/o space), XMLSpy according to above �rule� simply just 
ignore it.

Duplicate attributes: expat complains, meanwhile XMLSpy does not complain and take the last one. XMLSpy works fine if MS XML parser is used.

Bogdan

-- DavidFugate - 28 Jun 2005