ID/IDREF or Key/Keyref

R

Ridius

Hello.

I start to study XML and have a question. What`s the difference
between ID/IDREF
and Key/Keyref? What's better to use?

Thanks.
 
M

Martin Honnen

Ridius said:
I start to study XML and have a question. What`s the difference
between ID/IDREF
and Key/Keyref? What's better to use?

DTDs only support ID/IDREF while XSD schemas additionally support
key/keyref. ID values need to be unique in the complete document, with
key values there is no such requirement for the complete document.
Additionally you can form a key from various element or attribute
values, that is not possible with ID. See
<http://www.w3.org/TR/xmlschema-0/#specifyingKeysAndtheirRefs>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top