W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

Re: regular expression in XML Schema

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 26 Sep 2003 08:57:15 +0100
Message-ID: <162564777797.20030926085715@jenitennison.com>
To: Hans Teijgeler <hans.teijgeler@quicknet.nl>
Cc: xmlschema-dev@w3.org

Hi Hans,

> The error message after validation is then:
>
> This file is not valid
> Invalid value for datatype Name in attribute 'identifier'
>
> Question is: where are things going wrong? I hope you can help me out.

I don't think that there's anything wrong with your XML document or
schema. MSXML4 didn't report any errors. Xerces (wrongly, I think)
objected to the unescaped hyphen (-) in the regular expression, but
after that was escaped it didn't report any errors with the document.

Interestingly, the problem in XML Spy seems to be arising because of
the use of the xs:Name type. If you derive the xyz type from xs:string
instead of xs:Name then XML Spy doesn't complain. If you say that the
type of the abc attribute is xs:Name (rather than xyz) then XML Spy
complains. XML Spy also complains if you have an XML document in which
an element name contains the MIDDLE DOT character.

I think that this is a bug in XML Spy. The XML Recommendation clearly
states that NameChar includes Extender characters, which includes
MIDDLE DOT #x00B7. I suggest that you report this bug to them.

(In general, unless the only tool that's ever going to be used with
the schema is XML Spy, it's a good idea to use either MSXML4 or Xerces
to test your XML Schema work instead -- neither of them are absolutely
perfect, but their XML Schema conformance is a lot higher than XML
Spy's at the moment.)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Friday, 26 September 2003 04:02:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT