473,394 Members | 1,773 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,394 software developers and data experts.

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.
Dec 19 '07 #1
0 1651

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

Similar topics

2
by: wooks | last post by:
<?xml version='1.0'?> <userlogin xmlns="urn:faster:userlogin" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <login>mick</login> <password>brown</password> </userlogin> Above is my...
0
by: C. M. Sperberg-McQueen | last post by:
wooks (wookiz@hotmail.com) wrote: > <?xml version='1.0'?> > <userlogin xmlns="urn:faster:userlogin" > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> > <login>mick</login> > ...
4
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
3
by: william_hulse | last post by:
The general process i am currently working on is this: STEP 1 xml doc1 is transformed using stylesheet1 to produce xml doc2 - xml doc1 has a namespace declaration as follows... <?xml...
2
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the...
4
by: Mike Sarbu | last post by:
Hello all, I have an XML file like this: <?xml version="1.0" encoding="utf-8"?> <SomeObject xmlns="http://www.abcinc.com/objectdefinition"...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
3
by: Nicolas | last post by:
Hi everybody, I'm stuck for a couple of days now to the following issue, concerning fixed/default attributes and multiple namespaces. Any help would be greatly appreciated... I'm using Xerces...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.