Hello Alberto, it looks like again attaching the Schema file did not work. Now I am sending it as text.
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:simpleType name="Bit_Offset_Range" final=""> <xs:annotation> <xs:documentation>Range [0..7]</xs:documentation> </xs:annotation> <xs:restriction base="xs:unsignedByte"> <xs:minInclusive value="0"/> <xs:maxInclusive value="7"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Ana_IO_Range"> <xs:annotation> <xs:documentation>Range [1..32]</xs:documentation> </xs:annotation> <xs:restriction base="xs:unsignedByte"> <xs:minInclusive value="1"/> <xs:maxInclusive value="32"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Dig_IO_Range" final="restriction"> <xs:annotation> <xs:documentation>Range [1..4096]</xs:documentation> </xs:annotation> <xs:restriction base="xs:unsignedInt"> <xs:minInclusive value="1"/> <xs:maxInclusive value="4096"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Ana_Type" final="list"> <xs:annotation> <xs:documentation>Format enumeration for analog IOs</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:enumeration value="signed"/> <xs:enumeration value="unsigned"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Access_Byte_Mask"> <xs:annotation> <xs:documentation>String with 8 digits in [0, 1]</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:length value="8"/> <xs:pattern value="[0-1]{8}"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Drv_Name_Type"> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="32"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="Bus_Instance_Name_Type"> <xs:annotation> <xs:documentation>Length limited, non-empty string for bus names</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="512"/> </xs:restriction> </xs:simpleType> <xs:complexType name="Segment_Offset_Type"> <xs:annotation> <xs:documentation>Byte- and Bit-Address to specify a segment offset</xs:documentation> </xs:annotation> <xs:attribute name="segmentByteOffset" type="xs:unsignedInt" use="required"/> <xs:attribute name="segmentBitOffset" type="Bit_Offset_Range" use="required"/> </xs:complexType> <xs:complexType name="Dig_InOut_Type"> <xs:annotation> <xs:documentation>Type for the mapping of a digital IO</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="Start" type="Segment_Offset_Type"/> <xs:element name="End" type="Segment_Offset_Type" minOccurs="0"/> </xs:sequence> <xs:attribute name="krcStartIndex" type="Dig_IO_Range" use="required"/> <xs:attribute name="segmentID" type="xs:unsignedInt" use="required"/> </xs:complexType> <xs:complexType name="Ana_InOut_Type"> <xs:annotation> <xs:documentation>Type for the mapping of an analog IO</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="Start" type="Segment_Offset_Type"/> <xs:element name="End" type="Segment_Offset_Type"/> <xs:element name="Format"> <xs:complexType> <xs:attribute name="cal" type="CAL_Range"/> <xs:attribute name="type" type="Ana_Type" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="krcIndex" type="Ana_IO_Range" use="required"/> <xs:attribute name="segmentID" type="xs:unsignedInt" use="required"/> </xs:complexType> <xs:element name="Application"> <xs:annotation> <xs:documentation>Root Element</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="ProcessData"> <xs:complexType> <xs:sequence> <xs:element name="Segment" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="AccessMask" minOccurs="0"> <xs:complexType> <xs:attribute name="byteNr" type="xs:unsignedInt" use="required"/> <xs:attribute name="mask" type="Access_Byte_Mask" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="drvName" type="Drv_Name_Type" use="required"/> <xs:attribute name="busInstanceName" use="required"> <xs:simpleType> <xs:restriction base="Bus_Instance_Name_Type"/> </xs:simpleType> </xs:attribute> <xs:attribute name="byteOffset" type="xs:unsignedInt" use="required"/> <xs:attribute name="byteSize" type="xs:unsignedInt" use="required"/> <xs:attribute name="segmentID" type="xs:unsignedInt" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Mapping"> <xs:complexType> <xs:sequence> <xs:element name="Output"> <xs:complexType> <xs:sequence> <xs:element name="Digital"> <xs:complexType> <xs:sequence> <xs:element name="Out" type="Dig_InOut_Type" minOccurs="0" maxOccurs="4096"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Analog"> <xs:complexType> <xs:sequence> <xs:element name="Anout" type="Ana_InOut_Type" minOccurs="0" maxOccurs="32"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Input"> <xs:complexType> <xs:sequence> <xs:element name="Digital"> <xs:complexType> <xs:sequence> <xs:element name="In" type="Dig_InOut_Type" minOccurs="0" maxOccurs="4096"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Analog"> <xs:complexType> <xs:sequence> <xs:element name="Anin" type="Ana_InOut_Type" minOccurs="0" maxOccurs="32"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="IOLinking"> <xs:complexType> <xs:sequence> <xs:element name="IOLink" minOccurs="0" maxOccurs="32"> <xs:complexType> <xs:attribute name="krcInputIndex" type="Dig_IO_Range" use="required"/> <xs:attribute name="krcOutputIndex" type="Dig_IO_Range" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Options" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="DataIntegrity"> <xs:complexType> <xs:attribute name="value" type="xs:boolean" use="required"/> </xs:complexType> </xs:element> <xs:element name="NrOfInOut"> <xs:complexType> <xs:attribute name="value" type="Dig_IO_Range" use="required"/> </xs:complexType> </xs:element> <xs:element name="Trigger" minOccurs="0"> <xs:complexType> <xs:sequence minOccurs="0"> <xs:element name="Bus" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="busInstanceName" type="Bus_Instance_Name_Type" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Stream" minOccurs="0"> <xs:complexType> <xs:sequence minOccurs="0"> <xs:element name="Bus" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="busInstanceName" type="Bus_Instance_Name_Type" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="kukaVersion" type="xs:string" use="required"/> </xs:complexType> </xs:element> <xs:simpleType name="CAL_Range" final="restriction"> <xs:annotation> <xs:documentation>Range[1..65535]</xs:documentation> </xs:annotation> <xs:restriction base="xs:unsignedInt"> <xs:minInclusive value="1"/> <xs:maxInclusive value="65535"/> </xs:restriction> </xs:simpleType> </xs:schema> Jörg -----Ursprüngliche Nachricht----- Von: Alberto Massari [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. April 2008 11:37 An: [email protected] Betreff: Re: Problem with XercesDOMParser Hi Jorg, you didn't attach the XMLSchema... Alberto Atzenhoefer Joerg wrote: > Hello, > > I am working with Xercesc 2.7.0 in a VxWorks environment. In general > it works fine but there is a problem with one certain XML-file, where > the parser does not return, i.e. it looks like the parser runs into an > endless loop. The schema file has some type definitions for elements > (e.g. "Dig_InOut_Type"). These elements are not generally required and > in the attached XML file they are missing (see comments starting with > "e.g."). > XML and schema file are set up with XML Spy. > I tried to parse this file with the Xercesc Windows version and the > behaviour is the same. > Is this a known problem ? What may be wrong with my code ? > Attached is the source code for parsing and the XML and Schema file. > > Regards > Jörg
