Subject:Validation of element with attribute Author:John Higgins Date:17 Jan 2006 09:39 AM
I am trying to construct a schema to validate an element with numeric data and a text attribute. I have enclosed the XML and schema files (the schema was generated by Stylus Studio). I need to check that the "coeff" data is numeric (running the validation gives a "valid" message) and the second element is obviously not. Is this format validatable with a schema? If so, how (I hacked several XSD attempts but got error messages)?
The forum has been very helpful in the past, so thanks in advance.
As a side-point, 0.0D+00 will match an xs:double, but not an
xs:decimal, since expontiation is outside of the lexical space
for decimals. So I tweaked it so your sample XML file would
validate the number.