XML/schema validation errors

Discussion in 'XML' started by The Owner, Jan 15, 2009.

  1. The Owner

    The Owner Guest

    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.
    The Owner, Jan 15, 2009
    #1
    1. Advertising

  2. The Owner wrote:

    > 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.



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Jan 15, 2009
    #2
    1. Advertising

  3. The Owner

    The Owner Guest

    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?


    Martin Honnen wrote:
    > The Owner wrote:
    >
    >> 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.
    >
    >
    >
    The Owner, Jan 15, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page