Tuscany
  1. Tuscany
  2. TUSCANY-1835

XSDHelper.getAppinfo() returns wrong result

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Java-SDO-1.0
    • Fix Version/s: Java-SDO-Next
    • Labels:
      None
    • Environment:
      WinXP

      Description

      According to SDO 2.1 spec section 3.13 (The getAppinfo() methods return the XML, starting from the specified source element.). This means if we have an annotation defined like below.

      <xsd:annotation>
      <xsd:appinfo source="appinfosrc">
      <simple:stockQuote xmlns:simple="http://www.example.com/simple">
      <symbol>fbnt</symbol>
      </simple:stockQuote>
      </xsd:appinfo>
      </xsd:annotation>

      XSDHelper.getAppinfo() should return

      <xsd:appinfo source="appinfosrc">
      <simple:stockQuote xmlns:simple="http://www.example.com/simple">
      <symbol>fbnt</symbol>
      </simple:stockQuote>
      </xsd:appinfo>

      Now it's returning the wrong result like below.

      <simple:stockQuote xmlns:simple="http://www.example.com/simple">
      <symbol>fbnt</symbol>
      </simple:stockQuote>

      1. 1835.patch
        5 kB
        Fuhwei Lwo

        Activity

        Fuhwei Lwo created issue -
        Hide
        Fuhwei Lwo added a comment -

        It seems EMF ecore model didn't keep the original <appinfo> elements from XSD and there is no way of querying the prefix of appinfo namespace. So the best solution I can come up with is to hard code the prefix to "xsd". I will provide a patch shortly. Please let me know whether it's acceptable.

        Show
        Fuhwei Lwo added a comment - It seems EMF ecore model didn't keep the original <appinfo> elements from XSD and there is no way of querying the prefix of appinfo namespace. So the best solution I can come up with is to hard code the prefix to "xsd". I will provide a patch shortly. Please let me know whether it's acceptable.
        Fuhwei Lwo made changes -
        Field Original Value New Value
        Description According to SDO 2.1 spec section 3.13 (*The getAppinfo() methods return the XML, starting from the specified source element.*). This means if we have an annotation defined like below.

        {noformat}
        <xsd:annotation>
        <xsd:appinfo source="appinfosrc">
        <simple:stockQuote xmlns:simple="http://www.example.com/simple">
        <symbol>fbnt</symbol>
        </simple:stockQuote>
             </xsd:appinfo>
        </xsd:annotation>
        {noformat}

        XSDHelper.getAppinfo() should return
        {noformat}
        <xsd:appinfo source="appinfosrc">
        <simple:stockQuote xmlns:simple="http://www.example.com/simple">
        <symbol>fbnt</symbol>
        </simple:stockQuote>
        </xsd:appinfo>
        {noformat}

        Now it's returning the wrong result like below.
        {noformat}
        <simple:stockQuote xmlns:simple="http://www.example.com/simple">
        <symbol>fbnt</symbol>
        </simple:stockQuote>
        {noformat}
        According to SDO 2.1 spec section 3.13 (The getAppinfo() methods return the XML, starting from the specified source element.). This means if we have an annotation defined like below.

        <xsd:annotation>
        <xsd:appinfo source="appinfosrc">
        <simple:stockQuote xmlns:simple="http://www.example.com/simple">
        <symbol>fbnt</symbol>
        </simple:stockQuote>
             </xsd:appinfo>
        </xsd:annotation>

        XSDHelper.getAppinfo() should return

        <xsd:appinfo source="appinfosrc">
        <simple:stockQuote xmlns:simple="http://www.example.com/simple">
        <symbol>fbnt</symbol>
        </simple:stockQuote>
        </xsd:appinfo>

        Now it's returning the wrong result like below.

        <simple:stockQuote xmlns:simple="http://www.example.com/simple">
        <symbol>fbnt</symbol>
        </simple:stockQuote>
        Fuhwei Lwo made changes -
        Attachment 1835.patch [ 12367153 ]
        ant elder made changes -
        Fix Version/s Java-SDO-Next [ 12312262 ]
        Hide
        Amita Vadhavkar added a comment -

        Please give more details,what constraints apply, what investigation led to conclusion about "appinfo". Thanks

        Show
        Amita Vadhavkar added a comment - Please give more details,what constraints apply, what investigation led to conclusion about "appinfo". Thanks

          People

          • Assignee:
            Fuhwei Lwo
            Reporter:
            Fuhwei Lwo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development