issue with XML and Schema namespace

Hi I am having a hard time with validation of my XML file with given schema.

Here are the files:

roboerrorlog.xsd

<robomss:schema xmlns:robomss="http://www.w3.org/2001/XMLSchema" 
xmlns="robomss"
  elementFormDefault="qualified" targetNamespace="robomss">
   <robomss:element name="roboErrorLog" type="errorLogType"/>
   <robomss:complexType name="errorLogType">
       <robomss:sequence maxOccurs="unbounded">
           <robomss:element name="error" type="errorType"/>
       </robomss:sequence>
   </robomss:complexType>
   <robomss:complexType name="errorType">
       <robomss:sequence>
           <robomss:element name="user" type="robomss:string"/>
           <robomss:element name="datetime" type="robomss:string"/>
    <robomss:element name="message" type="robomss:string"/>
    <robomss:element name="stack" type="stackType"/>
       </robomss:sequence>
   </robomss:complexType>
   <robomss:complexType name="stackType">
       <robomss:sequence>
           <robomss:element name="functionName" type="robomss:string"/>
           <robomss:element name="lineNumber" type="robomss:string"/>
       </robomss:sequence>
   </robomss:complexType>
</robomss:schema>


roboerrorlog.xml

<?xml version="1.0" encoding="utf-8"?>
<roboErrorLog xmlns:robomss="http://www.w3.org/2001/XMLSchema">
  <error>
    <user>steve</user>
    <datetime>12/18/2007 2:31:33 PM</datetime>
    <message>Null reference error!</message>
    <stack>
      <functionName>Void btnSearch_Click(System.Object, 
System.EventArgs)</functionName>
      <lineNumber>300</lineNumber>
    </stack>
  </error>
  <error>
    <user>steve</user>
    <datetime>12/18/2007 2:31:38 PM</datetime>
    <message>Null reference error!</message>
    <stack>
      <functionName>Void btnSearch_Click(System.Object, 
System.EventArgs)</functionName>
      <lineNumber>300</lineNumber>
    </stack>
  </error>
  <error>
    <user>steve</user>
    <datetime>12/18/2007 2:31:43 PM</datetime>
    <message>Null reference error!</message>
    <stack>
      <functionName>Void btnSearch_Click(System.Object, 
System.EventArgs)</functionName>
      <lineNumber>300</lineNumber>
    </stack>
  </error>
  <error>
    <user>steve</user>
    <datetime>12/18/2007 3:22:37 PM</datetime>
    <message>Null reference error!</message>
    <stack>
      <functionName>Void btnSearch_Click(System.Object, 
System.EventArgs)</functionName>
      <lineNumber>300</lineNumber>
    </stack>
  </error>
  <error>
    <user>steve</user>
    <datetime>12/18/2007 3:22:38 PM</datetime>
    <message>Null reference error!</message>
    <stack>
      <functionName>Void btnSearch_Click(System.Object, 
System.EventArgs)</functionName>
      <lineNumber>300</lineNumber>
    </stack>
  </error>
</roboErrorLog>

When I pass these files to a validator it has an issue with the roboErrorLog 
declaration.

Now the weird thing is if I change the namespace in the opening tag to 
xmlns="robomss" than the validator sees it as valid

So the valid tag looks like <roboErrorLog xmlns="robomss"> rather than
<roboErrorLog xmlns:robomss="http://www.w3.org/2001/XMLSchema">

If anyone knows what the issue is I'd appreciate your help. 


0
Durango2008
12/19/2007 9:51:39 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
713 Views

Similar Articles

[PageSpeed] 37

Durango2008 wrote:

> <robomss:schema xmlns:robomss="http://www.w3.org/2001/XMLSchema" 
> xmlns="robomss"
>   elementFormDefault="qualified" targetNamespace="robomss">

As the targetNamespace of your schema is "robomss" and as 
elementFormDefault is "qualified" the schema defines all its elements in 
the namespace "robomss".
Thus for an XML instance document to be valid against the above schema 
you need to have
   <roboErrorLog xmlns="robomss">
or use some prefix (e.g. "rb")
   <rb:roboErrorLog xmlns:rb="robomss">

> <roboErrorLog xmlns:robomss="http://www.w3.org/2001/XMLSchema">

Why do you think that the XML instance document needs to use the XSD 
schema namespace "http://www.w3.org/2001/XMLSchema"? You need that in 
the schema to indicate you are authoring a schema in the W3C schema 
language but using that namespace in the instance document is not 
meaningful.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
12/19/2007 12:42:08 PM
Reply:

Similar Artilces:

Excel formula issues, wierd..
Hello all.. Ok, I am working in a new spreadsheet that was designed in 97 but I a now using 2000. Not sure if that is the problem. BUt everytime I ope the spreadsheet or change any data, I have to go to not one, not two bu all formulas in the spreadsheet and f2 then enter to clear it before i will recalculate. I dont understand it. For example, I am just usin a sum.. =sum(a2:a8) in a9. i can change any one of a2:a8 and a will NOT change unless i f2 then enter in a9. It is happening wit multiple formulas in multiple cells. any ideas....???? Thanks schle -- schleppy ------------...

How to get attribute names from schema objects?
Using 2.0, but I think this applies to 1.1. Given an XmlSchemaElement object (retrieved from an XmlSchema object), how do I get to it's attributes? I tried this against a document that has attributes, but got nothing: foreach ( XmlSchemaAttribute attr in schema.Attributes ) { Console.WriteLine( attr.Name ); } Finally partially figured this out. I don't know why, but the XmlSchemaElement's ElementSchemaType must be XmlSchemaComplexType (it seems you can't get the attributes of an XmlSchemaSimpleType schema element. Anyway, you can read the attributes of a complex type ...

filter issue
I am working on a list that is filtered all of a sudden the down arrow is frozen and only the filter criteria is displayed. How do I enable the dropdown list of the filter displaying all the entities. Similarly, I have filled some cells in a column with a color can I filter to display only these cells. Afd I'd remove the autofilter, then select the entire range and reapply the autofilter. You can filter by color in xl2007. Or you could use Ron de Bruin's addin: http://www.rondebruin.nl/easyfilter.htm afdmello wrote: > > I am working on a list that is filtered all of ...

Security issues with Outlook?
I've looked in the Tools>Options>Security...etc... but can't find how to "ease-up" on the security issues such as, attachments: "Microsoft Outlook has determined the attached file may be potentially harmful and won't open it" or "This Item may be potentially unsafe. Recipients using Outlook may not be able to open these attachments. Do you want to send anyway?"... how do I change the security settings? I've tried the security tab but all it shows is "Restricted Sites" and "Internet Sites" and if I click Zone Setti...

Outlook Activation Issue
Hi there, I have an activation issue with Outlook. I recently purchased and installed Office 2003 Professional upgrade on a computer that had Office 2003 Standard trial. All applications (Word, Excel, PowerPoint, Publisher, and Access) with the exception of Outlook activated without problem as Professional versions of the software. Outlook does not activate, however, because it's listed as being a Standard trial version and hence won't take the Professional product key. Is there an easy way I can activate Outlook without having to reinstall everything? Thanks, Darryl W...

Integration Manager issue
I recently installed integration manager and set it up for GP 9. Everything seems to be working perfect for the integrations I have setup with 2 exceptions. First, the menu options within GP are greyed out. I have confirmed the new code has been added and have looked in the system security settings to no avail. I have reinstalled and still have not been able to get the menu usable for any user. I have used SA as well as other users. Second, I think this can be resolved easily but just don't want to cause problems with the database. I have placed the im.mdb database file on a network shar...

Fixed Asset Cost Account Issue
Once you assign any purchasing transaction (PM/POP) to Fixed Asset Master during the time of creating new asset. After sometime you relize that you have done one mistake and want to rolback the transaction, there is the procedure to delete the transaction althgh you can rollback the fixed asset but there is no effect on PM/POP Purchasing Transaction which was linked at the time of asset creation. The second thing which is not related to abouve is but what's happen is my users mistakenly attached the PM/POP Trasnaction to an asset at the time of creation and later they reliaze that ...

Formating Issues
I have a Publisher 2003 Brochure in progress. I only need the first page of this two page document. I can find no way to save only the first page of this work. Additionally, I've inserted a text box for a list of items and want to divide it into two columns. Need some guidance on how this would be done. Much thanks for any assistance. Go to page two, Edit, delete page. Save with a new name if you want both files. Right-click the text box, click format text box, Text Box tab, columns button. -- Mary Sauer http://msauer.mvps.org/ "Maurice" <Maurice@discussions.micr...

XML Schema bug
If you have a facet like <xsd:minLength value="5" fixed="true" />, you should be able to have <xsd:minLength value="5" /> in restrictions of it, as long as the values are the same. If I try using the schema below, I get the error: "Base type has {fixed} equal to true." XML-Schema part2 Datatype, 4.3.2.1: (http://www.w3.org/TR/xmlschema-2/#dc-minLength) "If {fixed} is true, then types for which the current type is the {base type definition} cannot specify a value for minLength other than {value}." So my sc...

Subrepport issue in CRM 3.0
Hi. I created a report with a subreport for CRM 3.0 (I work with SQL 2005 and RS 2005). On my customer CRM, when I run the report as admin it works, when i run it as a other user i get an error message "can't run the repport" but nothing in the log. I think it's the subreport is not running On development environment all works (it's the same as my customer) Thanks for your help. Christophe ------=_NextPart_0001_085CFEC9 Content-Type: text/plain Content-Transfer-Encoding: 7bit "WTCSO" <christophe.soyer(antispam)@free.fr> wrote: > I created a ...

Posting of XML messages
hello i'm trying to create a vbscript that posts a xml file to a http adres. i googled my way arround and found something like this: ' Create an HTTP object Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" ) can anyone supply me with a code so that i'm able to upload (post) a xml file that is put on my disk and cold monitoring.xml any help woukld be appriciated Leon Leon <lvantoorenburg@hotmail.com> typed: > i'm trying to create a vbscript that posts a xml file to a http > adres. > > i googled my way arround...

Excel issue..
It's works... Thanks a lot... You are welcome. "meljos" <melvinkjoseph@gmail.com> wrote in message news:56fdbad7-f7c1-499c-9f30-35b45aab5c09@m7g2000prd.googlegroups.com... > > It's works... Thanks a lot... ...

Issues and Risks Not Showing up
Experts, This seems simple but I cannot get it to work. If I create a risk in my project workspace, assign it to myself, shouldn't I be able to see those risks in my PWA Reminder section? I am not able to do that May be a sync issue. First thing I would check is whether or not the workspace template has been updated incorrectly. Was it updated? - Andrew Lavinsky Blog: http://blogs.catapultsystems.com/epm > Experts, > > This seems simple but I cannot get it to work. If I create a risk in > my project workspace, assign it to myself, shouldn't I be ab...

Scanning issue at POS
Has anybody come across an issue that seems to have popped up sometime over the past few weeks where you pull a customer up at the POS then you go to scan an item but instead of the cursor defaulting on the item lookup code field, it ends up popping open the tender box and scanning the number into the first tender slot? You cancel out of the tender and ring the items up normally but then you go to tender the sale and the scanned item still appears in the tender box? I believe it's a Microsoft Update that may have done this but I am unsure of the exact date and wouldn't know wh...

PowerPoint 2007 Security Issue while opening a template
We have been indulged in PowerPoint programming using VB.net and Office 2007. To give a brief, our organization has a formatted template, which is being used for creating a new presentation. Whenever a user creates a new presentation, a new instance of template is created. I use the following simple line for creating a new presentation : pres = ppContext.Application.Presentations.Open(path, _ MyConstants.MSO_FALSE, _ MyConstants.MSO_TRUE, _ ...

Can't add issues or documents via Project Professional
I have several users that are experiencing this problem. When the choose Collaborate/Manage Deliverables, nothing happens. Other users seem to not have any issue. Any ideas? Have the projects been published recently? -- Gary L. Chefetz, MVP, MCT, MCTIP Business: http://www.msprojectexperts.com FAQs: http://www.projectserverexperts.com BLOG: http://www.projectserverhelp.com "mhegges" <mhegges@discussions.microsoft.com> wrote in message news:3EF52A22-D572-48D9-B449-E924686653DE@microsoft.com... > I have several users that are experiencing this problem....

Mouse issues with Excel
Every now and then, our Excel wigs out. If you highlight a cell, and move the mouse, it highlights everywhere the mouse points. The curser stays at the "plus" symbol, and you can't close or select anything from the excel toolbar (ie "file" "exit"). By the time you move the mouse to the desktop toolbar, so you can right-click and close, everything in the spreadsheet has been highlighted (max rows and columns). I tried hitting F8, that didn't work. I deleted and reloaded the mouse drive, that didn't work either. Temp fix is to reboot (it's a ...

wordart layout issue
I've used Wordart in a header in Word. Then: Format/Autoshape/Layout/Advanced/Text Wrapping/Through. Now, I'd like to select and modify the Wordart but I can no longer select it. I've tried Select Object, double-click, etc., can't select it. Any ideas how to select it? Use the white select arrow on the drawing toolbar. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ...

xml import relative path
When I import XML Data (after specifying the XML Map), I choose a file. When I refresh, Excel seems to look for the absolute location of this file. Is there any way for me to make Excel look for .\data.xml instead of C:\My Documents\data.xml? Thanks ...

Reading only a specific portion of XML file.
I created the following test XML file, containing the translations of all my reports's labels in all available languages. Every report has all its localized texts under the proper CultureID node, under the report's name. The question is, (as I'm new to XML/XPath/etc...) using ASP.NET(VB), how to read all the labels of a report in a specified language, into a dataset? Imagine that for a report (e.g. Report_A) the user selects the CultureID from a dropdown list, to display the proper translations. <?xml version="1.0" encoding="utf-8" ?> &l...

File Saving Issues
On a network newer XP computers take 10 to 15 minutes to save certain spreadsheets stored on a network drive whereas older Windows 95 computers do this in a matter of seconds (same spreadsheets). I've tried saving in different formats and there is nothing wrong with the network connections. Any ideas? Don't really know, but as an older computer user (and user of an olde computer) my temporary file is stored in my local C:\temp folder perhaps XP uses the server for this ? -- Message posted from http://www.ExcelForum.com ...

Item Cost Issue causing headache's
Here's the lowdown and I believe the same is true for our previous version of GP as well. On GP8 we have generic item numbers that are at 0.00 cost. When these items are used on a Drop Ship Sales order the cost and price is inserted by a Sales Rep. and then it's purchased (sent to PO). The PO retains the cost and price. When it's time to transfer the order to an invoice it still retains the cost of the item that we have entered, but when it comes time to post the invoice the cost it thrown back to 0.00 pulling from the item card. Because my report pulls from history ...

Add to an XML node
I have a web service that returns me an XmlNode ojbect. Here is an example of the outerXML: <?xml version="1.0" encoding="utf-8" ?> <NewDataSet> <Table> <ID>123</ID> <TheName>Bob<TheName> </Table <Table> <ID>124</ID> <TheName>Barry<TheName> </Table <Table> <ID>125</ID> <TheName>Beth<TheName> </Table <Table> <ID>126</ID> <TheName>Beatrix<TheName> </Table <Table> <ID>127</ID> <TheName...

Discount Tickets for XML Publishing Conference Available
Tri-XML 2006 Conference http://www.trixml.org/confschedule.shtml Because I'm speaking at the upcoming TriXML conference-July 27-29, 2006 in Raleigh, NC, I have some discounted tickets ($150 instead of $550) that I can make available to others. I thought this would be a good opportunity for people who are self-employed or whose employers won't sponsor the more costly conferences. If you're wanting more information about XML and how it can be used in the real world, check out the TriXML conference schedule at http://www.trixml.org/. With a theme of "XML in the Workflow", ...

Importing RosettaNet 3A4 XML Documents as New Invoices
Can someone please point me in the right direction to create new invoices in Great Plains 8.x from RosettaNet 3A4 (Purchase Order Request) XML Documents? Can eConnect do this mapping and importing without code? Does this require BizTalk? Do I have write custom code to parse the RosettaNet document and make an API Call? Thanks in advance! Mike ...