Hi all

So, first I had a post about
promoting reoccurring elements where I discussed 4 options for promoting an element
that can occur multiple times in the input. Then I had a post about
how you can pseudo do it in BizTalk 2000/2002.

This post is about two things:

  1. Another way of doing it that doesn’t work
  2. Writing the custom pipeline component that was my second suggestion in my first
    post
    .

First issue

As discussed in my first
post
, if you change the XPath of the promoted property in the schema (either by
clicking the ellipsis as I wrote about or manually editing the XSD) to add the “[1]”,
you get this compilation error:

Node "ElementWhereNumber1IsPromoted" – The promoted property field or one
of its parents has Max Occurs greater than 1. Only nodes that are guaranteed to be
unique can be promoted as property fields.

But, since I couldn’t get the “[1]” to work in BizTalk 2000/2002 when editing my second
post
I used the position function instead. So i started wondering if that might
work in BizTalk 2006 R2. It doesn’t, though. It compiles just fine, and I really had
my hopes up, but at runtime you get this error:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Source: "XML disassembler" Receive Port: "ReceivePort3" URI: "C:\Projects\Blog
Entries\PrommotingReoccurringElementsEditXSD\Instances\In\*.xml" Reason: Unexpected
XPath format:

So i had to drop that idea again.

Second issue

I decided to write the custom pipeline component that I discussed in my first
post
.

The main code is easy – just three properties:

  1. Name of the property
  2. Namespace of the property
  3. XPath

You can download it at http://eebiztalkpipelinecom.codeplex.com/ where
I have just made my initial release.



eliasen