Using EXSLT in BizTalk
we need to create a xml that has EXSLT assembly like for example below
<?xml version="1.0" encoding="utf-8"?>
<ExtensionObjects>
<ExtensionObject
Namespace="http://exslt.org/dates-and-times"
AssemblyName="Mvp.Xml,
Version=2.3.0.0, Culture=neutral,
PublicKeyToken=6ead800d778c9b9f"
ClassName="Mvp.Xml.Exslt.ExsltDatesAndTimes"/>
</ExtensionObjects>
and now if you want to you EXSLT date funtion in your custom xslt, then mention like below
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:S1="http://ExtendedMapping.Schema1"
xmlns:S2="http://ExtendedMapping.Schema2"
xmlns:exslt="http://exslt.org/dates-and-times"
version="1.0">
<xsl:template match="/">
<S2:Root>
<Field>
<xsl:value-of select="exslt:dateTime()"/>
</Field>
</S2:Root>
</xsl:template>
</xsl:stylesheet>
And to loop through each distict node (faster grouping) in fast way,
you can use Distinct() function of EXSLT like below
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:set="http://exslt.org/sets">
<xsl:output indent="yes"/>
<xsl:key name="countryKey" match="orders" use="ID"/>
<xsl:template match="root">
<table border="1">
<tr>
<th>Order ID</th>
<th>Ship City</th>
</tr>
<xsl:for-each select="set:distinct(orders/ID)/..">
<tr>
<th colspan="2">
<xsl:value-of select="ID/text()"/>
</th>
</tr>
<xsl:for-each select="key('countryKey',ID)">
<tr>
<td>
<xsl:value-of select="@OrderID"/>
</td>
<td>
<xsl:value-of select="@ShipCity"/>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
and don’t forget to read below URLs
http://www.richardhallgren.com/how-the-extend-a-custom-xslt-in-biztalk-using-exslt-and-the-mvpxml-project/
http://msdn.microsoft.com/en-us/library/aa302297.aspx#xmlindexing_topic3
Advertisement
No comments yet.
Leave a Reply
-
Recent
- Using EXSLT in BizTalk
- For loop in xslt
- Reset Outlook Connection
- Validate incoming message in xml default pipeline
- Biztalk orchestration patterns
- Grouping in xslt
- why do we need to call pipeline from orchestration and how do we do it?
- BizTalk Aggregation Pattern for Large Batches
- Get Uniques values from a list through XSLT
- Virtual PC console not showing up
- Directly querying the BizTalk database for suspended messages
- Project Reference Errors in BizTalk
-
Links
-
Archives
- January 2012 (2)
- November 2011 (1)
- July 2011 (3)
- June 2011 (12)
- May 2011 (1)
- April 2011 (1)
- March 2011 (1)
- November 2010 (1)
- October 2010 (10)
- September 2010 (7)
- July 2010 (1)
- June 2010 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS