473,657 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on Schemas

Greetings all,

I'm getting a little frustrated trying to figure this out. When creating
an XML schema file, the default extention is XSD. How is it that schemas
can be accessed using only their XMLNS name (which does NOT include the
XSD extension)? If I enter the XMLNS attribute into a browser, I get
HTML pages - how are parsers resolving this? I've come across the
"xsi:schemaLoca tion" attribute, but this is cumbersome to use, and
appears to be unnecessary.
Jul 20 '05 #1
2 1288


AnonymousOne wrote:

When creating
an XML schema file, the default extention is XSD. How is it that schemas
can be accessed using only their XMLNS name (which does NOT include the
XSD extension)? If I enter the XMLNS attribute into a browser, I get
HTML pages - how are parsers resolving this? I've come across the
"xsi:schemaLoca tion" attribute, but this is cumbersome to use, and
appears to be unnecessary.


I think you need to provide some context. Are you using any XML editor
to create schema files that then uses the .xsd extension?
I think you are getting confused that namespace names look like URLs but
do not necessarily lead to a resource on a web server. For instance the
namespace for XSLT is
http://www.w3.org/1999/XSL/Transform
but so far if you try to load that URL you only get a placeholder, there
is so far no schema for that namespace and even if there was one it
would not necessarily be located at that URL.
So while namespace names often look like URLs (mostly to have a
world-wide unique name) there is not necessarily a resource at that URL
that is a schema for that namespace.
In general you need some way to tell the XML parser where the schema for
a certain namespace is, the schemaLocation attribute is one way but
often the parser API simply allows you to associate namespaces with
schema URLs before you run a validation.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
Namespace owners _may_ make documents available for retrieval from
their namespace names. The W3C XML Schema spec. _allows_ processors
to dereference namespace names to see if there are schema documents or
RDDL documents or . . .

So e.g. at http://www.w3.org/XML/1998/namespace you will find an RDDL
document, which in turn will direct you to
http://www.w3.org/2001/xml.xsd if you want a schema document for that
namespace.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #3

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

Similar topics

2
3917
by: John Jenkins | last post by:
I sent this question in before, so apologies. I have a number of schemas which I add into a schema collection. A number of the schemas define types, the others contain business context message details (e.g. updating an employee etc). The schemas which define general types have their own namespace defined. All the other schemas have the >>same<< namespace. After loading 101 schemas into my collection I get the error
9
1934
by: jason | last post by:
how do you use the XmlValidatingReader to validate an XML document that is passed into the XmlValidatingReader constructor? it looks like the normal process is to use an underlying reader, as follows (C#): XmlValidatingReader oMyVReader = new XmlValidatingReader(oMyReader); oMyVReader.Schemas.Add(oMySchemaCollection); oMyVReader.ValidationType = ValidationType.Schema;
4
2286
by: bibsoconner | last post by:
Hi, I hope someone can please help me. I'm having a lot of trouble with schema files in .NET. I have produced a very simple example that uses "include" to include other schema files. It all works with SPY, but when I pick "Validate Schema" from the .NET 2003 menu, it fails with message: "Type XType is not declared." As I hinted at in my subject line, I suspect that it has to do with including another schema multiple times.
7
1562
by: MSG Servicos de Informatica | last post by:
Hi MSDN Team! I have a doubt about the "MailMessage" class in Framework .NET 1.1. My SMTP server works in a local network that no have access to the internet for security reasons. And in my network we have an application that send emails to other department inside the company using us SMTP server that requires authentication... I'd like to know why when I use the "MailMessage" Class with "SMTPServer" class to authenticate in my SMTP...
3
2301
by: B | last post by:
My code below works fine when run from my pc (changed all the values for obvious reasons). The code is placed inside a DTS task via VBS scripting. But when I try to run directly from the server where sqlserver is installed, the script fails. I have SMTP running, but there is no outlook installed. Can someone please advise what I am missing. Thanks Bob
0
2136
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService" targetNamespace="http://swaMaragatoNS" xmlns:tns="http://swaMaragatoNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
2
1259
by: Jiho Han | last post by:
I am trying to validate a document against a set of schema and in order to do that, I am using XmlValidatingReader.Schemas.Add to add the schemas. However, since there are dependencies, the framework is crapping out (technical term) saying that the referenced type is not available. Well, the type is defined in the other schema which it imports. How do I get these schemas in there first and then have it validate so the reference is not...
0
2937
by: SpreadTooThin | last post by:
Not sure if this is the appropriate place to ask a question about soap. If you think you know a better news group to discuss this please point me there. I wrote a UPnP Internet Gateway Device Class in C++ with raw tcp/ip and udp calls. I want to now port that code to a high level interpreter that supplies
1
1155
by: Piotrekk | last post by:
Hi I was reading a lot about DataSets and XML schemas ( xsd ) None of the sources has answered my question - when should we use schemas? Usually when i save and load dataset to/from XML I don't need to create schemas. What is the real life example of when we should create schemas for an XML representation of database set. Best regards Piotr Ko³odziej
0
1145
by: Chris O | last post by:
"Larry Lowe" <llowejr@usa.netwrote in message news:ad17577.0308140714.1b14d778@posting.google.com... Hi Larry. Some responses aren't very helpful. I'll try to do a little better. The first point to note is that each Oracle instance requires a reasonable amount of system resouces as usually a considerable amount of memory is allocated to the instance and on UNIX there is typically half a dozen background processes hanging around just...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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
8823
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
8503
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
8603
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
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4151
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
2726
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
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.