Talk, talk and more talk about BizTalk

“Filtering” a document

Just a quick lesson learnt from a recent project, as I know I’m going to need to do this again.

Filtering down an Xml document in a map based on the existance or value of an element or attribute.  For example, say we want to return a copy of a existing document, but only where the optional Status field has a value:

  • Use a map with a Scripting Functoid, using Inline XSLT
  • Use the Xslt copy-of function to make a copy of the source based on a critera selection:
    <xsl:copy-of select="/*[local-name()='RootNodeName']/*[local-name()='Summary'][*[local-name()='Header']/@Status='Active']" />
  • Wire the output of the functoid to the relevant element on the destination schema

January 7, 2009 - Posted by | Uncategorized

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: