[xsd-users] errors with attributes named 'type' -> type_' : is not a member of 'xsd::cxx::tree::typ'

Oliver.Kowalke at infineon.com Oliver.Kowalke at infineon.com
Tue Apr 4 03:31:40 EDT 2006


Hello,
I used a modified version of  'hello.xsd' XML-Schema provided by the
documentation.

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:complexType name="hello_type">
		<xsd:sequence>
			<xsd:element name="greeting" type="xsd:string"/>
			<xsd:element name="name" type="xsd:string"
maxOccurs="unbounded"/>
		</xsd:sequence>
<!-- added a attribute named 'type' -->
		<xsd:attribute name="type" use="required">
			<xsd:simpleType>
				<xsd:restriction base="xsd:NMTOKEN">
					<xsd:enumeration value="TOOL"/>
					<xsd:enumeration
value="SERVICE"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:element name="hello" type="hello_type"/>
</xsd:schema>

I get an error if I try to compile (ms vc-7.1) the code generated by
xsd. 

'type_' : is not a member of 'xsd::cxx::tree::type'
see declaration of 'xsd::cxx::tree::type'

How can I fix this error without changing the hello.xsd (I've to use in
another app a XML-schema which I can not change)?

Regards,
Oliver





More information about the xsd-users mailing list