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

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