xsd - Multiple XML file with same root name refer to 1 XML schema: setting a unique key to element -
eg. have 2 separate files same root name can seen in employment.xml , education.xml. common word between both files word "code". ensure "code" , values not repeated in respective files. so moving onto schema, how make verification code only. since apprently 2 selectors not work in 1 . trying prevent writing , make schema reusable more similar lists "code". my idea create function thing. in sense, if identifies "employmentstatus", should result in 'xs:selector xpath = "employmentstatus"' , if identifies "education", should result in '"xs:selector xpath = "education"' etc. is possible in xml schema? suggestions great? xml files: employment.xml education.xml xml schema: rootwithattribut.xsd "xs:selector xpath = "*" " this works because * matches element node. works temporarily have 1 element currently. has helped element name. works. ...