Re: regular expression in XML Schema

Dear Jeni,

Thanks again!

Rephrasing my question about how to fill in such an identifier in a Spy-made XML
document,
I have a last question: Assume that I want to make a query and I have to fill in
such an identifier
(or any string, for that matter) in which there is a middle dot (or any other
allowable Unicode
character), what then should I do, since there are no keys on my (US) keyboard
with such characters?

Regards,
Hans

===========================

Jeni Tennison wrote:

> 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:34:13 UTC