Importing the XML Schema namespace?

A

Arndt Jonasson

Let's say an XML Schema schema A uses types from another schema B.
Then, if I understand things correctly, A needs to import schema B
(maybe "importing its namespace" is more correctly put). It is also
allowed for both A and B to import the XML Schema namespace, but at
least when I use the xmllint validator, it isn't necessary.

My question is, is it ever necessary to import the XML Schema
namespace? If not necessary, when might it be useful?
 
U

usenet

My question is, is it ever necessary to import the XML Schema
namespace? If not necessary, when might it be useful?

No, you don't need to import the XML schema namespace to make use of
it.

The only situation where you might want to do that is if you want your
XML instances to contain XML schema definitions such as in WSDL
files.

Even then you probably want to do something like:

<xs:any namespace='http://www.w3.org/2001/XMLSchema' ...>

rather than importing XSD.

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx/
http://www.codalogic.com/lmx/
=============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top