Velocity Reviews

Velocity Reviews (
-   XML (
-   -   Help please...How to import a schema with a different namespace? (

Ingrid 08-23-2004 02:06 PM

Help please...How to import a schema with a different namespace?
I am looking to incorporate Schema 1 (below) into Schema 2, using the
<import> element. But I just can't figure out how to declare the in:
namespace prefix/use targetNamespace correctly - for both Schemas...

Any ideas? Please put me out of my misery - somebody...

As soon as I add the targetNamespace="http://num/in"> in Schema 1 both
Schemas throw up the following error message:

Error resolving component 'numType'. It was detected that 'numType'
has no namespace, but components with no target namespace are not
referenceable from schema document "Schema 1". If 'numType' is
intended to have a namespace, perhaps a prefix needs to be provided.
If it is intended that 'numType' has no namespace, then an 'import'
without a "namespace" attribute should be added to "Schema 1".

Schema 2:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified"
<xs:import namespace="http://num/in"
<xs:element name="num">
<xs:element ref="in:num"></xs:element>

Schema 1:
<in:schema xmlns:in=""
<in:element name="num" type="numType"></in:element>
<in:complexType name="numType">
<in:extension base="pageRange">
<in:attribute name="type" use="required">
<in:restriction base="in:string">
<in:simpleType name="pageRange">
<in:restriction base="in:string">
<in:minLength value="3"></in:minLength>
<in:maxLength value="7"></in:maxLength>
<in:pattern value="\d{1,3}-\d{1,3}"></in:pattern>

All times are GMT. The time now is 12:42 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.