Hi.  I have a question about the "insert-as-first-into" and
"insert-as-last-into" Xpath extensions.
 
I get a selectionFailure if I try to insert a child into a parent that
does not yet contain other children.  I'm wondering if this was done on
purpose for some reason, or if this is a bug.
 
As an example, say I have the following elements/types:
 
   <element name="RecordSet" type="tns:RecordSetType"/> 
    <complexType name="RecordSetType">
        <sequence>
            <element maxOccurs="unbounded" minOccurs="0"
ref="tns:Record"/>
        </sequence>
    </complexType>
    
    <element name="Record" type="tns:RecordType"/>
     <complexType name="RecordType">
        <sequence>
            <element maxOccurs="1" minOccurs="1" name="SomeValue"
type="string"/>
            <element maxOccurs="1" minOccurs="1" name="AnotherValue"
type="string"/>
        </sequence>
    </complexType>
 
So RecordSet can contain 0 or more Records.  If I try to insert a Record
into an empty RecordSet (0 Records) I get a selectionFailure.  I have to
initialize the RecordSet variable with at least one dummy Record before
it will work.
 
Comments?
 
Thanks.
-Jon

Reply via email to