Main menu:

 

January 2009
M T W T F S S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031  

Site search

Archives

Categories

Tags

Links:

Tag: xsl

xsl to find whether a string starts with a word 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=”//*[starts-with(/*[local-name()='PurchaseOrder' and namespace-uri()='http://yourprojectname.Schemas.PO']/*[local-name()='Customer' and namespace-uri()='']/*[local-name()='Name1' and namespace-uri()=''], ‘Biz‘)]”>
<xsl:element name=”startsWithBiz”>
“starts with Biz”
</xsl:element>
</xsl:template>
Thanks

xsl:template’ cannot be a child of the ‘xsl:template’ element

when you try to add a <xsl:template> element within a <xsl:template> element
<xsl:template>
<xsl:template>
</xsl:template>
</xsl:template>
and try to test the biztalk map, the compiler will throw an error stating xsl:template’ cannot be a child of the ‘xsl:template’ element.