Why is XMLSchema namespace so different than my custom namespace?

Below is a snippet that I'm sure is quite familiar to most ...

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

Here, I've given the XMLSchema namespace the prefix 'xsd', and with
that, I can reference datatypes within the XMLSchema namespace ...
i.e., xsd:string.

That's great, but why can't I use that same notation, to reference
dataypes in a homegrown schema ... WITHOUT doing an <import> or
<include>?  Is the XMLSchema (and the XMLSchema-instance) sort of
"built-in" to XML tools, such that they don't need to go find the
XMLSchema.xsd at www.w3.org?

Am I correct in assuming I need to <import> or <include> other
(custom) XSD's in order to reference one from another?

Finally, given that the schemaLocation tag is only a "hint", how can I
reliably reference another schema file - to provide data types?

Much Thanks!!!
0
qdm0308 (1)
11/5/2004 1:29:48 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
712 Views

Similar Articles

[PageSpeed] 18


qdm wrote:
> Below is a snippet that I'm sure is quite familiar to most ...
> 
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 
> Here, I've given the XMLSchema namespace the prefix 'xsd', and with
> that, I can reference datatypes within the XMLSchema namespace ...
> i.e., xsd:string.
> 
> That's great, but why can't I use that same notation, to reference
> dataypes in a homegrown schema ... WITHOUT doing an <import> or
> <include>?  Is the XMLSchema (and the XMLSchema-instance) sort of
> "built-in" to XML tools, such that they don't need to go find the
> XMLSchema.xsd at www.w3.org?

I think so, a validating parser has built-in knowledge of the W3C schema 
rules and types, it doesn't load a schema file for that (as that schema 
file is not complete anyway I think).

> Am I correct in assuming I need to <import> or <include> other
> (custom) XSD's in order to reference one from another?

If you want to use elements or types from a different namespace then 
yes, you need to import a schema for that namespace.

> Finally, given that the schemaLocation tag is only a "hint", how can I
> reliably reference another schema file - to provide data types?

That depends on the API of the parser you are using.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
11/5/2004 2:37:41 PM
Reply:

Similar Artilces:

