Note that there are some explanatory texts on larger screens.

plurals
  1. POBizTalk flat file output schema - Test Map gives Output validation error: The element 'Root' has invalid child element 'Record'
    primarykey
    data
    text
    <p>I have a fairly simple flat file schema that just generates CSV, or at least it is supposed to. It has a Root node which is delimited by CRLF, and then a Record node which is delimited by comma, and then the actual fields under that.</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-16" ?&gt; &lt;xs:schema xmlns="http://My.Namespace" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://My.Namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; &lt;xs:annotation&gt; &lt;xs:appinfo&gt; &lt;schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" /&gt; &lt;b:schemaInfo standard="Flat File" codepage="65001" default_pad_char="" pad_char_type="char" count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" root_reference="Root" /&gt; &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt; &lt;xs:element name="Root"&gt; &lt;xs:annotation&gt; &lt;xs:appinfo&gt; &lt;b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="postfix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" /&gt; &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:annotation&gt; &lt;xs:appinfo&gt; &lt;groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" /&gt; &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt; &lt;xs:element name="Record"&gt; &lt;xs:annotation&gt; &lt;xs:appinfo&gt; &lt;b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" /&gt; &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:annotation&gt; &lt;xs:appinfo&gt; &lt;groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" /&gt; &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt; &lt;xs:element minOccurs="0" default="" name="TheFirstField" nillable="true" type="xs:string"&gt; &lt;xs:annotation&gt; &lt;xs:appinfo&gt; &lt;b:fieldInfo justification="left" sequence_number="1" /&gt; &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt; &lt;/xs:element&gt; &lt;!-- And more fields here --&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; &lt;/xs:schema&gt; </code></pre> <p>When I do a Generate Instance on this schema, I get a file that just has commas, which suggests to me that it is at least somewhat set up right for creating CSV. However, when I have this schema as the output type of a map, from an input type of an XML file, and I do a Test Map, I get this:</p> <pre><code>Invoking component... TestMap used the following file: &lt;file:///C:\path\to\test.xml&gt; as input to the map. C:\path\to\output.xml: error btm1046: Output validation error: The element 'Root' in namespace 'http://My.Namespace' has invalid child element 'Record'. Test Map failure for map file &lt;file:///C:\path\to\my\Map.btm&gt;. The output is stored in the following file: &lt;file:///C:\path\to\output.txt&gt; Component invocation succeeded. </code></pre> <p>The output.txt file does not end up getting created.</p> <p>What is the reason for this error when testing the map with a flat file output, and how do I resolve it?</p>
    singulars
    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.
    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