Biz(Talk)2

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 Brett | Uncategorized | | No Comments Yet

No comments yet.

Leave a comment