Project

Profile

Help

Bug #1493

closed

XSD Error message for invalid Name refers to NCName instead

Added by Priscilla Walmsley almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2012-04-24
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

When an invalid value is supplied for an element of type xs:Name, the error message says "not a valid xs:NCName" instead of "not a valid xs:Name".

Schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="root" type="xs:Name"/>

</xs:schema>

Instance:

<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="newsch3.xsd">-myelement

Error Message:

Validation error at /root[1] on line 2 column 63 of EX83a_1.xml:

The content "-myelement" of element does not match the required simple type. The

value '-myelement' is not a valid xs:NCName (See

http://www.w3.org/TR/xmlschema11-2/#cvc-datatype-valid clause 1)

Actions #1

Updated by Michael Kay almost 12 years ago

  • Category set to Diagnostics
  • Status changed from New to In Progress
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal

Accepted as a bug. The code actually works by replacing any ':' in the alleged xs:Name by an underscore, then testing whether the result is a valid xs:NCName; and it fails to amend the error message if it is not.

Actions #2

Updated by Michael Kay almost 12 years ago

  • Status changed from In Progress to Resolved

Patch committed on the 9.4 and development branches.

Actions #3

Updated by Michael Kay almost 12 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.4.0.4

Please register to edit this issue

Also available in: Atom PDF