Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 StoyanovFriend
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?
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 MerksFriend
Messages: 33113
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?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Missing element in XML editor autocompletion
Next Topic:QName validation
Goto Forum:
  


Current Time: Thu Mar 28 16:24:52 GMT 2024

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

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

Back to the top