XML Schema Header & Namespace Config
Posted
by
zharvey
on Stack Overflow
See other posts from Stack Overflow
or by zharvey
Published on 2011-11-22T15:58:23Z
Indexed on
2011/11/22
17:50 UTC
Read the original article
Hit count: 240
Migrating from DTD to XSD and for some reason the transition is a bumpy one. I understand how to define the schema once I'm inside the <xs:schema>
root tag, but getting past the header & namespace declaration stuff is proving to be especially confusing for me.
I have been trying to follow the well-laid out tutorial on W3S but even that tutorial seems to assume a lot of knowledge up front.
I guess what I'm looking for is a King's English explanation of which attributes do what, where they go, and why:
- xmlns
- xmlns:xs
- xmlns:xsi
- targetNamespace
- xsi:schemaLocation
And in some cases I see different variations of these elements/attributes, such as xsi
which seems to have two different notations like xsi:schemaLocation="..."
and xs:import schemaLocation="..."
.
I guess between all these slight variations I can't seem to make heads or tails of what each of these does. Thanks in advance for bringing any clarity to this confusion!
© Stack Overflow or respective owner