IT researcher
IT researcher

Reputation: 3304

xsd use of id and difference between id and name

I saw a xsd with following line

<xs:element ref="IntrstPay" id="TaxCopSec10" />

So i am interested to know what is this id. In this link it is mentioned that it is a unique ID for the element. So what is difference between name and id? What is the use of id? Please clarify my doubts.

Upvotes: 2

Views: 549

Answers (1)

Michael Kay
Michael Kay

Reputation: 163262

XSD makes no use of id attributes. It allows you to specify the id attribute, for example for documentation purposes, but it has no significance on the meaning of the schema. It's not a substitute for the name attribute.

Upvotes: 2

Related Questions