You have, essentially, a 2-dimensional array. Predicates can be nested.
>
> Nobody can help me? I think it should be a way to iterate
> sequentially over
> all the nodes in the file. BPEL SE has to be able to perform this
> operation,
> but I can't figure out how.
>
> I would appreciate your help.
>
> Thanks,
> Gabriel.
>
>
>
> fozon wrote:
>>
>> Hello,
>>
>> I have a question. I am dealing with a xsd that looks like the
>> following
>> one:
>>
>>
http://n2.nabble.com/file/n3945691/crazyXSD.png>>
>> The code is the following one:
>>
>>
>> <xsd:complexType name="crazyType">
>> <xsd:sequence maxOccurs="unbounded">
>> <xsd:element name="rootElement">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="realChild"
>> type="tns:normalType"/>
>> </xsd:sequence>
>> <xsd:attribute name="rootElementAttribute"
>> type="xsd:string"/>
>> </xsd:complexType>
>> </xsd:element>
>> <xsd:sequence maxOccurs="unbounded">
>> <xsd:element name="child1Element" type="xsd:string"/>
>> <xsd:element name="child2Element" type="xsd:string"/>
>> <xsd:element name="child3Element" type="xsd:string"/>
>> </xsd:sequence>
>> </xsd:sequence>
>> </xsd:complexType>
>> <xsd:complexType name="normalType">
>> <xsd:sequence>
>> <xsd:element name="normalChild1" type="xsd:string"/>
>> <xsd:element name="normalChild2" type="xsd:string"/>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>>
>> Here you can see that the sequence of
>> SEQ={{child1element,child2element,child3element}*} is an unbounded
>> sequence. This sequence is contained with another sequence in the
>> crazyElement. outerSEQ={{rootElement,SEQ}*}
>>
>> The problem now is how to read every node relating every "child?
>> Element"
>> with its corresponding "rootElement".
>>
>> You can obtain the count of the "rootElement" and iterate over
>> them. You
>> can also obtain the count of the "child1element" and iterate over
>> them.
>> This is a global count refering to the whole file, but you can not
>> access
>> to the "child1Element" elements related to one specific
>> "rootElement".
>>
>> I think this could be solved changing the xsd to the following one:
>>
>>
http://n2.nabble.com/file/n3945691/reliableXSD.png>>
>> whose code is the following one.
>>
>> <xsd:complexType name="reliableType">
>> <xsd:sequence maxOccurs="unbounded">
>> <xsd:element name="rootElement">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="realChild"
>> type="tns:normalType"/>
>> <xsd:element name="repeatedType"
>> type="tns:containerType" maxOccurs="unbounded"/>
>> </xsd:sequence>
>> <xsd:attribute name="rootElementAttribute"
>> type="xsd:string"/>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:sequence>
>> </xsd:complexType>
>> <xsd:complexType name="containerType">
>> <xsd:sequence>
>> <xsd:element name="child1Element"
>> type="xsd:string"></xsd:element>
>> <xsd:element name="child2Element" type="xsd:string"/>
>> <xsd:element name="child3Element" type="xsd:string"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> <xsd:complexType name="normalType">
>> <xsd:sequence>
>> <xsd:element name="normalChild1" type="xsd:string"/>
>> <xsd:element name="normalChild2" type="xsd:string"/>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>>
>> I provide you an example that shows the difficulty to parser one
>> file with
>> the first format and write it in a file with the second one. Just
>> run the
>> attachment and you will see that if the number of "child?Element"
>> under
>> every "rootElement" is not the same, there is a difficulty to
>> fulfill the
>> transformation.
>>
>> I also tried to do the xsl transformation with the file included in
>> the
>> NetBeans project, but xsl is not my best and I was unsuccessful.
>>
>>
>>
>> Thanks you for reading such a long mail,
>> Gabriel.
>>
>
> --
> View this message in context:
http://n2.nabble.com/Iterating-over-XML-elements-tp2444824p3972077.html> Sent from the OpenESB Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
[hidden email]
> For additional commands, e-mail:
[hidden email]
>