“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
No comments yet.
Leave a comment
-
Archives
- November 2009 (1)
- September 2009 (1)
- August 2009 (2)
- July 2009 (2)
- June 2009 (1)
- April 2009 (2)
- March 2009 (2)
- February 2009 (1)
- January 2009 (1)
- September 2008 (3)
- August 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS


