locked
xslt Issue in map RRS feed

  • Question

  • Hello iam facing a issue in xslt . xpath is not working.

    for example

    <xsl:variable name="var:v15" select="string(s0:EMPLID/text())" />
      <xsl:variable name="var:v16" select="userCSharp:StringTrimRight($var:v15)" />

    <abc><xsl:value-of select="$var:v16" /></abc> It is returning empty always

    Input

    /*[local-name()='SP_PBJ_CMSResponse' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo']/*[local-name()='StoredProcedureResultSet2' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo']/*[local-name()='StoredProcedureResultSet2' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/ProceduresResultSets/dbo/SP_PBJ_CMS']/*[local-name()='EMPLID' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/ProceduresResultSets/dbo/SP_PBJ_CMS']

    Instance xpath works but it takes one value and map in all.Any help will be appreciated


    anagh

    Thursday, February 4, 2016 1:14 PM

Answers

  • Hi,

    It's not clear what your issue is. Can you provide us some more detail by providing the input XML, the XSLT and your requirement. As alternative you use online XSLT/XPath tools. That is usually what I do. For instance this one or any other you can find.

    Kind Regards,

    Steef-Jan Wiggers (Microsoft Azure MVP)


    BizTalk

    • Proposed as answer by Angie Xu Thursday, February 18, 2016 4:14 AM
    • Marked as answer by Angie Xu Thursday, February 18, 2016 4:14 AM
    Sunday, February 7, 2016 9:31 AM
    Moderator

All replies

  • Hi Anagh,

    Thank you for posting on MSDN forum.

    What you want to achieve here, and if you provide some more details that would be helpful to provide you solution.


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Thursday, February 4, 2016 6:56 PM
    Moderator
  • If I understand your question correctly, you want to map to a series of elements, from a series of elements.
    You will have to use a for-loop and an indexer to accomplish this.

    Thursday, February 4, 2016 7:15 PM
  • Hi Anagh,

    Are you trimming Employee Id ?

    Is there any  specific reason to use XPath here . Anyhow you are getting EMPID in the response message and you can use string trim functoid for this . This wont require you to have employee Id .

    If you have another issue then let us know

    Thanks

    Abhishek


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Thursday, February 4, 2016 8:31 PM
  • Hi,

    It's not clear what your issue is. Can you provide us some more detail by providing the input XML, the XSLT and your requirement. As alternative you use online XSLT/XPath tools. That is usually what I do. For instance this one or any other you can find.

    Kind Regards,

    Steef-Jan Wiggers (Microsoft Azure MVP)


    BizTalk

    • Proposed as answer by Angie Xu Thursday, February 18, 2016 4:14 AM
    • Marked as answer by Angie Xu Thursday, February 18, 2016 4:14 AM
    Sunday, February 7, 2016 9:31 AM
    Moderator