Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » QName validation
QName validation [message #604662] Wed, 07 July 2010 08:59 Go to next message
Tsvetan Stoyanov is currently offline Tsvetan Stoyanov
Messages: 9
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?
Re: QName validation [message #604668 is a reply to message #604662] Wed, 07 July 2010 12:53 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26054
Registered: July 2009
Senior Member
I'm not sure what's to be gained from repeating that error on each use?
A single error at the point of definition would seem more useful;
resolving the name properly regardless of the ill formed nature of its
characters helps with fixing such an error...


Tsvetan Stoyanov wrote:
> 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?
>
Previous Topic:Missing element in XML editor autocompletion
Next Topic:QName validation
Goto Forum:
  


Current Time: Sun Sep 21 08:16:44 GMT 2014

Powered by FUDForum. Page generated in 0.05847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software