QName validation [message #545223] |
Wed, 07 July 2010 08:59 |
Tsvetan Stoyanov Messages: 10 Registered: July 2009 |
Junior Member |
|
|
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 09:00] Report message to a moderator
|
|
|
|
|
Re: QName validation [message #545385 is a reply to message #545348] |
Wed, 07 July 2010 15:08 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
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
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: QName validation [message #604677 is a reply to message #545348] |
Wed, 07 July 2010 15:08 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
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
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04085 seconds