Hi,
I've a problem with generating source code from a schema file.
When i do "sourceGen -i threeships_IMS_enterprise.xsd -package threeships" than i get the following error. (In attach you can find the used schema file).
What is the problem here ?
D:\castor-0.9.5.3>sourceGen -i threeships_IMS_enterprise.xsd -package threeships
'schema' has not been declared in the XML Schema namespace.
line: 5
at org.exolab.castor.xml.schema.reader.ComponentReader.error(ComponentRe
ader.java:198)
at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(S
chemaUnmarshaller.java:447)
at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(
Sax2ComponentReader.java:253)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXP
arser.java:411)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLN
SDocumentScannerImpl.java:306)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.s
canRootElementHook(XMLNSDocumentScannerImpl.java:594)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1610)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:348)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:539)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:595)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
ava:1125)
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:7
97)
--
Peter Bosmans
Katholieke Hogeschool Limburg
Universitaire Campus Gebouw B Bus 1
3590 Diepenbeek
Tel. +32 11 230 770
Fax. +32 11 230 789
Mail. [EMAIL PROTECTED]
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://www.imsproject.org/xsd/imsep_rootv1p01" xmlns="http://www.imsproject.org/xsd/imsep_rootv1p01" xmlns:xsd="http://www.w3.org/2001/xmlSchema" elementFormDefault="qualified" version="1.01:1.0"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="ims_xml.xsd"/> <!-- attributeGroups--> <xsd:attributeGroup name="attr.any"> <xsd:anyAttribute namespace="##other"/> </xsd:attributeGroup> <xsd:attributeGroup name="attr.lang"> <xsd:attribute ref="xml:lang"/> </xsd:attributeGroup> <xsd:attributeGroup name="attr.restrict.req"> <xsd:attribute name="restrict" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"/> </xsd:simpleType> </xsd:attribute> </xsd:attributeGroup> <xsd:attributeGroup name="attr.value"> <xsd:attribute name="value" default="URI"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="URI"/> <xsd:enumeration value="TEXT"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:attributeGroup> <xsd:group name="grp.any"> <xsd:sequence> <xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:group> <!-- ## elements ## --> <xsd:element name="adr" type="adrType"/> <xsd:element name="begin" type="beginType"/> <xsd:element name="demographics" type="demographicsType"/> <xsd:element name="description" type="descriptionType"/> 15 <xsd:element name="end" type="endType"/> <xsd:element name="enrollcontrol" type="enrollcontrolType"/> <xsd:element name="enterprise" type="enterpriseType"/> <xsd:element name="extension" type="extensionType"/> <xsd:element name="extref" type="extrefType"/> <xsd:element name="finalresult" type="finalresultType"/> <xsd:element name="group" type="groupType"/> <xsd:element name="grouptype" type="grouptypeType"/> <xsd:element name="member" type="memberType"/> <xsd:element name="membership" type="membershipType"/> <xsd:element name="n" type="nType"/> <xsd:element name="name" type="nameType"/> <xsd:element name="org" type="orgType"/> <xsd:element name="person" type="personType"/> <xsd:element name="photo" type="photoType"/> <xsd:element name="properties" type="propertiesType"/> <xsd:element name="relationship" type="relationshipType"/> <xsd:element name="role" type="roleType"/> <xsd:element name="sourcedid" type="sourcedidType"/> <xsd:element name="tel" type="telType"/> <xsd:element name="timeframe" type="timeframeType"/> <xsd:element name="typevalue" type="typevalueType"/> <xsd:element name="url" type="urlType"/> <xsd:element name="values" type="valuesType"/> <!-- ## stringType elements ## --> <xsd:element name="adminperiod" type="stringType"/> <xsd:element name="bday" type="stringType"/> <xsd:element name="comments" type="stringType"/> <xsd:element name="country" type="stringType"/> <xsd:element name="datasource" type="stringType"/> <xsd:element name="date" type="stringType"/> <xsd:element name="datetime" type="stringType"/> <xsd:element name="email" type="stringType"/> <xsd:element name="enrollaccept" type="stringType"/> <xsd:element name="enrollallowed" type="stringType"/> <xsd:element name="extadd" type="stringType"/> <xsd:element name="family" type="stringType"/> <xsd:element name="fn" type="stringType"/> <xsd:element name="full" type="stringType"/> <xsd:element name="gender" type="stringType"/> <xsd:element name="given" type="stringType"/> <xsd:element name="id" type="stringType"/> <xsd:element name="idtype" type="stringType"/> <xsd:element name="label" type="stringType"/> <xsd:element name="list" type="stringType"/> <xsd:element name="locality" type="stringType"/> <xsd:element name="long" type="stringType"/> <xsd:element name="max" type="stringType"/> <xsd:element name="min" type="stringType"/> <xsd:element name="mode" type="stringType"/> <xsd:element name="nickname" type="stringType"/> <xsd:element name="orgname" type="stringType"/> <xsd:element name="orgunit" type="stringType"/> <xsd:element name="other" type="stringType"/> <xsd:element name="pcode" type="stringType"/> <xsd:element name="pobox" type="stringType"/> <xsd:element name="prefix" type="stringType"/> <xsd:element name="region" type="stringType"/> <xsd:element name="result" type="stringType"/> <xsd:element name="scheme" type="stringType"/> <xsd:element name="short" type="stringType"/> <xsd:element name="sort" type="stringType"/> <xsd:element name="source" type="stringType"/> <xsd:element name="status" type="stringType"/> <xsd:element name="street" type="stringType"/> <xsd:element name="subrole" type="stringType"/> <xsd:element name="suffix" type="stringType"/> <xsd:element name="target" type="stringType"/> 16 <xsd:element name="type" type="stringType"/> <xsd:element name="userid" type="stringType"/> <xsd:element name="ts_password"/> <xsd:element name="ts_role"/> <!-- Simple types expressed in complex types for free extension.--> <xsd:complexType name="stringType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="attr.any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- complexTypes with simpleContent --> <xsd:complexType name="beginType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="attr.restrict.req"/> <xsd:attributeGroup ref="attr.any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="endType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="attr.restrict.req"/> <xsd:attributeGroup ref="attr.any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="extrefType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="value" default="URI"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="URI"/> <xsd:enumeration value="TEXT"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributeGroup ref="attr.any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="telType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="teltype" default="1"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="1"/> <xsd:enumeration value="2"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="typevalueType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="level" type="xsd:string" use="required"/> <xsd:attributeGroup ref="attr.any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="urlType"> <xsd:simpleContent> 17 <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="attr.value"/> <xsd:attributeGroup ref="attr.any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- Complex Types --> <xsd:complexType name="adrType"> <xsd:sequence> <xsd:element ref="pobox" minOccurs="0"/> <xsd:element ref="extadd" minOccurs="0"/> <xsd:element ref="street" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="locality" minOccurs="0"/> <xsd:element ref="region" minOccurs="0"/> <xsd:element ref="pcode" minOccurs="0"/> <xsd:element ref="country" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="demographicsType"> <xsd:sequence> <xsd:element ref="gender" minOccurs="0"/> <xsd:element ref="bday" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="descriptionType"> <xsd:sequence> <xsd:element ref="short"/> <xsd:element ref="long" minOccurs="0"/> <xsd:element ref="full" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="enrollcontrolType"> <xsd:sequence> <xsd:element ref="enrollaccept" minOccurs="0"/> <xsd:element ref="enrollallowed" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="enterpriseType"> <xsd:sequence> <xsd:element ref="properties"/> <xsd:element ref="person" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="group" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="membership" minOccurs="0" maxOccurs="unbounded"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="extensionType"> <xsd:sequence> <xsd:group ref="grp.any"/> <xsd:element ref="ts_password" minOccurs="0"/> <xsd:element ref="ts_role" minOccurs="0"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="finalresultType"> <xsd:sequence> <xsd:element ref="mode" minOccurs="0"/> <xsd:element ref="values" minOccurs="0"/> 18 <xsd:element ref="result" minOccurs="0"/> <xsd:element ref="comments" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="groupType"> <xsd:sequence> <xsd:element ref="sourcedid"/> <xsd:element ref="grouptype" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="description" maxOccurs="unbounded"/> <xsd:element ref="org" minOccurs="0"/> <xsd:element ref="timeframe" minOccurs="0"/> <xsd:element ref="enrollcontrol" minOccurs="0"/> <xsd:element ref="email" minOccurs="0"/> <xsd:element ref="url" minOccurs="0"/> <xsd:element ref="relationship" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="datasource" minOccurs="0"/> <xsd:element ref="extension" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attribute name="recstatus" default="1"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="1"/> <xsd:enumeration value="2"/> <xsd:enumeration value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="grouptypeType"> <xsd:sequence> <xsd:element ref="scheme" minOccurs="0"/> <xsd:element ref="typevalue" maxOccurs="unbounded"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="membershipType"> <xsd:sequence> <xsd:element ref="sourcedid"/> <xsd:element ref="member" minOccurs="0" maxOccurs="unbounded"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="memberType"> <xsd:sequence> <xsd:element ref="sourcedid"/> <xsd:element ref="idtype"/> <xsd:element ref="role" maxOccurs="unbounded"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="nameType"> <xsd:sequence> <xsd:element ref="fn"/> <xsd:element ref="sort" minOccurs="0"/> <xsd:element ref="nickname" minOccurs="0"/> <xsd:element ref="n" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> 19 <xsd:complexType name="nType"> <xsd:sequence> <xsd:element ref="family" minOccurs="0"/> <xsd:element ref="given" minOccurs="0"/> <xsd:element ref="other" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="prefix" minOccurs="0"/> <xsd:element ref="suffix" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="orgType"> <xsd:sequence> <xsd:element ref="orgname"/> <xsd:element ref="orgunit" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="type" minOccurs="0"/> <xsd:element ref="id" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="personType"> <xsd:sequence> <xsd:element ref="sourcedid"/> <xsd:element ref="userid"/> <xsd:element ref="name"/> <xsd:element ref="demographics" minOccurs="0"/> <xsd:element ref="email" minOccurs="0"/> <xsd:element ref="tel" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="adr" minOccurs="0"/> <xsd:element ref="photo" minOccurs="0"/> <xsd:element ref="datasource" minOccurs="0"/> <xsd:element ref="extension"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attribute name="recstatus" default="1"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="1"/> <xsd:enumeration value="2"/> <xsd:enumeration value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="photoType"> <xsd:sequence> <xsd:element ref="extref"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attribute name="imgtype" type="xsd:string"/> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="propertiesType"> <xsd:sequence> <xsd:element ref="datasource"/> <xsd:element ref="target" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="type" minOccurs="0"/> <xsd:element ref="datetime"/> <xsd:element ref="extension" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.lang"/> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="relationshipType"> <xsd:sequence> 20 <xsd:element ref="sourcedid"/> <xsd:element ref="label"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attribute name="relation" type="xsd:string"/> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="roleType"> <xsd:sequence> <xsd:element ref="subrole" minOccurs="0"/> <xsd:element ref="status"/> <xsd:element ref="userid" minOccurs="0"/> <xsd:element ref="comments" minOccurs="0"/> <xsd:element ref="date" minOccurs="0"/> <xsd:element ref="timeframe" minOccurs="0"/> <xsd:element ref="finalresult" minOccurs="0"/> <xsd:element ref="email" minOccurs="0"/> <xsd:element ref="datasource" minOccurs="0"/> <xsd:element ref="extension" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attribute name="recstatus" default="1"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="1"/> <xsd:enumeration value="2"/> <xsd:enumeration value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="roletype" default="01"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="01"/> <xsd:enumeration value="02"/> <xsd:enumeration value="03"/> <xsd:enumeration value="04"/> <xsd:enumeration value="05"/> <xsd:enumeration value="06"/> <xsd:enumeration value="07"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="sourcedidType"> <xsd:sequence> <xsd:element ref="source"/> <xsd:element ref="id"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="timeframeType"> <xsd:sequence> <xsd:element ref="begin" minOccurs="0"/> <xsd:element ref="end" minOccurs="0"/> <xsd:element ref="adminperiod" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> <xsd:complexType name="valuesType"> <xsd:sequence> <xsd:element ref="list" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="min" minOccurs="0"/> <xsd:element ref="max" minOccurs="0"/> <xsd:group ref="grp.any"/> </xsd:sequence> <xsd:attribute name="valuetype" default="0"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="0"/> <xsd:enumeration value="1"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributeGroup ref="attr.any"/> </xsd:complexType> </xsd:schema>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
