Hi, Peter, This is how you should use it: <import namespace="_targetNamespace_of_imported schema" schemaLocation="schema_file_name.xsd"/>
>From the spec [http://www.w3.org/TR/xmlschema-1/#element-import]: "When a schemaLocation is present, it must contain a single URI reference which the schema author warrants will resolve to a serialization of a �schema document� containing the component(s) in the <import>ed namespace referred to elsewhere in the containing schema document" It looks like you are using "" string for schemaLocation. Namespace attribute can be omitted if the imported schema does not have any targetNamespace. Examples: <xs:import namespace="http://www.example.org/NS_imp" schemaLocation="NSSchema_Imp.xsd"/> <xs:import schemaLocation="noNSSchema_Imp.xsd"/> Hope it helps, Elena Peter Tornberg wrote: > > Hi all, > > I've been looking at the import mechanism, but been unable to get it to > work. When I set SchemaLocation inside the import element I get: > [Error] Schema error: Attribute 'SchemaLocation' cannot appear in 'import'. > > In the XML Schema Primer 1 import is defined as: > <import > id = ID > namespace = anyURI > schemaLocation = anyURI > {any attributes with non-schema namespace . . .}> > Content: (annotation?) > </import> > > How much support for import is built into Xerces. I can't find any info on > the Xerces website saying that it does not support import. > > Thanks! > > /Peter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
