• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using extensions in XML - error underfined 'base'

 
Julia Dann
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've got the follwong xml and i'm trying to use extension for the first time. It doesn't seem to like it - any suggestions? I've stripped out all the imports to make it a little less complex.

When i try to validate it on XML spy i'm getting an error undefined value for 'base' encountered. Yet i'm using the name i've defined above??

<schema targetNamespace="http://www.somewhere/tGetProductAttributesPerSectorV1" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" version="1.00">
<import namespace="http://www.ba.com/schema/MessageInfrastructureV2" schemaLocation="MessageInfrastructureV2_X.xsd"/>
<element name="GetProductAttributesPerSectorRequest">
<complexType name="test">
<sequence>
<element name="CAPHeader" type="cap:CAPHeader"/>
<element name="MessageHeader" type="mes:MessageHeader"/>
<element name="ProductAttributeCategory" type="pro roductAttributeCategory" minOccurs="0" maxOccurs="unbounded">
</element>
<element name="DepartureDate" type="date"/>
<element name="AdultPaxNumber" type="integer" minOccurs="0"/>
</sequence>
</complexType >
</element>
<element name="GetProductAttributesPerSectorForWebServiceRequest">
<complexType>
<complexContent>
<extension base="test">
<sequence>
<element name="DepartureAirport" type="ord:FullAirport1"/>
</sequence>
</extension>
</complexContent>
</complexType>
</element>
</schema>

Thanks
Julia
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch Julia,
I don't have xmlspy to readily validate your xsd, however will the example 2 in this page helps you to get an idea ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic