Hi, As per my understanding following XML file is not valid (Missing Element) according to associated XML Schema. If I try to validate it in XMLSpy it says that it is a valid file. May be I am wrong, Please feel free to correct me.
I have been getting all sort of problem with XMLSpy. Could someone suggest me some other tool to validate a XML file against DTD or Schema. Thanks [ February 06, 2003: Message edited by: Vivek Saxena ] [ February 06, 2003: Message edited by: Vivek Saxena ]
.....XML file is not valid (Missing Element).... <?xml version="1.0" encoding="UTF-8"?><head xmlns="test.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="test.com test.xsd"><title>Guidelines</title><abc /></head>
Maybe I am missing to see something obvious, but why do you say Missing Element.... Which element do you think is missing ? regds. - madhav ps: Vivek: Your posts here are definetly valid, but I was wondering if you could post them in the XML Cert. forum, in case you are a Cert. candidate. I am asking this out of selfishness. I am preparing for Cert. and would like to participate. Kinda, fear that I am missing a lot if I check only the XML Cert forum. Again, this is just a personal request, nothing you "have to" do or anything like that. - madhav
Madhav, Please look into my other post �Schema confusion�. I hope you see my point of confusion. This is just because in one tool my XML file is valid and other is saying �not valid�. I am still looking for some help. Note: If you want you can move both of my post in �XML Certification� forum. From now on I would do my posting over there.
Joined: Jun 03, 2000
This is just because in one tool my XML file is valid and other is saying �not valid�.
Don't you agree that would be the tool problem then ? I was confused by the Missing Element phrase in your post and thought that you implied there was a element missing in the XML file. Not sure if that was what you intended. I am preparing for the Cert and trying to stir the Cert forum, that's all. Your participation in that forum would help if infact you are also preparing for Cert. Thanks. - madhav
Joined: Apr 24, 2002
Kenneth just solved the problem.
This is becoz when u declare an "all" as the model group, then it has to be the one and only one group declaration. In simple words, "all" cannot be nested in a "sequence" or "choice". Pls refer to XML Schema Spec Part 1: Structures 3.9.6 Constraints on Particle Schema Components The table under Schema Component Constraint: Particle Valid (Restriction) Cheers
I do agree that this is tool(XMLSpy) problem. In fact i am also preparing for the exam. Thanks [ February 07, 2003: Message edited by: Vivek Saxena ]
Joined: Jun 03, 2000
I will ask that this thread be closed. We seem to be running into duplicate threads here. Please continue the discussion in the Schema Validation thread, if I could suggest. Thanks. - m