473,769 Members | 5,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: How to associate XML with XSD

Hi,

I also have a question when using VS 2008 to edit the xml file. In my
xml file, I used schemaLocation attribute to specify the xsd. If I put
the xsd in our internal sharepoint site such as:
xsi:schemaLocat ion="someNs http://sharepoint/Test.xsd"

VS2008 xml editor shows that "this schema referenced from this
location in your document contains errors". However if I copy the xsd
to the local folder, and use this:
xsi:schemaLocat ion="someNs C:\Test.xsd"

Then it works fine. Also the first method works in VS 2005. So is
there anything changed in the VS 2008 xml editor?

Thanks,
Heng-yi
On Apr 7, 10:03*pm, stch...@online. microsoft.com (Steven Cheng [MSFT])
wrote:
Hi Bob,

As for XML document/file and the XML schema(xsd) it rely on(conform to),
here are some of my understanding:

** From XML standard, we generally do not specify the location (url or file
path ) of the xml schema, we only add namespace attributes in XML document
so as to indicate what namespace those Nodes in XML document belong to. *

** For the location where to find the schema, it is normally the XML
Editor/Designer's task. Yes, there is "xsi:schemaLoca tion" attribute that
can help specify a schema via url/path location, however, *this is still
depend on whether the XML Editor or designer will use it. If the IDE won't
take care of this attribute(will try locating the schema from the specified
location and perform validation).

** For Visual Studio, it use several means to find the schemas to validate
the document or provide intellisense:

1) schema in *the Visual Studio's global cache location. e.g. the VS 2008
use the following path:

C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas

2) You can also add schema in the property window when you editing a xml
file in VisualStudio xml editor

3) Visual studio xml editor will also look for "schemaLocation " you
specified in xml document for reference

You can also add your own schemas to global cache or customize it. The
following MSDN documenet has mentioned those features:

#Schema Cache *http://msdn2.microsoft.com/en-us/lib...21(VS.80).aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer tohttp://msdn.microsoft. com/subscriptions/managednewsgrou ps/default.asp...
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) athttp://msdn.microsoft. com/subscriptions/support/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights..

--------------------


From: "Bob Altman" <r...@nospam.no spam>
References: <uVZqyNQmIHA.3. ..@TK2MSFTNGP02 .phx.gbl>
Subject: Re: How to associate XML with XSD
Date: Mon, 7 Apr 2008 16:54:40 -0700
I think I found most of my answers myself. *(Actually, a coworker happened
to
wander by my padded cell and he enlightened me ;-) *I'd appreciate if
someone
who actually knows this stuff would comment on this posting to let me know
if
I've got this more or less correct. *Thanks!
1. Assuming that I have an XML file and its associated XSD file, what do
I put
into the XML file to tell Visual Studio to use the XSD file to wire up
intellisense?
My coworker showed me how to include a bunch of xmlns gibberish in the
top-level
element to specify the schema location:
<TopLevelElemen t
*xmlns="MyDefau ltNamespace"
*xmlns:xsi=http ://www.w3.org/2001/XMLSchema-instance
*xsi:schemaLoca tion="MyDefault Namespace MySchemaFile.xs d" >
In the above example, "MyDefaultNames pace" is usually a string that looks
like a
web URL, but it can pretty much be any string that doesn't include
whitespace or
escaped characters.
2. Is there something else that I need to (or should) do to tell the VS
IDE
that my XML file has an associated XSD file?
The "properties " for the XML file includes a field that specifies the
related
XSD file. *I don't know what happens if this property conflicts with the
above
XML text.
The existence of this property solves another mystery -- how the IDE knows
about
the schema of app.config files even though the text of the app.config file
doesn't contain any obvious reference to a schema file.- Hide quoted text-

- Show quoted text -
Jun 27 '08 #1
0 3179

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

Similar topics

1
3400
by: knutsample | last post by:
Hello! I'm trying to associate a file extension to my wxPython script so that all I have to do is double click on the file and my python script will load up with the path of that file. For instance, I've associated all .py files to be opened up with emacs.exe. If I double click on a .py file, emacs.exe would open up with that file in its buffer.
6
2381
by: Ashok | last post by:
hi, i want to know how to make a specific type of file open in an application i developed in python when the user clicks on the file.(in windows) for eg. a .txt file when clicked opens in notepad, a .doc file when clicked opens in MS-word. In the same way i want to make a .xyz file open in the application i developed when clicked. thanks in advance for any advice.
0
1318
by: Raj | last post by:
hi, I associate dataset with one xmldatadocument? how can I disassociate from xmldatadocument, so I can associate with another xmldatadocument. and, how can I remove xmldatadocument from memory? I am new to xml. any suggetions would be highly appretiated.
2
1847
by: John Baker | last post by:
Hi: I have used this group a number of times simply because while the manuals for Access may show the technology, but most are really weak on how to apply it in special situations and the indexes are less that complete!. This is also the first real application iI have developed for Access, although I have done a number in Lotus Approach. I have a table with information on how an Associate is to be handled under a specific Purchase...
2
3026
by: Angel | last post by:
How do I associate a server side command button to a Javascript function that is in the Web Form HTML Code? Thanks
0
1455
by: Dailan | last post by:
Hi, I create a tree view. Each node has link button associate with it, which includes add, edit, delete buttons. The way I did is for users who have very low capablity of using computer. Now I encoutered problem. At certain situation the event does not fire when I click my link button. I generate my tree and link button on fly, and associate event with button. Tree is in my top panel. Detail information of each node is in my bottom panel....
1
1733
by: Brian Kitt | last post by:
Over the years, from time to time, I've added a website as a 'favorite', and noticed that an icon (other than the standard ie icon) would be associated with it. Unfortunatley I don't have any of these saved anymore. I have a current project I am doing where my customer wants me to associate an icon with the link if a user adds the site to 'favorites'. For the life of me I can't find a site now that does this, nor can I find information...
4
15644
by: BD | last post by:
Hi all. Running SQL2K SP4 on W2K3 Standard, SP4. I have just refreshed a database on one server with a backup from another. The database had existed previously on the target server, and I am just refreshing its contents. I used the following approach 1) From the target server, create a SQL script with users and roles 2) From the source server, back up the db
0
265
by: maurice ling | last post by:
"The Python Papers" (http://pythonpapers.org), ISSN 1834-3147, is an online e-journal, covering articles on Python in the community, industry and academia. We were established in the second half of 2006 and launched our first issue in November 2006. Since then, we have released 3 more issues. Recently, we have also initiated a monograph series, which will be known as "The Python Papers Monograph Series"...
0
9423
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
10211
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...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
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
8870
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
7408
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
6673
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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

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.