How do I defined an XSD attribute name as a regular expression?

Brett_Levi

New Member
The XML allows a variable number of attributes of Q followed by a number, like this\[code\]<recognitionPattern Q0="12.5" Q1="12.5" Q2="12.5" Q3="12.5" Q4="12.5" Q5="12.5" Q6="12.5" Q7="12.5"/>\[/code\]My current solution looks something like this:\[code\]<xs:complexType name="PerQuarterDoubleHack"> <!-- YUCK! /> --><xs:attribute name="Q0" type="xs:double" /><xs:attribute name="Q1" type="xs:double" /><xs:attribute name="Q2" type="xs:double" /><xs:attribute name="Q3" type="xs:double" /><xs:attribute name="Q4" type="xs:double" /><xs:attribute name="Q5" type="xs:double" /><xs:attribute name="Q6" type="xs:double" /><xs:attribute name="Q7" type="xs:double" /></xs:complexType>\[/code\]I've seen lots of regular expressions applied to the value, but never an attribute name.Do I have any choice than changing the XML?
 
Back
Top