QName validation [message #545223] |
Wed, 07 July 2010 04:59  |
Eclipse User |
|
|
|
Hi all,
I noticed that the literal values of QName attributes are not validated.
Here's an example:
In one schema:
<simpleType name="My;SimpleType" .../>
In another schema:
<element name="e1" type="sch1:My;SimpleType"/>
Notice that the value of the name and type attributes is not correct - it contains ;.
As expected the validation of the first schema fails because of the incorrect value, but the second schema validation is OK - even if the type attribute value is incorrect the type itself is resolved.
Is this an expected behavior? Shouldn't be the literal attribute value the one that must be validated first?
[Updated on: Wed, 07 July 2010 05:00] by Moderator
|
|
|
|
|
Re: QName validation [message #545385 is a reply to message #545348] |
Wed, 07 July 2010 11:08  |
Eclipse User |
|
|
|
Tsvetan,
What does Xerces do in this situation? I suppose we should try to do
much the same thing.
Tsvetan Stoyanov wrote:
> Hi Ed,
>
> I think these are two errors - one for the definition and one for the
> usage. And hiding (skipping) the usage error makes the whole schema
> valid, which in actually not true.
> In a hypothetic UI editor, the second schema will look as valid since
> the type is resolved and no validation errors are reported, but
> actually the attribute value remains invalid in respect to its schema.
>
> Best Regards,
> Tsvetan
|
|
|
Re: QName validation [message #604673 is a reply to message #545324] |
Wed, 07 July 2010 09:41  |
Eclipse User |
|
|
|
Hi Ed,
I think these are two errors - one for the definition and one for the usage. And hiding (skipping) the usage error makes the whole schema valid, which in actually not true.
In a hypothetic UI editor, the second schema will look as valid since the type is resolved and no validation errors are reported, but actually the attribute value remains invalid in respect to its schema.
Best Regards,
Tsvetan
|
|
|
Re: QName validation [message #604677 is a reply to message #545348] |
Wed, 07 July 2010 11:08  |
Eclipse User |
|
|
|
Tsvetan,
What does Xerces do in this situation? I suppose we should try to do
much the same thing.
Tsvetan Stoyanov wrote:
> Hi Ed,
>
> I think these are two errors - one for the definition and one for the
> usage. And hiding (skipping) the usage error makes the whole schema
> valid, which in actually not true.
> In a hypothetic UI editor, the second schema will look as valid since
> the type is resolved and no validation errors are reported, but
> actually the attribute value remains invalid in respect to its schema.
>
> Best Regards,
> Tsvetan
|
|
|
Powered by
FUDForum. Page generated in 0.03780 seconds