473,750 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing the XML Schema namespace?

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?

Feb 28 '07 #1
1 1735
On 28 Feb, 09:08, "Arndt Jonasson" <arndt.jonas... @gmail.comwrote :
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/
=============== =============== ===============

Feb 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2439
by: Fezboy | last post by:
Greetings! I'm trying to import elements declared in the METS and MODS XML Schema into my own. I've gotten to the point where the xsd validates, but when I try to validate a document against it, it expects element '' in place of mets:fileGrp. The same error obtains for mets:structMap if I comment out the mets:fileGrp code. Can an insightful person tell me why it will wants '' instead of the actual Qname I use to identify it?
1
2236
by: Steve George | last post by:
Hi, I have a scenario where I have a master schema that defines a number of complex and simple types. I then have a number of other schemas (with different namespaces) where I would like to reuse some of these master complex and simple types. This I believe will assist me in transforming between the master schema and the other smaller schemas that contain a subset of the elements in the master schema. I understand that I can import an...
1
1484
by: Sascha Kerschhofer | last post by:
Hi, is it against the spec to import two external schemas with the same namespace into one main schema? e.g <xs:import namespace="http://myCompany.com/formating" schemaLocation="srt3.xsd"/> <xs:import namespace="http://myCompany.com/formating" schemaLocation="srt1.xsd"/> Saxon seems to have a problem with this. MSXML and .NET accept it. Realy
8
2814
by: Poonam | last post by:
Hi, Can some one please help me with (or point me to) a very simple but working code sample that shows how to import XML Schema. I have tried many samples out there on internet but nothing seems to be working. I am trying to import a complex type/simple type element type from an external xml schema. I am using xs:import tag with namespace and schemalocation attributes defined and have also declared xmlns relative to this xml schema. I...
3
5264
by: rehveli | last post by:
Isn't it possible to generate .cs files from schemas, where one schema imports another, and both have the same namespace? If a.xsd and b.xsd have namespace "MyNameSpace", and in b.xsd I do <xsd:import namespace="MyNameSpace" schemaLocation="a.xsd"/> and run "xsd.exe /c a.xsd b.xsd", xsd.exe errors out with "Error: A schema with the namespace 'MyNameSpace' has already been added."
3
1871
by: farseer | last post by:
Hello, i have a schema which also imports the XHTML schema: <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/> This schema validates fine in XMLSpy and in VS2005. However, in Visual Studio 2005 beta2, when i attempt to reference this schema from "Templates and Add-ins" it complains that "One or more of
2
7309
by: Ali | last post by:
I am having problem compiling schema contained in WSDL file when analyzing schema types contained in it (for example http://www.ebout.net/net/GoogleSearch.wsdl). Following code demonstrates my problem: using System.Diagnostics; using System.IO; using System.Xml; using System.Xml.Schema;
0
11270
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema information for the". I am using Cassini as the web server on my PCand I can still run my site from within VWD. Does anyone know what I have done to cause these messages to appear? Could not find schema information for the element...
5
40939
by: carlpayne1984 | last post by:
Hi all, I'm fairly new to XML, however already I have studied myself stupid without being able to solve this problem. Basically, I have an XML file/Schema about a CD catalog that I've created that I want to combine with an XML/Schema that a friend has created. Both XML files/Schema validate individually. Now comes the tricky part, combining them. I've created a new XML file and schema, called catalog.xml and catalog.xsd. Into the...
0
8836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9338
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4712
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.