Archive for July 29th, 2008
xsl to find a specific string in the element
I have a xml sample file generated from the schema.
<ns0:PurchaseOrder xmlns:ns0=”http://yourprojectname.Schemas.PO”>
<PONumber>PONumber_0</PONumber>
<PODate>1999-05-31</PODate>
<POQty>POQty_0</POQty>
<Customer>
<Name1>BiztalkServerGuide</Name1>
</Customer>
</ns0:PurchaseOrder>
now, in order to find a specific string in the element , you need to place the below code in the buffer are of the inline XSLT call template
<xsl:template name=”AnyNameofYourChoice” match=”//*[contains(/*[local-name()='PurchaseOrder' and namespace-uri()='http://yourprojectname.Schemas.PO']/*[local-name()='Customer' and namespace-uri()='']/*[local-name()='Name1' and namespace-uri()=''], ‘BizTalkServer‘)]”>
<xsl:element name=”containsBiztalkServerGuide”>
“Contains BiztalkServer String”
</xsl:element>
</xsl:template>
Thanks
Posted: July 29th, 2008 under BizTalk.
Tags: BizTalk, call template, mapper, xslt
Comments: none