DocumentSpecName usage in the pipeline configuration

A schema can be defined in the ‘DocumentSpecName’-attribute of the pipeline configuration properties (in the dissamble stage).
When no schema is defined and there are multiple schema’s with the same combination for ‘Target Namespace’ (optional) and ‘Root Name’, you ‘ll get following error in the receive pipeline:

There was a failure executing the receive pipeline: “<ReceivePipeline>” Source: “XML disassembler” Receive Port: “<ReceivePortName>” URI: “<URI>\*.xml” Reason: Cannot locate document specification because multiple schemas matched the message type “<TargetNameSpace><RootName>”.

The use of “DocumentSpecName” attribute in the configuration section of the pipelines is there to direct the pipeline to validate the message against a specific schema in the given assembly. The attibute should be filled with the schema full name (‘<schema type>, <schema assembly>’) as shown in below figure. This should solve the above error.

However, the issue becomes more complex when using a schema with multiple root nodes. For this situation you’ll get following error:

There was a failure executing the receive pipeline: “<ReceivePipeline>” Source: “XML disassembler” Receive Port: “<ReceivePort>” URI: “<URI>\*.xml” Reason: No Disassemble stage components can recognize the data .

What BizTalk wants to tell us is that at this stage the well known syntax of “<schema type> ,<schema assembly full name>” in the ‘DocumentSpecName’-attribute is not enough for multipart schemas.

For multipart schemas an additional value is needed in the DocumentSpecName-attribute to fully define the schema. So the above syntax value is not enough, it will direct the pipeline to the desired schema in the assembly, but it doesn’t say which root it should validate against.

The correct syntax in this case is : “<schema type>+<root name> ,<schema assembly full name>”
By adding the root name after the ‘+’ -sign the issue for schemas with multiple root nodes is solved.