Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » QName validation
QName validation [message #604662] Wed, 07 July 2010 04:59 Go to next message
Eclipse UserFriend
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 08:53 Go to previous message
Eclipse UserFriend
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: Sat Aug 30 06:39:26 EDT 2025

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

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

Back to the top