XML/schema validation errors

T

The Owner

Hi,

I'm a newbie whereas xml and xml schema are concerned. But I'm puzzeled
by two errors.

First:

cvc-pattern-valid: Value '2009-01-15' is not facet-valid with respect to
pattern '\d{4}-\d{2}-\d{2}' for type 'check_dattim_xmltype'.

Does anybody know WHY this is is the case?

Second:

cvc-maxLength-valid: Value '2009-01-15' with length = '18' is not
facet-valid with respect to maxLength '10' for type 'check_dattim_xmltype'.

Again, does anybody know WHY this (length=18) is the case?

Both errors apply to a (schema) restriction on: type="xs:string".

I've searched the internet but was not able to find an applicable answer
, only that others have run into similar problems.

TIA for any usable answer.
 
M

Martin Honnen

The said:
First:

cvc-pattern-valid: Value '2009-01-15' is not facet-valid with respect to
pattern '\d{4}-\d{2}-\d{2}' for type 'check_dattim_xmltype'.

Does anybody know WHY this is is the case?

Second:

cvc-maxLength-valid: Value '2009-01-15' with length = '18' is not
facet-valid with respect to maxLength '10' for type 'check_dattim_xmltype'.

Again, does anybody know WHY this (length=18) is the case?

Both errors apply to a (schema) restriction on: type="xs:string".

Could there be any whitespace in the element value? Make sure you have e.g.
<date>2009-01-15</date>
and not
<date> 2009-01-15 </date>

Of course I am guessing, you would better show us the relevant XML you
are trying to validate.
 
T

The Owner

Dear Martin,

yes you guessed right. Luckily I found this out by myselkf a little
while ago, and of course it makes perfect sense.

Thanks for your reply anyhow.

Karel de Vries

P.S: Do you mind if I (a XML/XSD newbie) ask (you) some (other) XML/XSD
related questions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top