Difference between xs and xsd in an XML schema file?

What is the difference between xs and xsd prefixes in XML schema files?

+64
xsd
Jul 28 '09 at 11:19
source share
3 answers

From the XSD 1.0 specification on w3.org :

The XML representation of the component schema using the dictionary is identified by the namespace name http://www.w3.org/2001/XMLSchema . For brevity, the text and examples in this specification use the xs: to prefix to denote this namespace; in practice, any prefix can be used.

at the end, xs or xsd are only prefixes. XSD is used, for example, more according to Microsoft schemes.

The important thing is how you declare the namespace.

 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> ... </xs:schema> 

or

 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> ... </xsd:schema> 

must be equivalent.

+86
Jul 28 '09 at 12:10
source share

There is no difference , it's just a matter of choice

+13
Mar 16 '15 at 11:05
source share

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

By convention, people tend to choose either xs: or xsd: and compare this with http://www.w3.org/2001/XMLSchema . There is confusion in one document and should be avoided.

Check your xmlns declarations to determine what namespaces are.

+3
Nov 15 '16 at 9:21
source share



All Articles