Hi,

Thanks for taking a look at this. As it turns out the problem was with the xml 
document. In trying to keep my example short I actually cut out the portion that was 
causing the problem. When using the full document it doesn't validate with 2.1 either.

                        <xs:attributeGroup ref="OTA_PayloadStdAttributes">
                                <xs:annotation>
                                        <xs:documentation xml:lang="en">This element 
defines standard attributes that appear on the root element for all OTA 
payloads.</xs:documentation>
                                </xs:annotation>
                        </xs:attributeGroup>

The document includes an annotation element that is a child of the attributeGroup 
element. That is what Xerces was complaining about. Remove it and Xerces is happy.

                        <xs:attributeGroup ref="OTA_PayloadStdAttributes"/>

Thanks again,

Steve

-----Original Message-----
From: Gareth Reakes [mailto:gareth@;decisionsoft.com]
Sent: Friday, October 25, 2002 12:48 AM
To: [EMAIL PROTECTED]
Subject: RE: Problem with attributeGroup


Hi,
        Your cut down example does validate with 2.1. Unfortunately I do 
not have a copy of 1.7 around to test against. There have been many bug 
fixes since then although I cannot find an entry in Bugzilla relating to 
this. 
        A shot in the dark would be to try self closing the

<xs:attributeGroup ref="OTA_PayloadStdAttributes">

because I suppose it does have text content.

Gareth

On Thu, 24 Oct 2002, Oliver, Steve wrote:

> Gateth,
> 
> Unfortunately changing versions is not an option at this point in our project. The 
>thing that makes this problem interesting is that I use the same attribute group in 
>several other schemas with no problems. Do you think this is a problem that is 
>specific to 1.7? I can try using 2.x and see what happens but even if it works I'm 
>kind of stuck with 1.7 for the project I'm working on.
> 
> Any insights that you may be able to share on this will be greatly appreciated.
> 
> Steve
> 
> -----Original Message-----
> From: Gareth Reakes [mailto:gareth@;decisionsoft.com]
> Sent: Thursday, October 24, 2002 12:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Problem with attributeGroup
> 
> 
> Hi,
>       have you tried a more recent version of xerces? Stable releases 
> are up to 2.1.
> 
> Gareth
> 
> 
> On Wed, 23 Oct 2002, Oliver, Steve wrote:
> 
> > 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]
> > 
> > 
> 
> 

-- 
Gareth Reakes, Head of Product Development  
DecisionSoft Ltd.            http://www.decisionsoft.com
Office: +44 (0) 1865 203192



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


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

Reply via email to