castor
  1. castor
  2. CASTOR-2228

wrong charset bad regular expression

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 1.1.2.1
    • Fix Version/s: None
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Eclipse 3.2.2
      Castor 1.1.2.1
      Java 1.4.2_14
    • Testcase included:
      yes
    • Number of attachments :
      2

      Description

      have an Xsd where some field restriction is based on regular expression that uses special character such as "([-a-zA-Z\- '])*"

      In this case in package descriptors the objectDescriptors contain the next line

      typeValidator.addPattern("([À-ža-zA-Z\\- '])*");

      where the pattern is not the same.

      What I wrong?

      Thank's in advance

      In the attached file there are two sample.
      The ant castor_xml_saia_build.1.1.xml contains two targets: GeneratorTestCastor and GeneratorRichiesta
      The first is a small sample
      The second is a complex sample that has another problem. With the version 0.9.5.4 the generated class was compilable but with that new version none.
      With the old version there where problem with collision but source code was complilable.
      Thank's in advance

        Activity

        Hide
        Werner Guttmann added a comment -

        So what is the current understanding of this issue ? It is a genuine bug ?

        Show
        Werner Guttmann added a comment - So what is the current understanding of this issue ? It is a genuine bug ?
        Hide
        Raffaele Fabbri added a comment -

        I think it is a genuinie bug but at this time I'am not be able to find the right fix. Can somebody help me?

        Thank's in advance

        Show
        Raffaele Fabbri added a comment - I think it is a genuinie bug but at this time I'am not be able to find the right fix. Can somebody help me? Thank's in advance
        Hide
        Edward Kuns added a comment -

        I still need to do some research to understand more fully the interaction of locales and input streams and parsers, but I am still looking into this.

        Show
        Edward Kuns added a comment - I still need to do some research to understand more fully the interaction of locales and input streams and parsers, but I am still looking into this.
        Hide
        Edward Kuns added a comment -

        If you add the following line

        source.setEncoding("UTF-8");

        to both places in the source file that make "new InputSource()", does that help the import problem? If I do this, the CTF master test suite runs successfully.

        Show
        Edward Kuns added a comment - If you add the following line source.setEncoding("UTF-8"); to both places in the source file that make "new InputSource()", does that help the import problem? If I do this, the CTF master test suite runs successfully.
        Hide
        Raffaele Fabbri added a comment -

        I add the line in all places in the source file "SourceGernerator.java" but when I try to run this utility with the sample that include tipi.xsd the generated regular expression is wrong.
        Please send me your modified source?
        Thanks in advance

        Show
        Raffaele Fabbri added a comment - I add the line in all places in the source file "SourceGernerator.java" but when I try to run this utility with the sample that include tipi.xsd the generated regular expression is wrong. Please send me your modified source? Thanks in advance

          People

          • Assignee:
            Unassigned
            Reporter:
            Raffaele Fabbri
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 3 days
              3d
              Remaining:
              Remaining Estimate - 3 days
              3d
              Logged:
              Time Spent - Not Specified
              Not Specified