XmlSchema not loading from XmlTextReader
For some reason, the schema seems to be empty every time it's loaded. Does anyone have any ideas?? Thanks! Here's the code: Dim xsd As System.Xml.Schema.XmlSchema Dim io As New System.IO.FileStream(xsdFileName, System.IO.FileMode.Open, System.IO.FileAccess.Read) Dim x As New System.Xml.XmlTextReader(io) xsd = System.Xml.Schema.XmlSchema.Read(x, New System.Xml.Schema.ValidationEventHandler(AddressOf XsdValidationError)) .... .... .... Public Shared Sub XsdValidationError(ByVal sender As Object, ByVal args As System.Xml.Schema.ValidationEventArgs) throw new exception (&q...

Different Versions Money 2005
3 months ago I downloaded as free trial the International Version of Money 2005. I liked it and I decided to purchase the full version. A reply to an email query to MS made it clear that it was not possible to download the full version and that I would have problems purchasing the box version (international/english) at a local retailer. I live in France at the moment and decided to purchase Money 2005 in French (only available version here). I assumed that I can use the data file myMoney1.mny from the trial version. When I want to open the file in Money I get an Error Message stating th...

match name fields to determine differences #2
I have two worksheets that have common columns for last name and first name. I want to determine which rows are in both worksheets based on the last name and first name. The concatenate function with vlookup is an option, is there an easier way? I will have to assume that first names are in column A and last names in column B. And that there are 300 names on sheet1 with headings. The first sheet is called "sheet1" It doesn't matter how many names are on sheet 2. In the second sheet cell C2 enter You may have to change it around to match your information. =IF(SUMPRODUCT((Shee...

Different response times...
I have a VB 2005 program that uses an Access 2000 database that sits on a network drive. I'm using an oledb connection. From my PC, either through Visual Studio, or running the app itself, the program can query the database quickly (maybe a quarter second for a simple INSERT query). If I'm running the app from another pc on the network, the same INSERT query is taking about 12 seconds. I have tested this same program on multiple PCs with the same result. Also I installed Visual Studio on one of the 'slow' PCs and the response time went from 12 seconds down to 3 or 4 sec...

custom pos buttons #3
Looking for an internal command to bring of the voucher(cnt shft f3)and refund..Downloaded qsbridge fireevent but cant find all of the commands..is there a complete list somewhere...thanks ...

Need a program to integrate Great Plains for customer support.
We are currently using Great Plains and Microsoft CRM in our office. We are considering Wennsoft and Alert for additional integration use and would like to know if there are some other programs people are using to achieve the following: 1. When a customer calls we want a dashboard -a history of their prior calls opened or closed and the associated notes so that our customer service desk can review the situation more thoroughly with the customer. 2. We want a listing of the equipment that we installed as listed in the sales under Great Plains. 3. Prior tickets/invoices should be av...

Access behaves differently in different environments
The following function has an error in it. There is no column called "Comment" in the table "tblScores." But in my XP 2003 Pro/Access 2003 environment, control is never transferred to the error handler. Instead, the function just returns an empty string. In a Windows 2000 environment, control does go to the error handler, but the error is "<database name> can't find the field Forms referred to in your expression." Not very helpful. But the 2000 environment at least is recognizing that an error occurred. The database is created in the 2003 e...

customize home_sales.aspx
Hi, is it possible to change the homepage of the crystal reports in ms crm 1.2? we want to delete some categories and add new categories that contain our reports... thanks in advance jani It's possible, but definitely not supported or recommended. You can download Report Manager for CRM 1.2 from http://www.microsoft.com/downloads/details.aspx?FamilyID=81517729-F640-4F46-BA30-6B9E6F451526&displaylang=en This is supposed to let you add, delete or change the names of reports (though I haven't had any luck with it on our SBS 2003 box). Also, you can add your custom reports through...

Different page breaks
Why is it when I open the same file on different computers the page breaks move to different locations? I have tried this on three computers on the same network accessing the same file. All three have the same OS (Win 98 SE) and the same Excel (Office 2000 Pro) and they all have the same printer driver (HP 4000 PCL 6). Two of the computers are printing on the same printer (networked, not shared)over the network. I am having a similar problem at another office located in another city. Hi maybe different printer setups on the differen PCs? -- Regards Frank Kabel Frankfurt, Germany &...

Space available: different result between Property and JDiskReport
I have just checked my available space in C: Property shows I am occupying 90.6 GB (and oddly it "steals" some GB while Vista is running and my hard disk seems to fill up by itself. JDiskReport shows I am using only 85.8 GB and it provides a detailed list of my files. Who is it right? ...

WEB.CONFIG, ISV.CONFIG, OUTLOOKCLIENT.XML differences
At my office, over the last 48 hours, we've run into a number of different issues with the above 3 files. After running into walls head-first, I made a Word doc for my office, and I'm copying it up on the newsgroup. If you like it, let me know. If you don't, don't tell me. <big grin> ISV.CONFIG, WEB.CONFIG, and OUTLOOKCLIENT.XML These 3 files are major components of any CRM system. Here is what each of them do: ISV.CONFIG: Used for ISV Customizations. It is used to add menus and toolbars to the system. WEB.CONFIG: This file controls a number of variables relating...

Problem when customizing ISV.Config File
I have below lines in my ISV.Config file, just for testing to learn how ISV.Config works. <configuration version="3.0.5300.0"> <Entities> <Entity name="account"> <Grid> <MenuBar> <ActionsMenu> <MenuItem Title="Coming Soon..." Url="http://www.microsoft.com" WinMode="1" /> <MenuSpacer /> <SubMenu Title="Sub Test"> <MenuItem Title="Test Sub 1" Url="http://www.microsoft.com" /> <MenuSpacer /> <...

Question about different string type in VC++
Hi, I want to write a simple Trim() function to trim the spaces around a LPSTR string. I created a dialog based app to test the routine, the Trim() function seems to be OK, but when I close the dialog, it causes General Protection Fault. I tried some other approaches but no go. Since I only intent to use Ansi string, so I did not use any _T() macro or _TCHAR() macro in Trim(). Please tell me what I did wrong. Thanks. Here are the code fragments: void CSimpleDlg::OnBTNTest() { // TODO: Add your control notification handler code here CString sInput; LPSTR sTemp; GetDlgItemText(IDC_TX...

date difference in mm/yyyy format
I have two date colums StartDate ReadDate I want to find all the readdates that are in months prior to the startdate Eg if(readdate<startdate,"yes","no") the problem is that if the readdate is in the same month (or any later date) as the startdate I want a "no' returned. Is there any way to compare to dates in a mm/yyyy format? Hi Ian =if(Month(readdate)<month(startdate),"yes","no") -- Regards Roger Govier Ian wrote: > I have two date colums > StartDate > ReadDate > > I want to find all t...

Difference between yyy and yyyy?
When typing custom formats, yyy appears to do the same thing as yyyy. Some online tutorials seem to indicate this is a hold-over. Does yyy have any official function? IlNxdWFyZSBQZWciIDxTcXVhcmVQZWdAUm91bmQuSG9sZT4gaGF0aCB3cml0dGVuOiBuZXdzOmRz NXZjNGRnMWdlcnAwZmhwdHJxNTBzc2k2NmtlbzJ2dDlANGF4LmNvbS4uLg0KPiBXaGVuIHR5cGlu ZyBjdXN0b20gZm9ybWF0cywgeXl5IGFwcGVhcnMgdG8gZG8gdGhlIHNhbWUgdGhpbmcgYXMgeXl5 eS4NCj4gU29tZSBvbmxpbmUgdHV0b3JpYWxzIHNlZW0gdG8gaW5kaWNhdGUgdGhpcyBpcyBhIGhv bGQtb3Zlci4NCj4gDQo+IERvZXMgeXl5IGhhdmUgYW55IG9mZmljaWFsIGZ1bmN0aW9uPw0KDQoN Ck5vLCBpdCdzIGp1c3QgZmFpbC1zYWZlIGFuYWxvZyBmb3...

Import a Word document to a "custom" Master Page in Publisher
I'm new to Publisher. I have a document (genealogy) in MS Word. I want to use Publisher instead of Word. I set up a 2-page Master Page in Publisher and "Import Word Document". It imports the document but into the "default" Master Page format. How do I import to "my Master Page"? I've been through all the "help" procedures but I'll be darned if I can figure this out. Any help would be appreciated. Create a text box, right-click the text box, click change text, click text file, browse to the Word document. -- Mary Sauer MSFT MV...

Customize Field Names and Menu iterms
Hello, How can I change the fields' name in a dialog box or the menu items name in a window? Can I use VBA to do it? Or, do I have to use Dexterity? Thanks, It depends on exactly what you are trying to change. You can use VBA or Dexterity for many things, but palettes can be altered from Setup >> Company >> Palettes, and many other strings can be changed using the Modifier. With the Modifier you can change strings and messages system-wide using the Resource menu without needing to create modified windows. Or you can create a modified window and change field prompts...

XmlNamespaceManager, default namespaces, nested qualified namespace, xpath problem.
Hi, I can't for the life of me get this to work properly. I've searched for examples, but none of the examples quite match my environment. Here is my XML (please treat this as immutable -- no solutions involving altering the XML are good for me): ---- config.xml ---- <Configuration xmlns="urn:server:schemas:configuration" xmlns:f="urn:server:schemas:faq"> <version version="0.0.0001"> <f:faq> <f:section>Default</f:section> <f:item> <f:q>What is the mean...

Custom shortcutmenu for commandbutton to open form with arguments
How does one create a custom shortcutmenu to set to a CommandButton that will open up a form passing in arguments from the current form, all in Access 2007 and VBA? Attached is some code that I use for a custom shortcut menu that I use on most of my forms. I call the subroutine when my Splash screen loads, and then use the click event of a control on my form (usually a label in the upper left corner of the form) to display the shorcut menu, using: CommandBars("MyFormMenu").ShowPopup What you will need to do is change the references to fnCloseForm to a new function th...

Prefixed namespaces and Xpath
I have come across what seems like a failing in the .Net XML classes. Many people have posted requesting how to write an XPath query with namespace prefixes that works. The solution shown in all the posts I have seen is of the form: --------------------------------------------- XmlDocument doc = new XmlDocument(); doc.Load(@"c:\foobar.xml"); XmlNamepaceManager nmMgr = newNamespaceManager(doc); nmMgr.AddNamespace("abc", "www.my.uri"); --------------------------------------------- Now you can call SelectSingleNode and SelectNodes with an XPath query that contains...

Unable to edit custom dictionary within Word 2008
The first time I tried to edit my custom dictionary (I had accidentally entered a misspelled word) in Word 2008, the Edit button was available, but I was unable to click in and actually edit the list of words that came up. I temporarily gave up and resumed my spellcheck to finish the document. Then I tried again to edit the custom dictionary. Now the Edit button is dimmed, and the only way I can edit the custom dictionary is through the finder (by opening the file in a text editor). No matter which document I open or how many times I relaunch Word, this problem persists. Any suggestions? On...

Custom Number Formats #2
How do I create a custom number format to return thousands e.g. if the value is 1000 the format shows 1 Under Format -> Cells in the Custom format box type #, (make sure you put the comma in). This will only show the thousands part, note that it will round numbers like 2598 up to 3 instead of 2. Andrea Jones http://www.allaboutoffice.co.uk http://www.stratatraining.co.uk http://www.allaboutclait.com "Mary Ann" wrote: > How do I create a custom number format to return thousands e.g. if the value > is 1000 the format shows 1 Try this custom number format: 0, Or: ...

Displaying controls for different monitor display format settings
Hi, I want to display a CButton (o_Verwijderen) control at the left bottom of my form for all display formats. I have : void CTBURView::OnInitialUpdate() { CFormView::OnInitialUpdate(); ShowWindow(SW_SHOWMAXIMIZED); long x,y; x = ::GetSystemMetrics(SM_CXSCREEN); y = ::GetSystemMetrics(SM_CYSCREEN); CRect o_Rect; o_Verwijderen.GetClientRect(o_Rect); o_Verwijderen.MoveWindow(10,(int)(y*0.81),o_Rect.Width (),o_Rect.Height ()); This works only for the highest display format setting 1280x1024 and for 1280x960 but for lower settings the button moves of screen. How do display my but...

ElementRefs in XmlSchema
I implemented a schema helper function GetDeclaration (similar to MSXML), that finds a XmlSchemaElement for a given XmlElement, using a XmlSchemaCollection. There is one kind of element, that is defined in schema A with some annontation. <xs:element name="MyElement" type="SomeType"> <xs:annotation> <xs:documentation>blablabla</xs:documentation> </xs:annotation> </xs:element> and referenced in schema b at some point <xs:element ref="a:MyElement"/> I noticed, that in some situations, i find an instance of XmlSche...

Custom Entity and its Relationship
Hi NG, Got a question and would appreciate anyone's help. Can a Custom Entity "Hardware Issues" have a parent or child relationship to itself? i.e., "Hardware Issues" to be a parent or child to "Hardware Issues". Many thanks in advance. Regards, Dixon Afraid not. Entities cannot reference themselves. Though CRM can handle it (like the parentaccountid in the account entity), it will not allow you to specify it by yourself. -- Michael http://www.stunnware.com/crm2 ---------------------------------------------------------- "Dix" <Dix@dis...