[Home] [By Thread] [By Date] [Recent Entries]

  • To: "Ezell, Joel M \(Joel\)" <joele@a...>, <xml-dev@l...>
  • Subject: RE: Valid reference to external namespace?
  • From: "Chiusano Joseph" <chiusano_joseph@b...>
  • Date: Wed, 15 Dec 2004 17:44:35 -0500
  • Thread-index: AcTi60//gkQdqwu7Q7qsVNgJP7SlagAC74Vw
  • Thread-topic: Valid reference to external namespace?

You have the correct approach in general - you will need to include (or import, depending on whether the target namespace of the external schema is the same as the "main" schema) the schema that contains the RegisterDevice type. Given the information below, it's impossible to tell if it's correct as the reader cannot tell whether or not the RegisterDevice type is in one of the 2 schemas you've included.
 
You also need to include the target namespace for each included schema - it's missing.
 
There is also no prefix definition for "acx:" in the schema below, but there should be one.
 
Hope that helps.
 
Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
Strategy and Technology Consultants to the World
 


From: Ezell, Joel M (Joel) [mailto:joele@a...]
Sent: Wednesday, December 15, 2004 4:16 PM
To: xml-dev@l...
Subject: Valid reference to external namespace?

Hello,

 

Below, I have an example of an XSD file that is referencing a type defined in another schema, but I’m not positive that it’s doing it correctly.  Note that the CSTA namespace is defined as “csta”, and in the RegisterDevice type, I reference a type from that namespace: type=”csta:DeviceID”.  There is no explicit “include” statement.  Is this a legitimate way to reference that type?  Castor seems to think so, but I wanted to verify it anyway…

 

Thanks!

Joel Ezell

Avaya Inc.

 

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema targetNamespace="http://www.avaya.com/csta"

  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

  xmlns:csta="http://www.ecma.ch/standards/ecma-323/csta/ed2"

  elementFormDefault="qualified" attributeFormDefault="qualified">

 

  <xsd:include schemaLocation="ip-address.xsd"/>

  <xsd:include schemaLocation="login-info.xsd"/>

 

  <!-- RegisterDevice -->

  <xsd:element name="RegisterDevice">

    <xsd:complexType>

      <xsd:sequence>

        <xsd:element name="device"      type="csta:DeviceID"/>

        <xsd:element name="loginInfo"   type="acx:LoginInfo" minOccurs="0"/>

        <xsd:element name="localMediaInfo"   type="acx:MediaInfo" minOccurs="0"/>

        <xsd:element ref="csta:extensions" minOccurs="0"/>

      </xsd:sequence>

    </xsd:complexType>

  </xsd:element>

 


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member