• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using extensions in XML - error underfined 'base'

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic