On 20 July 2010 02:40, Dan Sommers <d...@tombstonezero.net> wrote: > Given this schema file, t.xsd: > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <xs:element name="t" type="xs:double"/> > </xs:schema> > > And this xml document, t.xml: > > <t>e</t> > > I got this: > > $ xmllint --schema t.xsd t.xml > <?xml version="1.0"?> > <t>e</t> > t.xml validates > > Note that <t>.</t> and <t>.e</t> also validate. > > I tracked it down to xmlschematypes.c, starting around line 2465, where > it starts scanning the input for something suitable for sscanf("%lf"). > Should that code contain an extra check that there is at least one digit > somewhere? I think it comes down to the definition of "decimal" in the > spec¹; the lexical representation arguably allows for such degenerates, > although the canonical representation does not. > > So, is this a bug? I couldn't find a bug or any previous discussion one > way or the other. If it is a bug, is it in xmlschematypes.c or in the > underlying sscanf implementations? I get the same results at work > (OpenSolaris) and at home (Debian). > > Regards, > Dan > > ¹ http://www.w3.org/TR/xmlschema-2/#decimal
http://www.w3.org/TR/xmlschema-2/#double, not decimal. As 'e' is an optional part of a double, can you try a different value. Something like 'FooBar'. Anything really. _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml