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

  • Home
  • SEARCH
  • 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 649777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:58:52+00:00 2026-05-13T21:58:52+00:00

I am trying to do some highlighting on some SharePoint XSLT Results. BElow is

  • 0

I am trying to do some highlighting on some SharePoint XSLT Results. BElow is the XML that i am getting.
The Problem that i am getting is that the Template Match blocks are not matching the child nodes of UM If someone can see where i am going wrong that woould be great.

Thank you

Chhris

        <rows>
          <row>
            <LastModifiedTime>02/25/2010 18:32:25</LastModifiedTime>
            <RANK>325</RANK>
            <TITLE>UMUK Win At The Mobile Entertainment</TITLE>
            <AUTHOR>SVR08-002\Administrator</AUTHOR>
            <CREATED>02/25/2010 18:32:22</CREATED>
            <PATH>http://svr08-002:7005/Lists/FrontPageNews/DispForm.aspx?ID=3</PATH>
            <HitHighlightedSummary>a
              <c0>UM</c0> UK won the category of Best Music Label 2009 at the 4th annual ME (Mobile Entertainment) Awards C <ddd/>
            </HitHighlightedSummary>
          </row>
        </rows>

and here is the XSLT that i have so far.

          <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

        <xsl:template match="/">

          <table class="ICS_SearchTable" cellpadding="0" cellspacing="0" width="100%">
            <xsl:for-each select="rows/row">

              <xsl:variable name="Ext">
                <xsl:call-template name="get-file-extension">
                  <xsl:with-param name="path" select="substring-before(PATH, '?')" />
                </xsl:call-template>
              </xsl:variable>      
              <tr>
                <td width="10%">

                </td>
                <td>
                    <div class="ICS_SearchResultItem">
                        <div class="ICS_SearchResultItemImage">
                        <img src="/Style Library/UMIGlobe/Styles/Images/Common/umgi-{$Ext}.png" alt="{$Ext}"/>
                        </div>
                        <div class="ICS_SearchResultItemTitle">
                                    <a href="{PATH}"><xsl:value-of select="TITLE"/></a>
                        </div>
                        <div class="ICS_SearchResultItemDesc">
                      <xsl:choose>
                      <xsl:when test="HitHighlightedSummary[. != '']">
                         <xsl:call-template name="HitHighlighting">
                            <xsl:with-param name="hh" select="HitHighlightedSummary" /> 
                         </xsl:call-template> 
                      </xsl:when>   
                       <xsl:when test="DESCRIPTION[. != '']">
                          <xsl:value-of select="DESCRIPTION"/>     
                       </xsl:when>     
                      </xsl:choose>
                        </div>
                        <div class="ICS_SearchResultItemLink">
                                    <a href="{PATH}"><xsl:value-of select="PATH"/></a> - <xsl:value-of select="AUTHOR" /> - <xsl:value-of select="LastModifiedTime"/>
                      <xsl:call-template name="DisplaySize">
                        <xsl:with-param name="size" select="SIZE" />
                      </xsl:call-template>                                          
                        </div>                                                                              
                            </div>                                  
                </td>
              </tr>
            </xsl:for-each>
          </table>  
        </xsl:template>

        <xsl:template name="HitHighlighting">
          <xsl:param name="hh" />
          <xsl:apply-templates select="$hh"/>
        </xsl:template>

        <xsl:template match="ddd">
          &#8230;
        </xsl:template>
        <xsl:template match="c0">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c1">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c2">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c3">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c4">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c5">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c6">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c7">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c8">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>
        <xsl:template match="c9">
          <b>
            <xsl:value-of select="."/>
          </b>
        </xsl:template>  

      <!-- The size attribute for each result is prepared here -->
      <xsl:template name="DisplaySize">
        <xsl:param name="size" /> 
        <xsl:if test='string-length($size) &gt; 0'>       
         <xsl:if test="number($size) &gt; 0">
         -
          <xsl:choose>
           <xsl:when test="round($size div 1024) &lt; 1"><xsl:value-of select="$size" /> Bytes</xsl:when>
           <xsl:when test="round($size div (1024 *1024)) &lt; 1"><xsl:value-of select="round($size div 1024)" />KB</xsl:when>
           <xsl:otherwise><xsl:value-of select="round($size div (1024 * 1024))"/>MB</xsl:otherwise>
          </xsl:choose>    
         </xsl:if>
        </xsl:if>
      </xsl:template>  

        <xsl:template name="get-file-extension">
          <xsl:param name="path" />
          <xsl:choose>
            <xsl:when test="contains( $path, '/' )">
              <xsl:call-template name="get-file-extension">
                <xsl:with-param name="path" select="substring-after( $path, '/' )" />
              </xsl:call-template>
            </xsl:when>
            <xsl:when test="contains( $path, '.' )">
              <xsl:call-template name="get-file-extension">
                <xsl:with-param name="path" select="substring-after( $path, '.' )" />
              </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
              <!-- SET THE PATH IMAGE SRC -->
              <xsl:choose>
                <xsl:when test="$path = 'uk' or $path = 'org' or $path = 'com' or $path = 'net' or $path = 'biz' or $path = 'gov'">
                  <xsl:text>url</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:value-of select="$path" />
                </xsl:otherwise>
              </xsl:choose>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:template>  
      </xsl:stylesheet>
  • 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-13T21:58:52+00:00Added an answer on May 13, 2026 at 9:58 pm

    What do you mean by “child nodes of UM”?

    Maybe I’m missing something, but there are no nodes named “UM”, just text. So do you mean that you want to match the node that contains the text “UM”… in other words <c0>UM</c0>?

    In my case, when I run your stylesheet, it does match the <c0> node, and writes a <b> node.

    <b>UM</b> UK won the category of Best Music Label 2009 at the 4th annual ME (Mobile Entertainment) Awards C

    What’s not working for you?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to prevent text highlighting in Firefox for some, but not all
I'm trying to add some syntax highlighting to my blog that currently uses RDiscount.
I am trying some things with JSON and PHP and there is something that
I'm trying to extend some CSS highlighting in Textmate. My approach is like so...
So I've used UITableView many times before but I'm getting some unusual behavior that
I'm trying to add some syntax highlighting to a text editor in PyQt4. I've
I was trying some code from Elisp Cookbook , and I initially tought that
I’m thinking about trying some development for the iPhone, is it possible to install
I'm trying some of the ASP.NET MVC tutorials and one of them has the
Recently I was trying some practice programs in python and I came across this

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.