You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Orford, Jeffrey" <je...@gs.com> on 2001/05/11 18:33:53 UTC

Weird validation error

Hi-

I'm having the following problem:

1) Here's the header of my primary schema file (the one that is directly
referenced by the xml string and includes #2)

<schema targetNamespace="http://wwwcm.eq.gs.com/eqcalendar"
  xmlns:ECMeqcal="http://wwwcm.eq.gs.com/eqcalendar"
  xmlns="http://www.w3.org/2000/10/XMLSchema" 
  xmlns:ECM="http://wwwcm.eq.gs.com"
  elementFormDefault="qualified"
  >
<import namespace="http://wwwcm.eq.gs.com"
schemaLocation="z:/Work/ECM/Projects/EQCalendar/eqCalCommon.xsd"/>

2) Here's the header of my included schema file:

<schema targetNamespace="http://wwwcm.eq.gs.com" 
  xmlns:ECM="http://wwwcm.eq.gs.com" 
  xmlns="http://www.w3.org/2000/10/XMLSchema">

3) In the included schema I'm declaring the following type (among many
others)

  <complexType name="DateTimeType">
    <sequence>
      <element name="sdate" type="date"/>
      <element name="stime" type="time"/>
    </sequence>
  </complexType>

4) In the primary schema I'm declaring the following type (also among many
others)

  <complexType name="SyncRequestType">
    <sequence>
      <element name="since" type="ECM:DateTimeType"/>
    </sequence>
  </complexType>

5) Also in the primary schema I have a request type that looks like this:

  <complexType name="RequestType">
    <choice>
      <element name="reqByDealId" type="ECMeqcal:ReqByDealIdType"/>
      <element name="reqByPricingDate"
type="ECMeqcal:ReqByPricingDateType"/>
      <element name="gsRoleRequest" type="ECMeqcal:GsRoleRequestType"/>
      <element name="managersRequest" type="ECMeqcal:ManagersRequestType"/>
      <element name="issuerCountryRequest"
type="ECMeqcal:IssuerCountryRequestType"/>
      <element name="securityTypeRequest"
type="ECMeqcal:SecurityTypeRequestType"/>
      <element name="secRuleRequest" type="ECMeqcal:SecRuleRequestType"/>
      <element name="offerTypeRequest"
type="ECMeqcal:OfferTypeRequestType"/>
      <element name="productLineRequest"
type="ECMeqcal:ProductLineRequestType"/>
      <element name="syncRequest" type="ECMeqcal:SyncRequestType"/>
    </choice>
  </complexType>

6) BUT (and here's the important part) ... when the following xml string
attempts to be validated:

<?xml version='1.0' encoding='UTF-8'?>
<request xmlns='http://wwwcm.eq.gs.com/eqcalendar'
xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
xsi:schemaLocation='http://wwwcm.eq.gs.com/eqcalendar
z:/Work/ECM/Projects/EQCalendar/eqCalRequest.xsd'><syncRequest>
  <since>
    <sdate>5/10/2001</sdate>
    <stime>17:00</stime>
  </since>
</syncRequest>
</request>

I'm getting the following error message:

Element type "sdate" must be declared.

7) Other info:
- All other request types are working and they all access the included
schema
- If I move the DateTimeType into the primary file it works (I would rather
not do this as several schemas are going to need the  same type)


Thank you in advance for any clues toward solving this.
Jeff Orford

*********************************************
Jeffrey Orford
Goldman Sachs Information Technology
(212)357-1306
Jeffrey.Orford@gs.com

"Plans are nothing; Planning is everything"  -Eisenhower
*********************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org