RelaxNG enumerated element names
问题 If I have element names that must look like this: <myElem> <subElem_n/> <subElem_n+1/> <subElem_n+2/> </myElem> Where 'n' = 0; How would I enforce this is RelaxNG? The tricky part is the dynamically generated element names. 回答1: Concerning your XML sample file : The XML you provide is not well formed. The + is not allowed in XML names. See here, have a look at PrefixedName and UnprefixedName to have precise syntax. Concerning your validation case : As far as I know, you can't add dynamically