Attribute is not a valid value of the atomic type 'xs:ID'

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Attribute is not a valid value of the atomic type 'xs:ID'

Post by peter_b »

[PROBLEM]
Validating a generated XML using "xmllint", I got the following error message:
mets.xml:46: element techMD: Schemas validity error : Element '{http://www.loc.gov/METS/}techMD', attribute 'ID': 'video' is not a valid value of the atomic type 'xs:ID'.
mets.xml:69: element techMD: Schemas validity error : Element '{http://www.loc.gov/METS/}techMD', attribute 'ID': 'audio' is not a valid value of the atomic type 'xs:ID'.
I was puzzled, because "xs:ID" can contain alphanumeric characters...

[SOLUTION]
The error is also thrown if the values of the IDs (in my case "audio" and "video") appear more than once.
I overlooked this at first, but due to multiple audio-video tracks being present in the source material, I actually got more than just one audio/video section.

The validator was right, but the error message is a bit confusing ;)

So: Make sure that all values in attributes declared as type "xs:ID" are unique across your whole XML file!
Post Reply