Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » problems at pattern facet creation/validation
problems at pattern facet creation/validation [message #602307] Wed, 25 April 2007 05:02
Thomas Paradies is currently offline Thomas Paradies
Messages: 4
Registered: July 2009
Junior Member
Hi,

I've used the wtp xsd schema editor for a long time and was always happy
with it but today I've noticed strange behaviour while editing and
validating a pattern facet:

----

First of all I found relevant differences in validation of regular
expressions between Regular Expression Wizard and XSD Schema Editor.

So what's going wrong?
Suppose I want to define an range of letters using their hex values e.g.
[\x40-\x42]+. Using the Regular Expression Wizard from the properties
view this expression is fine and testable. After finishing I'm going to
validate the schema (context menu in the source editor -> validate).
Then the validator reports the following error:

"InvalidRegex: Pattern value '[\x40-\x42]+' is not a valid regular
expression. The reported error was: 'This expression is not supported in
the current option setting.'."

I know this is reported by Xerces but I've found no way neither to show
nor to control the regex options. Is this a bug or am I doing something
wrong?

----

The second issue I'd noticed appears when I've edited the expression
with the wizard again. The value of the pattern node has changed but
also a value attribute to the type node is added as shown below.

- schema source fragment before editing:

<xsd:simpleType name="XSDSimpleType">
<xsd:restriction base="xsd:string">
<xsd:pattern
value="[0x40-0x42]+"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>

- schema source fragment after editing:

<xsd:simpleType name="XSDSimpleType" value="[\x40-\x43]+">
<xsd:restriction base="xsd:string">
<xsd:pattern
value="[0x40-0x43]+"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>


Seems to be a buggy ...

----

Thomas
Previous Topic:Questions about XSD transformation
Next Topic:problems at pattern facet creation/validation
Goto Forum:
  


Current Time: Wed Apr 16 19:00:03 EDT 2014

Powered by FUDForum. Page generated in 3.66622 seconds