XML question

I get the following error when going from my xml doc to the schema in XMLSpy.

XML Schema has to begin with a <schema> element in namespace 'http://www.w3.org/2001/XMLSchema'!

I assume I have something wrong in one of the headers though I used the schema to create the document. Headers are attached.

Any advise is appreciated.
Doc Header:
<Fund_NAV xmlns="http://MyCompany.com/AMG/Fund_NAV" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://MyCompany.com/AMG/Fund_NAV file:///C:/Users/btraut/Desktop/NAV5.xsd">

Schema Header:
<xs:schema xmlns="http://MyCompany.com/AMG/Fund_NAV" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:altova="http://www.altova.com/xml-schema-extensions" targetNamespace="http://MyCompany.com/AMG/Fund_NAV" elementFormDefault="qualified" attributeFormDefault="unqualified">

Open in new window

BillTrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BillTrAuthor Commented:
I had already looked at this post but still cannot resolve the issue.

My impression is I'm missing something in how XMLSpy works. I had assumed that if I create the document via the schema that I should be able to jump directly from that document to the schema via the schema button at the bottom. But perhaps that is not the case?
0
BillTrAuthor Commented:
I find it works when I go to the schema via the DTD/Schema option at the top of the screen.

So, I think my xml is probably correct and that there is a nuance to XMLSPY that I'm not aware of.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

aikimarkCommented:
@BillTr

Can you post the two files?
0
Geert BormansInformation ArchitectCommented:
Hi, I looked at both headers,
- the targetnamespace is right in the schema
- the references and namespaces are all right in the document and the schema
- the schema namespace is right

and in my opinion the only way XMLSpy would give this error is when the schema file is not in the location referenced (so the schema is not on your desktop or not saved from the editor window)

This should be where the saved schema is
C:/Users/btraut/Desktop/NAV5.xsd
0
BillTrAuthor Commented:
The file is definitely there in the desktop. I did use it when I created the XML file.

Could I have something wrong in the .com portion?

Does http://MyCompany.com/AMG/Fund_NAV have to exist somewhere?
0
Geert BormansInformation ArchitectCommented:
http://MyCompany.com/AMG/Fund_NAV does not need to exist, it is the namespace uri, it is just an unique identifier that has a url form, but is a URI, not a URL

Can you share the two files?

It always help to create a new XML file based on the schema, then XML Spy sets the header correct. After that you can compare. I don't see an issue however, so it must be somewhere in the files
0
aikimarkCommented:
I have two different XML tools I wanted to expose to your files.  I'm interested in what those tools think is happening.
0
BillTrAuthor Commented:
I opened a ticket with Altova. Their response is that the button I was using, while not greyed out, is not supported when working in an XML file. That I must use the "Go to Schema" path.

So the tool is apparrently working as designed.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geert BormansInformation ArchitectCommented:
I am utterly surprised... time seems to have changed.
When I was still a paying (too much definitely) customer of Altova products, I opened God knows how many tickets, never got a decent reply. So I abandonned Spy for other (much better) tools... seems they finally understood support is important... or you just got lucky :-)
0
Geert BormansInformation ArchitectCommented:
well aikimark,
some assists would be fair no?

http:#a39573834 did after all confirm the headers were OK

just a thought
0
BillTrAuthor Commented:
This turned out to be a training issue on my part, but the quick responses provided were very helpful in pointing me to that. I divided the points as best I could. Let me know if there's a problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.