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 344389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:59:09+00:00 2026-05-12T10:59:09+00:00

In my web application, I display the search results using XSLT. There are some

  • 0

In my web application, I display the search results using XSLT.
There are some hard coded text in XSLT file which I want to make language independent.

XSLT:

<xsl:if test="$IsEmpty">
    <table cellpadding="5" cellspacing="0" border="1" style="width:100%;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid;border-top-color:gray;border-bottom-color:gray;border-left-color:gray;border-right-color:gray;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;">
        <tr>
            <td style="text-align:center;">
                There are no blog posts to display.
            </td>
        </tr>
    </table>
</xsl:if>

Is it possible to pick the text "There are no blog posts to display." from a resource file?

  • 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-12T10:59:10+00:00Added an answer on May 12, 2026 at 10:59 am

    I’m assuming that by “resource file” you mean a regular resx that is compiled into the assembly. In which case, not directly from xslt; however, you could add an extension object and use a key-base approach, i.e.

    <xsl:value-of select="resx:getString('noposts')"/>
    

    The “resx” alias would be mapped (xmlns) to a uri that you use when creating your xslt wrapper in C#. For example, with the xmlns (in the xslt preamble):

    xmlns:resx="myextnuri"
    

    we can map that in C# via:

    public class MyXsltExtension {
        public string getString(string key) {
            return "TODO: Read from resx: " + key;
        }
    }
    

    and attach this to the namespace:

    XslCompiledTransform xslt = new XslCompiledTransform();
    xslt.Load("xslt.xslt");
    XsltArgumentList args = new XsltArgumentList();
    object obj = new MyXsltExtension();
    args.AddExtensionObject("myextnuri", obj);
    using (XmlWriter writer = XmlWriter.Create("out.xml")) {
        xslt.Transform("xml.xml", args, writer);
    }
    

    We now have full control to inject managed code (as extensions) into our xslt.

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

Sidebar

Related Questions

I want to display some dynamic charts/graphs in my web application. The current good
I'm trying to display images using my web application written in Rails. I've come
I am working on a web-application in which dynamically-created images are used to display
My application displays Hebrew text which comes from a Web Service. When a sentence
We have a Web application (ASP.NET) which displays in some page links to miscellaneous
On our web application, the search results are displayed in sortable tables. The user
In my web application I got a search results list ( SR ). The
I have a web application and I am using the CSS display: table. I
I am using MVC 2.0 web application where there few buttons whose onclick i
I am working on a web application that is designed to display a bunch

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.