Map: Creating repeating records in destination document
hi all,
i need create repeating nodes in destination document non repeating nodes in de source document.
following (simplified) schema definition source document.
<?xml version="1.0" encoding="utf-16"?> |
<xs:schema xmlns:b="http://schemas.microsoft.com/biztalk/2003" xmlns="http://test.test" targetnamespace="http://test.test" xmlns:xs="http://www.w3.org/2001/xmlschema"> |
<xs:element name="root"> |
<xs:complextype> |
<xs:sequence> |
<xs:element name="field1" type="xs:string" /> |
<xs:element name="field2" type="xs:string" /> |
<xs:element name="record"> |
<xs:complextype> |
<xs:sequence> |
<xs:element name="field1" type="xs:string" /> |
<xs:element name="field2" type="xs:boolean" /> |
</xs:sequence> |
</xs:complextype> |
</xs:element> |
</xs:sequence> |
</xs:complextype> |
</xs:element> |
</xs:schema> |
here definition of destination schema:
<?xml version="1.0" encoding="utf-16"?> |
<xs:schema xmlns:b="http://schemas.microsoft.com/biztalk/2003" xmlns="http://test.test" targetnamespace="http://test.test" xmlns:xs="http://www.w3.org/2001/xmlschema"> |
<xs:element name="root"> |
<xs:complextype> |
<xs:sequence> |
<xs:element name="field1" type="xs:string" /> |
<xs:element minoccurs="0" maxoccurs="unbounded" name="destinationrecord"> |
<xs:complextype> |
<xs:sequence> |
<xs:element name="field1" type="xs:string" /> |
<xs:element name="field2" type="xs:string" /> |
</xs:sequence> |
</xs:complextype> |
</xs:element> |
</xs:sequence> |
</xs:complextype> |
</xs:element> |
</xs:schema> |
i need create 'destinationrecord' in the destination document 'record'. when 'field2' in 'record' has value of 'true', need create another 'destinationrecord' in destination document.
each 'destinationrecord' must contain sequence number defining the 'destinationrecord's index; first 'destinationrecord' has sequencenumber '001', second '002' etc.
what best approach this, xslt call-template scripting functoid?
regards,
rené
hi rené,
try link 'field2' in 'record' in source schema 'destinationrecord' in destination schema.
just note:
your source , target schemas have same messagetypes (targetnamespace_name+root_name). have change 1 of them.
leonid ganeline [biztalk mvp] http://geekswithblogs.net/leonidganeline
try link 'field2' in 'record' in source schema 'destinationrecord' in destination schema.
just note:
your source , target schemas have same messagetypes (targetnamespace_name+root_name). have change 1 of them.
leonid ganeline [biztalk mvp] http://geekswithblogs.net/leonidganeline
BizTalk Server > BizTalk Server General
Comments
Post a Comment