473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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:schemaLocation" attribute, but this is cumbersome to use, and
appears to be unnecessary.
Jul 20 '05 #1
2 1271


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:schemaLocation" 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
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...
9
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...
4
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...
7
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...
3
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...
0
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"...
2
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...
0
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...
1
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...
0
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.