Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xslt transformation to list

JuniorLopesJun 3 2013 — edited Feb 26 2020
Hi,

i have a query that returns 4 telephone numbers, and i want to map the result to a list using xsl transform in mediator.

Source
<xs:element name="telefoneDeContato1" type="xs:string/>
<xs:element name="telefoneDeContato2" type="xs:string/>
<xs:element name="telefoneComercial" type="xs:string/>
<xs:element name="telefoneFax" type="xs:string/>

Target

<xs:element name="PhoneContact" type="TelephoneNumber" maxOccurs="unbounded"/>
<xs:complexType name="TelephoneNumber">
<xs:sequence>
<xs:element name="number" type="xs:string"/>
</xs:sequence>
</xs:complexType>

Example:

Source
<telefoneDeContato1>1111111111<telefoneDeContato1/>
<telefoneDeContato2>2222222222<telefoneDeContato2/>
<telefoneComercial>333333333<telefoneComercial/>
<telefoneFax>44444444444<telefoneFax>

Target:
<PhoneContact>
<number>1111111111<number/>
<number>2222222222<number/>
<number>333333333<number/>
<number>44444444444<number/>
<PhoneContact/>

Here is my code, i coul not map this, any help

<xsl:for-each select="/top:VSittelCustomerBaseCollection/top:VSittelCustomerBase">
<CustomerAccount>
<CustomerAccountContact>
<PhoneContact>
<number>
<xsl:value-of select="top:telefoneDeContato1"/>
</number>
</PhoneContact>
</CustomerAccountContact>
</CustomerAccount>
</xsl:for-each>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2013
Added on Jun 3 2013
2 comments
542 views