Thanks.

But it seems that the latest release of castor (in file castor-0.9.3.9.zip)  
has the outdated xsd file. Here is the error message when I execute 
"examples dtx" .

[dtxtest] Schema URL: 
file:/C:/castor/castor-0.9.3.9/build/examples/dtx/product.xsd
No namespace declaration has been found for schema
   * assuming default namespace of http://www.w3.org/2001/XMLSchema
org.xml.sax.SAXException: Illegal element 'type' found as child of 
<element>.
   line: 6
....

I am still struggling to find a "correct" sample xsd in the latest release.

Thanks
Xing


>From: Keith Visco <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [castor-dev] Help on schema
>Date: Thu, 20 Dec 2001 10:25:48 -0600
>
>
>Your Schema is using in outdated syntax...Castor 0.9.3+ requires the W3C
>XML Schema Recommendation.
>
>--Keith
>
>Xing Liu wrote:
> >
> > I am the return user of Caster. I am using the latest version of caster
> > 9.3.9.. I just tried to generate some class file from schema file I 
>created
> > for castor-0.8.7. I got error message. What does it mean?  Please help.
> > ----------------------------
> >
> > org.xml.sax.SAXException: Illegal element 'type' found as child of
> > <element>.
> >    line: 11
> >         at
> > org.exolab.castor.xml.schema.reader.SaxUnmarshaller.illegalElement(Sa
> > xUnmarshaller.java:205)
> >         at
> > org.exolab.castor.xml.schema.reader.ElementUnmarshaller.startElement(
> > ElementUnmarshaller.java:311)
> >         at
> > org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(S
> > chemaUnmarshaller.java:334)
> >         at
> > org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1335)
> >
> >         at
> > org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
> > Validator.java:823)
> >         at
> > org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
> > tScanner.java:1852)
> >         at
> > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
> > atch(XMLDocumentScanner.java:1233)
> >         at
> > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
> > canner.java:380)
> >         at 
>org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
> >         at
> > org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
> > tor.java:388)
> >         at
> > org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
> > tor.java:441)
> >         at
> > org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:6
> > 65)
> >
> > ------------------------
> > My schema file is
> >
> > <?xml version='1.0'?>
> >
> > <schema>
> >
> > <!-- DATA TYPES -->
> >
> > <!-- DOCUMENT ELEMENT -->
> >
> >   <element name="SLAPolicyDat">
> >     <type content="elemOnly" order="seq">
> >
> > <!--     <element ref="SLAObjective" minOccurs="1" maxOccurs="1"/>
> > -->
> >       <attribute name="SLA-policy-name" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >       <attribute name="objective-ref" type="string" minOccurs="1"/>
> >       <attribute name="SLA-policy-action-ref" type="string" 
>minOccurs="1"/>
> >       <attribute name="validity-period-ref" type="string" 
>minOccurs="1"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="SLAContractDat">
> >     <type content="elemOnly" order="seq">
> >
> >       <attribute name="SLA-contract-name" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >       <attribute name="service-package-ref" type="string" 
>minOccurs="1"/>
> >       <attribute name="SP-authorizer-ref" type="string" minOccurs="1"/>
> >       <attribute name="customer-authorizer-ref" type="string"
> > minOccurs="1"/>
> >       <attribute name="status" type="string" minOccurs="1"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="SLAObjectiveDat">
> >     <type content="empty">
> >
> >       <attribute name="SLA-objective-name" type="string" minOccurs="1"/>
> >       <attribute name="metric-type" type="string" minOccurs="1"/>
> >       <attribute name="validity-period-ref" type="string" 
>minOccurs="0"/>
> >       <attribute name="sample-type" type="string" minOccurs="0"/>
> >       <attribute name="sample-interval" type="string" minOccurs="0"/>
> >       <attribute name="threshold" type="string" minOccurs="1"/>
> >       <attribute name="operator" type="string" minOccurs="1"/>
> >       <attribute name="severity" type="string" minOccurs="0"/>
> >       <attribute name="compliance-sensitivity" type="integer"
> > minOccurs="0"/>
> >       <attribute name="compliance-window" type="integer" minOccurs="0"/>
> >       <attribute name="tolerance-sensitivity" type="integer" 
>minOccurs="0"/>
> >       <attribute name="tolerance-window" type="integer" minOccurs="0"/>
> >       <attribute name="contiguous-flag" type="integer" minOccurs="0"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="PolicyValidityPeriodDat">
> >     <type content="elemOnly" order="seq">
> >
> >       <attribute name="policy-validity-period-name" type="string"
> > minOccurs="1" maxOccurs="*"/>
> >       <attribute name="policy-validity-day-of-month-mask" type="string"
> > minOccurs="0"/>
> >       <attribute name="policy-validity-day-of-week-mask" type="string"
> > minOccurs="0"/>
> >       <attribute name="policy-validity-month-mask" type="string"
> > minOccurs="0"/>
> >       <attribute name="policy-validity-period-time" type="string"
> > minOccurs="0"/>
> >       <attribute name="policy-validity-time-of-day-range" type="string"
> > minOccurs="0"/>
> >       <attribute name="policy-validity-time-zone" type="string"
> > minOccurs="0"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="SLAPolicyActionDat">
> >     <type content="elemOnly" order="seq">
> >
> >       <attribute name="SLA-policy-action-name" type="string" 
>minOccurs="1"
> > maxOccurs="*"/>
> >       <attribute name="action-type" type="string" minOccurs="1"/>
> >       <attribute name="action-limit" type="integer" minOccurs="0"/>
> >       <attribute name="validity-period-ref" type="string" 
>minOccurs="0"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="PackageComponentDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="package-component-name" type="string" 
>minOccurs="1"
> > maxOccurs="*"/>
> >      <attribute name="service-ref" type="string" minOccurs="0"/>
> >      <attribute name="SLA-template-ref" type="string" minOccurs="1"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="ServicePackageDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="service-package-name" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >      <attribute name="description" type="string" minOccurs="0"/>
> >      <attribute name="package-component-ref" type="string" 
>minOccurs="1"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="HostedServiceDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="hosted-service-name" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >      <attribute name="service-access-point-ref" type="string"
> > minOccurs="0"/>
> >      <attribute name="description" type="string" minOccurs="0"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="ServiceAccessPointDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="service-access-point-name" type="string" 
>minOccurs="1"
> > maxOccurs="*"/>
> >      <attribute name="url" type="string" minOccurs="0"/>
> >      <attribute name="site-pair" type="string" minOccurs="0"/>
> >      <attribute name="phone-numbers" type="string" minOccurs="0"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="SLAReportDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="SLA-report-name" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >      <attribute name="report-type" type="string" minOccurs="1"/>
> >      <attribute name="report-interval" type="string" minOccurs="1"/>
> >      <attribute name="report-format" type="string" minOccurs="0"/>
> >      <attribute name="service-ref" type="string" minOccurs="1"/>
> >      <attribute name="report-recipient" type="string" minOccurs="0"/>
> >
> >     </type>
> >   </element>
> >
> >   <element name="SLATemplateDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="SLA-template-name" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >      <attribute name="service-type" type="string" minOccurs="1"/>
> >      <attribute name="unique-member" type="string" minOccurs="1"/>
> >      <attribute name="status" type="string" minOccurs="0"/>
> >      <attribute name="group-of-unique-names" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >
> >      </type>
> >   </element>
> >
> >   <element name="GroupOfUniqueNamesDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="group-of-unique-names" type="string" minOccurs="1"
> > maxOccurs="*"/>
> >
> >     </type>
> >   </element>
> >
> >    <element name="inetOrgPersonDat">
> >     <type content="elemOnly" order="seq">
> >
> >      <attribute name="common-name" type="string" minOccurs="1"/>
> >      <attribute name="department-number" type="string" minOccurs="1"/>
> >      <attribute name="display-name" type="string" minOccurs="1"/>
> >      <attribute name="employee-number" type="string" minOccurs="1"/>
> >      <attribute name="given-name" type="string" minOccurs="1"/>
> >      <attribute name="surname" type="string" minOccurs="1"/>
> >      <attribute name="user-password" type="string" minOccurs="1"/>
> >      <attribute name="fax-number" type="string" minOccurs="1"/>
> >      <attribute name="tel-number" type="string" minOccurs="1"/>
> >      <attribute name="location" type="string" minOccurs="1"/>
> >      <attribute name="home-phone" type="string" minOccurs="1"/>
> >      <attribute name="home-postal-address" type="string" minOccurs="1"/>
> >      <attribute name="initials" type="string" minOccurs="1"/>
> >      <attribute name="mail" type="string" minOccurs="1"/>
> >      <attribute name="manager" type="string" minOccurs="1"/>
> >      <attribute name="uid" type="string" minOccurs="1"/>
> >      <attribute name="preferred-language" type="string" minOccurs="1"/>
> >      <attribute name="audio" type="string" minOccurs="1"/>
> >      <attribute name="business-category" type="string" minOccurs="1"/>
> >      <attribute name="car-license" type="string" minOccurs="1"/>
> >      <attribute name="jpeg-photo" type="string" minOccurs="1"/>
> >      <attribute name="labeled-URI" type="string" minOccurs="1"/>
> >      <attribute name="mobile" type="string" minOccurs="1"/>
> >      <attribute name="o" type="string" minOccurs="1"/>
> >      <attribute name="pager" type="string" minOccurs="1"/>
> >      <attribute name="photo" type="string" minOccurs="1"/>
> >      <attribute name="room-number" type="string" minOccurs="1"/>
> >      <attribute name="secretary" type="string" minOccurs="1"/>
> >      <attribute name="user-certificate" type="string" minOccurs="1"/>
> >      <attribute name="x500-unique-identifier" type="string" 
>minOccurs="1"/>
> >      <attribute name="user-SMIME-certificate" type="string" 
>minOccurs="1"/>
> >      <attribute name="user-PKCS12" type="string" minOccurs="1"/>
> >
> >     </type>
> >   </element>
> >
> > </schema>
> >
> > _________________________________________________________________
> > Join the world�s largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to