Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xs vs xsd types

Tags:

xml

xsd

I have an xs:gmonth type that I am working on, so I was looking around to see the valid format for it and I came across 2 definitions:

xsd:gmonth which accept the format --MM, xs:gmonth which accept the format --MM--,

xs:gmonth format will not be valid for the xsd:gmonth format and oposit is correct

.

Can anybody please tell me what is the difference between the xs: and xsd: types? aren't they both used for XML Schema?

Thanks a lot.

like image 708
tigris Avatar asked Jul 08 '11 01:07

tigris


1 Answers

The xs: and xsd: are called namespaces. They are declared using xmlns elements in the root element.

By convention people tend to choose either xs: or xsd: and map that to http://www.w3.org/2001/XMLSchema. Having both in a single document is confusing and should be avoided.

Check your xmlns declarations to determine what the namespaces are.

like image 106
sourcenouveau Avatar answered Oct 16 '22 15:10

sourcenouveau