I am using Xerces 1.7.0 and am having a problem using an attributeGroup. When 
validating this document using other validators, (XML Spy, Microsoft), I have no 
problem. Using Xerces I get the following error message:

A <attributeGroup> declaration that has a ref attribute, cannot have child content.

Below is a portion of the schema definition and the document that fails validation. I 
use this attributGroup in many diferent schemas and have no problems with it. Any idea 
what's going on? 

Thanks,

Steve

        <xs:attributeGroup name="OTA_PayloadStdAttributes">
                <xs:attribute name="EchoToken" type="xs:string"/>
                <xs:attribute name="TimeStamp" type="xs:dateTime"/>
                <xs:attribute name="Target" default="Production">
                        <xs:simpleType>
                                <xs:restriction base="xs:NMTOKEN">
                                        <xs:enumeration value="Test"/>
                                        <xs:enumeration value="Production"/>
                                </xs:restriction>
                        </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="Version" type="xs:string"/>
                <xs:attribute name="SequenceNmbr" type="xs:integer"/>
        </xs:attributeGroup>


        <xs:element name="OTA_HotelInvCountNotifRQ">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element ref="UniqueId" minOccurs="0"/>
                                <xs:element ref="HotelReference" minOccurs="0"/>
                                <xs:element ref="BaseInvMessages" minOccurs="0"/>
                                <xs:element ref="OffSellInvMessages" minOccurs="0"/>
                        </xs:sequence>
                        <xs:attributeGroup ref="OTA_PayloadStdAttributes">
                        </xs:attributeGroup>
                </xs:complexType>
        </xs:element>

<OTA_HotelInvCountNotifRQ EchoToken="V8493847" Version="1" 
TimeStamp="2002-01-15T15:35:18" Target="Production" 
xmlns="http://www.opentravel.org/OTA"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opentravel.org/OTA OTA_HotelInvCountNotifRQ.xsd">
        <UniqueId Type="POVERALL" Id="_" Instance=""/>
        <HotelReference HotelCode="03049" ChainCode="BW" BrandCode=""/>
        <BaseInvMessages>
                <BaseInvMessage RatePlanClass="PROMO" Inv="50">
                        <DateTimeSpan StartInstant="2002-11-15T00:00:00" 
Duration="P15D"/>
                        <DOWPattern Mon="true" Tues="false" Wed="false" Thurs="false" 
Fri="true" Sat="true" Sun="true"/>
                </BaseInvMessage>
        </BaseInvMessages>
</OTA_HotelInvCountNotifRQ>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to