Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7591345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:37:46+00:00 2026-05-30T20:37:46+00:00

<xsl:value-of select=substring-before($temp1,’;’) disable-output-escaping=yes/> where temp1=fassdf sdf; asdf &amp;dfsdfsdf;fsdfsf; The above code I am using

  • 0
<xsl:value-of select="substring-before($temp1,';')" disable-output-escaping="yes"/>

where temp1="fassdf sdf; asdf &amp;dfsdfsdf;fsdfsf;"

The above code I am using to split value using “;”. The problem is temp1 having &amp;, so it splits this value by the escaped sequence character ;. So i am getting wrong output. But if I use the disable-output-escaping="yes" then the "&amp;" is converted to &.

How to get the formatted value from the string? So if i split the string i will not get any issue. Because I will get string with & instead of &amp;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:37:47+00:00Added an answer on May 30, 2026 at 8:37 pm

    Lets assume a sample XML for your/our convenience ..

    <?xml version="1.0" encoding="utf-8"?>
    <root>
      <child>sharepoint; R&amp;D;Department;</child>
    </root>
    

    XSLT code to output the desired one:

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
    >
      <xsl:output method="text" indent="no"/>
      <xsl:strip-space elements="*"/>
    
      <xsl:template match="/">
        <xsl:apply-templates select="node()"/>
      </xsl:template>
    
      <xsl:template match="child">
        <xsl:call-template name="SplitString">
          <xsl:with-param name="StringVal" select="concat(.,';')"/>
        </xsl:call-template>
      </xsl:template>
    
      <xsl:template name="SplitString">
        <xsl:param name="StringVal"/>
        <xsl:variable name="first" select="substring-before($StringVal, ';')" />
        <xsl:variable name="remaining" select="substring-after($StringVal, ';')" />
    
        <xsl:value-of select="normalize-space($first)" disable-output-escaping="yes" />
    
        <xsl:if test="$remaining">
          <xsl:value-of select="'&#10;'"/>
          <xsl:call-template name="SplitString">
            <xsl:with-param name="StringVal" select="$remaining" />
          </xsl:call-template>
    
        </xsl:if>
      </xsl:template>
    
    </xsl:stylesheet>
    

    This is the Output you get:

    sharepoint
    R&D
    Department
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataFormWebPart rendering: <th class=MenuItem> <xsl:attribute name=onclick >window.location=<xsl:value-of select=substring-before(@URL, ', ') ></xsl:value-of></xsl:attribute>
I'm trying to order items based on an attribute value: <xsl:apply-templates select=Question> <xsl:sort order=ascending
I think I may have a misunderstanding of <xsl:variable\> and <xsl:value-of\> so perhaps someone
I need to get the value of the 'test' attribute in the xsl:when tag,
I'm passing in a bunch of key-value pairs as parameters to a XSL (date
Given an XSL 'If' statement: <xsl:if test=a = 'some value' and b = 'another
I tried searching for my issue on here and was unsuccessful. <xsl:for-each select=$all_events[g:active =
The following works for me: <xsl:variable name=core select=document('CoreMain_v1.4.0.xsd') /> <xsl:variable name=AcRec select=document('AcademicRecord_v1.3.0.xsd') /> <xsl:template
I have the input <Date value=20091223/> and I want the output to be <Date>23122009</Date>
My attempt: <xsl:template name=GetDisplay> <xsl:param name=input/> <xsl:text>|</xsl:text> <xsl:call-template name=GetDisplay_1> <xsl:with-param name=input select=$input/> </xsl:call-template> <xsl:text>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.