In a complex project, I have many XML files like data files, config files etc. They all are similar but have different content (some are data files, some config files etc) and of course have slightly different structure (such as root node) but some “core” elements are the same.
However, some children elements of a specific element should not be allowed in one file but in the other.
Is it a good practice to create separate XSD schemes for each file or a single XSD for the whole project?
I think I should map one XSD to one namespace, correct?
In this case, is it better to have a single namespace (and XSD) such as
http://www.example.com/myproject/schema
or for each file:
http://www.example.com/myproject/schema/configfile1
http://www.example.com/myproject/schema/configfile2
http://www.example.com/myproject/schema/datafile3
http://www.example.com/myproject/schema/datafile4
Regards
divB
I would go for separate XSD and namespaces for each data/config files if their structures are different – maybe with a common XSD that is included in the specific ones for the parts that are common to all XML files.