castor
  1. castor
  2. CASTOR-1882

Regression bug for IDREF validation in the context of 'forward references'

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1.1
    • Component/s: XML
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Castor throws a ValidationException for an IDREF value that actually refers to an ID value that is defined later than the IDREF.,

      1. patch.c1882.20070223
        1 kB
        Werner Guttmann
      2. patch.c1882.20070223-002.txt
        3 kB
        Werner Guttmann

        Activity

        Hide
        Werner Guttmann added a comment -

        XML document instance:

        <?xml version="1.0" encoding="UTF-8"?>
        <!--Sample XML file generated by XMLSpy v2006 sp2 U
        (http://www.altova.com)-->
        <partialTermination xmlns="http://www.fpml.org/2003/FpML-4-0"
        xmlns:ns1="http://www.fpml.org/2004/FpML-4-1"
        xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.fpml.org/2003/FpML-4-0
        Z:\MYDOCU~1\PROJEC~1\CURRENT\2007-0~1\TESTIN~1.1\AsymmetricSample_final_
        2.xsd">
        <partyOne id="ID000000">
        <partyId
        partyIdScheme="normalizedString">String</partyId>
        <partyName>String</partyName>
        </partyOne>
        <partyTwo id="ID000001">
        <partyId
        partyIdScheme="normalizedString">String</partyId>
        <partyName>String</partyName>
        </partyTwo>
        <partyThreeHref href="ID000002"/>
        <partialAmount>3.1415926535897932384626433832795</partialAmount>
        <assignmentNotification>
        <partyReference href="ID000001"/>
        <assignmentRole>Transferee</assignmentRole>
        <priorNotification>true</priorNotification>
        <contactName>String</contactName>
        </assignmentNotification>
        <underlyerAdjustment>
        <eventEffectiveDate>2006-05-09</eventEffectiveDate>
        <partyThree id="ID000002">
        <partyId
        partyIdScheme="normalizedString">String</partyId>
        <partyName>String</partyName>
        </partyThree>
        <unwindCashflow href="ID000001"/>
        </underlyerAdjustment>
        </partialTermination>

        Show
        Werner Guttmann added a comment - XML document instance: <?xml version="1.0" encoding="UTF-8"?> <!--Sample XML file generated by XMLSpy v2006 sp2 U ( http://www.altova.com)-- > <partialTermination xmlns="http://www.fpml.org/2003/FpML-4-0" xmlns:ns1="http://www.fpml.org/2004/FpML-4-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.fpml.org/2003/FpML-4-0 Z:\MYDOCU~1\PROJEC~1\CURRENT\2007-0~1\TESTIN~1.1\AsymmetricSample_final_ 2.xsd"> <partyOne id="ID000000"> <partyId partyIdScheme="normalizedString">String</partyId> <partyName>String</partyName> </partyOne> <partyTwo id="ID000001"> <partyId partyIdScheme="normalizedString">String</partyId> <partyName>String</partyName> </partyTwo> <partyThreeHref href="ID000002"/> <partialAmount>3.1415926535897932384626433832795</partialAmount> <assignmentNotification> <partyReference href="ID000001"/> <assignmentRole>Transferee</assignmentRole> <priorNotification>true</priorNotification> <contactName>String</contactName> </assignmentNotification> <underlyerAdjustment> <eventEffectiveDate>2006-05-09</eventEffectiveDate> <partyThree id="ID000002"> <partyId partyIdScheme="normalizedString">String</partyId> <partyName>String</partyName> </partyThree> <unwindCashflow href="ID000001"/> </underlyerAdjustment> </partialTermination>
        Hide
        Werner Guttmann added a comment -

        XML Schema:

        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:ns1="http://www.fpml.org/2004/FpML-4-1"
        xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
        xmlns="http://www.fpml.org/2003/FpML-4-0"
        targetNamespace="http://www.fpml.org/2003/FpML-4-0"
        elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xsd:element name="eventEffectiveDate" type="xsd:date"/>
        <xsd:complexType name="CBMTransactionEvent">
        <xsd:sequence>
        <xsd:element ref="eventEffectiveDate"
        minOccurs="0"/>
        </xsd:sequence>
        </xsd:complexType>
        <xsd:simpleType name="PartyId">
        <xsd:restriction base="xsd:string"/>
        </xsd:simpleType>
        <xsd:element name="partyId">
        <xsd:complexType>
        <xsd:simpleContent>
        <xsd:extension base="PartyId">
        <xsd:attribute
        name="partyIdScheme" type="xsd:normalizedString"/>
        </xsd:extension>
        </xsd:simpleContent>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="partyName" type="xsd:string"/>
        <xsd:complexType name="PartyType">
        <xsd:sequence>
        <xsd:element ref="partyId"/>
        <xsd:element ref="partyName" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="id" type="xsd:ID" use="required"/>
        </xsd:complexType>
        <xsd:element name="partyReference">
        <xsd:complexType>
        <xsd:attribute name="href" type="xsd:IDREF"
        use="required"/>
        </xsd:complexType>
        </xsd:element>
        <xsd:simpleType name="AssignmentRole">
        <xsd:restriction base="xsd:string">
        <xsd:enumeration value="Transferee"/>
        <xsd:enumeration value="Transferor"/>
        <xsd:enumeration value="RemainingParty"/>
        </xsd:restriction>
        </xsd:simpleType>
        <xsd:complexType name="AssignmentNotification">
        <xsd:sequence>
        <xsd:element name="unwindCashflow"
        minOccurs="0">
        <xsd:complexType>
        <xsd:attribute name="href"
        type="xsd:IDREF" use="required"/>
        </xsd:complexType>
        </xsd:element>
        <xsd:element ref="partyReference"/>
        <xsd:element name="assignmentRole"
        type="AssignmentRole"/>
        <xsd:element name="priorNotification"
        type="xsd:boolean"/>
        <xsd:element name="contactName"
        type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="partialTermination">
        <xsd:complexType>
        <xsd:sequence>
        <xsd:element name="partyOne"
        type="PartyType"/>
        <xsd:element name="partyTwo"
        type="PartyType"/>
        <xsd:element name="partyThreeHref"
        minOccurs="0">
        <xsd:complexType>
        <xsd:attribute
        name="href" type="xsd:IDREF" use="required"/>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="partialAmount"
        type="xsd:decimal"/>
        <xsd:element
        name="assignmentNotification" type="AssignmentNotification"
        minOccurs="0" maxOccurs="unbounded"/>
        <xsd:choice>
        <xsd:element
        name="underlyerAdjustment">
        <xsd:complexType>

        <xsd:complexContent>

        <xsd:extension base="CBMTransactionEvent">

        <xsd:sequence>

        <xsd:element name="partyThree" type="PartyType" minOccurs="0"/>

        <xsd:element name="unwindCashflow" minOccurs="0" maxOccurs="unbounded">

        <xsd:complexType>

        <xsd:attribute name="href" type="xsd:IDREF" use="required"/>

        </xsd:complexType>

        </xsd:element>

        </xsd:sequence>

        </xsd:extension>

        </xsd:complexContent>
        </xsd:complexType>
        </xsd:element>
        </xsd:choice>
        </xsd:sequence>
        </xsd:complexType>
        </xsd:element>
        </xsd:schema>

        _____________________________________

        Show
        Werner Guttmann added a comment - XML Schema: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.fpml.org/2004/FpML-4-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.fpml.org/2003/FpML-4-0" targetNamespace="http://www.fpml.org/2003/FpML-4-0" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name="eventEffectiveDate" type="xsd:date"/> <xsd:complexType name="CBMTransactionEvent"> <xsd:sequence> <xsd:element ref="eventEffectiveDate" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <xsd:simpleType name="PartyId"> <xsd:restriction base="xsd:string"/> </xsd:simpleType> <xsd:element name="partyId"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="PartyId"> <xsd:attribute name="partyIdScheme" type="xsd:normalizedString"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <xsd:element name="partyName" type="xsd:string"/> <xsd:complexType name="PartyType"> <xsd:sequence> <xsd:element ref="partyId"/> <xsd:element ref="partyName" minOccurs="0"/> </xsd:sequence> <xsd:attribute name="id" type="xsd:ID" use="required"/> </xsd:complexType> <xsd:element name="partyReference"> <xsd:complexType> <xsd:attribute name="href" type="xsd:IDREF" use="required"/> </xsd:complexType> </xsd:element> <xsd:simpleType name="AssignmentRole"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Transferee"/> <xsd:enumeration value="Transferor"/> <xsd:enumeration value="RemainingParty"/> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="AssignmentNotification"> <xsd:sequence> <xsd:element name="unwindCashflow" minOccurs="0"> <xsd:complexType> <xsd:attribute name="href" type="xsd:IDREF" use="required"/> </xsd:complexType> </xsd:element> <xsd:element ref="partyReference"/> <xsd:element name="assignmentRole" type="AssignmentRole"/> <xsd:element name="priorNotification" type="xsd:boolean"/> <xsd:element name="contactName" type="xsd:string" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <xsd:element name="partialTermination"> <xsd:complexType> <xsd:sequence> <xsd:element name="partyOne" type="PartyType"/> <xsd:element name="partyTwo" type="PartyType"/> <xsd:element name="partyThreeHref" minOccurs="0"> <xsd:complexType> <xsd:attribute name="href" type="xsd:IDREF" use="required"/> </xsd:complexType> </xsd:element> <xsd:element name="partialAmount" type="xsd:decimal"/> <xsd:element name="assignmentNotification" type="AssignmentNotification" minOccurs="0" maxOccurs="unbounded"/> <xsd:choice> <xsd:element name="underlyerAdjustment"> <xsd:complexType> <xsd:complexContent> <xsd:extension base="CBMTransactionEvent"> <xsd:sequence> <xsd:element name="partyThree" type="PartyType" minOccurs="0"/> <xsd:element name="unwindCashflow" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:attribute name="href" type="xsd:IDREF" use="required"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> _____________________________________
        Hide
        Werner Guttmann added a comment -

        Initial patch for review. CTF finishes fine ....

        Show
        Werner Guttmann added a comment - Initial patch for review. CTF finishes fine ....
        Hide
        Werner Guttmann added a comment -

        Final patch for review.

        Show
        Werner Guttmann added a comment - Final patch for review.

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Werner Guttmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 30 minutes
              30m
              Remaining:
              Remaining Estimate - 30 minutes
              30m
              Logged:
              Time Spent - Not Specified
              Not Specified