Note that there are some explanatory texts on larger screens.

plurals
  1. POBizTalk Looping Functoid
    primarykey
    data
    text
    <p>I have a structured XML file format that needs to be mapped to a flatter XML format. Ordinarily I would create a custom XSLT file for this and have the BizTalk map use it. However, I do like the idea of using the graphical maps where possible - it's all too easy to dive straight into XSLT but not so easy for those following you to quickly understand what the map's doing!</p> <p>I suspect that the mapping could be acheived using the table looping function and table extractor functoid but I've tried for a couple of hours and failed :(</p> <p>Note: I have no control over the source XSD - this comes from a third party. Here it is:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt; &lt;xs:element name="VehicleTrips"&gt; &lt;xs:annotation&gt; &lt;xs:documentation&gt;Comment describing your root element&lt;/xs:documentation&gt; &lt;/xs:annotation&gt; &lt;xs:complexType&gt; &lt;xs:sequence maxOccurs="unbounded"&gt; &lt;xs:element name="Vehicle"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="VehicleID"/&gt; &lt;xs:element name="VehicleRegistration"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="Trips"&gt; &lt;xs:complexType&gt; &lt;xs:sequence maxOccurs="unbounded"&gt; &lt;xs:element name="VehicleId"/&gt; &lt;xs:element name="Distance"/&gt; &lt;xs:element name="Duration"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; </code></pre> <p></p> <p>...and here's the target XSD:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt; &lt;xs:element name="Trips"&gt; &lt;xs:annotation&gt; &lt;xs:documentation&gt;Comment describing your root element&lt;/xs:documentation&gt; &lt;/xs:annotation&gt; &lt;xs:complexType&gt; &lt;xs:sequence maxOccurs="unbounded"&gt; &lt;xs:element name="VehicleRegistration"/&gt; &lt;xs:element name="Distance"/&gt; &lt;xs:element name="Duration"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; </code></pre> <p></p> <p>To summarise, I need to look into Trips, grab the VehicleRegistration from Vehicle, keyed on VehicleId and copy the data across to the target schema.</p> <p>Does anyone know whether / how this could be achieved using only functoids (or perhaps a little script in a scripting functoid)?</p> <p>Many thanks, Rob.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload