473,789 Members | 2,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

namespace relative path trouble..

ax
Dear Experts,

I really worry about the following problem..

There is one XML File on my PC located at C:\Test. Hence, there are 2
XSD files on the same path
[ C:\Test ] I make an absolut reference in the XML file to the 2 XSD
files.

xmlns:address=" C:\Test\file_ad dress.xsd"
xmlns:hobby="C: \Test\file_hobb y.xsd"
XML Spy Validator validates correctly the XML as long as i dont move
the files into another directory.

How can i formulate

xmlns:address=" blablablabla\fi le_address.xsd" to look in the SAME
folder as the XML is located?

Oct 27 '06 #1
1 1887
ax wrote:
xmlns:address=" C:\Test\file_ad dress.xsd"
xmlns:hobby="C: \Test\file_hobb y.xsd"
Don't confuse namespace names and schema locations. A namespace is not
guaranteed to be the location of the schema, and in fact more commonly
is NOT.

And that's a broken namespace name in any case. Namespace names should
be absolute URI references; the use of relative references was
DEPRECATED after a long and painful debate which concluded that there
was no agreed-upon way to interpret them. Unless you're considering C:
to be a URI scheme -- which I doubt! -- this filename is not a URI. You
meant "file:///C:\Test\file_ad dress.xsd", and even that is a VERY poor
choice for a namespace name since it's too likely that someone else may
use the same string. Pick a real URI based on a domain name you control,
to ensure against namespace collision.
How can i formulate
xmlns:address=" blablablabla\fi le_address.xsd" to look in the SAME
folder as the XML is located?
Good example of why not to confuse these.

Namespace names should be absolute URI references; the use of relative
references was DEPRECATED after a long and painful debate which
concluded that there was no agreed-upon way to interpret them. But you
want a relative reference to your schema.

Divide the issue. Use a real URI for the namespace name, as discussed
above, and then provide additional direction for where to look for that
schema, typically by using the xsi:schemaLocat ion attribute.

http://www.w3.org/TR/2004/REC-xmlsch...schemaLocation

If XML Spy doesn't support schemalocation or some equivalentmecha nism
for distinguishing between a namespace name and the schema which defines
that namespace -- if it insists that the namespace is the schema
location -- it's broken. Change tools.
--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 27 '06 #2

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

Similar topics

5
4113
by: jason | last post by:
Can anyone help me find a solution to quickly working out relative paths to a folder in the root of my server... Although it easy when you go - say - two levels down: .../includes it becomes increasingly difficult to ball park the folder when you go deeper and wider down:
6
11791
by: openleren | last post by:
Hi all, how can I use a relative path in my web.config file for an Access db?: Instead of using <configuration> <appSettings> <add key="conAccess" value="microsoft.jet.oledb.4.0;data source=c:/Inetpub/MyApp/data/database.mdb" /> ...
8
2035
by: Simon Brooke | last post by:
I was debugging a new XML generator tonight and trying to determine why it wasn't working; and realised my dom printer does not output XML namespace declarations. My method to output an Element is as follows: /** * Print an element node, and, by recursive descent, it's children * * @param node the node to print
8
2604
by: JJ | last post by:
I'm confused about paths. I have a functionn that uses the mappath method, which I think requires a virtual path (is that the same as a relative path?). But this doesn't always work as the path can take the form of the following: 1. /directory/images/xyz.gif (works fine) 2. http://localhost:1234/www.mytestwebsite.com/directory/images/xyz.gif (doesn't work) 3. http:///www.someremotesite.com/directory/images/abc.gif (doesn't work)
12
2744
by: Alan Isaac | last post by:
Are relative imports broken in 2.5? Directory ``temp`` contains:: __init__.py test1.py test2.py File contents: __init__.py and test2.py are empty test1.py contains a single line::
15
6471
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would make it much easier to slap modualar blocks of markup into page frameworks, which may change and so forth. And the few extra bytes, which even for a fairly large site would not amount to as many bytes as are in a fairly small low-res image, should...
0
1216
by: Stef Mientki | last post by:
hello, I'm running Python 2.5 and want my programs to run at least under Windows and Linux (preferable also Mac). So I guess I should always use relative paths. From most modules I can call a global function, that should import a dictionary from path deeper than the module itself. The import is done in the global function. In that global function, I get the modules path by
0
1506
by: Gabriel Genellina | last post by:
En Sat, 18 Oct 2008 05:52:04 -0300, Stef Mientki <stef.mientki@gmail.com> escribió: Why don't you let the caller tell you its own location, using __file__? The above code is too much magic for me. Yes.
2
2756
by: Asja | last post by:
Hi, I would like to create a link in my program that will open a file stored in a directory relative to the program itself. e.g. if the program is in the program folder, the file I want to open is program/data/file.html. I have no trouble creating links to websites or files specified with an absolute path but have been unable to open a file using a relative path. Any help would be appreciated. AJ
0
9666
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
9511
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,...
1
10139
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
9020
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...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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
5418
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
4093
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
3
2909
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.