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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:12:46+00:00 2026-05-23T13:12:46+00:00

XSLT available is 1.0. I’m working on a dual-language site in an XML-based CMS

  • 0

XSLT available is 1.0.

I’m working on a dual-language site in an XML-based CMS (Symphony CMS), and need to replace the English version of a category name with the French version.

This is my source XML.

<data>
    <our-news-categories-for-list-fr>
        <entry id="118">
            <title-fr handle="technology">Technologie</title-fr>
        </entry>
        <entry id="117">
            <title-fr handle="healthcare">Santé</title-fr>
        </entry>
    </our-news-categories-for-list-fr>
    <our-news-article-fr>
        <entry id="100">
            <categories>
                <item id="117" handle="healthcare" section-handle="our-news-categories" section-name="Our News categories">Healthcare</item>
                <item id="118" handle="technology" section-handle="our-news-categories" section-name="Our News categories">Technology</item>
            </categories>
            <main-text-fr mode="formatted"><p>Blah blah</p></main-text-fr>
        </entry>
    </our-news-article-fr>
</data>

This is part of the XSLT that I currently have for the French version.

<xsl:template match="data">
    <xsl:apply-templates select="our-news-article-fr/entry"/>
</xsl:template>

<xsl:template match="our-news-article-fr/entry">
    <xsl:if test="categories/item">
        <p class="category">In:</p>
        <ul class="category">
            <xsl:for-each select="categories/item">
                <li><a href="{/data/params/root}/{/data/params/root-page}/our-news/categorie/{@handle}/"><xsl:value-of select="."/></a></li>
            </xsl:for-each>
        </ul>
    </xsl:if>
</xsl:template match>

The problem: the visible text of the anchor (<xsl:value-of select="."/>) gives the English version of the category title.

The handles of the following nodes match (all handles are in English), and so I’m thinking I should be able to match one from the other.

/data/our-news-categories-for-list-fr/entry/title-fr/@handle (value of title-fr node is French translation of category title)

/data/our-news-article-fr/entry/categories/item/@handle

I’m new to XSLT and am struggling to find how to do this.

Many thanks.

  • 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-23T13:12:46+00:00Added an answer on May 23, 2026 at 1:12 pm

    Add <xsl:key name="k1" match="our-news-categories-for-list-fr/entry" use="@id"/> as a child of your XSLT stylesheet element. Then use e.g. <li><a href="{/data/params/root}/{/data/params/root-page}/our-news/categorie/{@handle}/"><xsl:value-of select="key('k1', @id)/title-fr"/></a></li>.

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

Sidebar

Related Questions

I am working on XSLT. Source XML: <?xml version=1.0 encoding=iso-8859-1?> <Content> <alertHeader> <ol xmlns=http://www.w3.org/1999/xhtml>
I need xslt to transform, My Xml is as below <OrderReferences> <OrderRef> <OrderRef>OrderRef1</OrderRef> <Type>ERP</Type>
For XSLT transformation I need a javax.xml.transform.stream.StreamSource object representing xml file being transformed. I
I'm working on XSLT 1.0 version I have declared an int variable that have
An XSLT-newbie problem: I need to substitute a text value in XML-file. All other
Consider the following XSLT script: <?xml version=1.0 encoding=ISO-8859-1?> <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output method=text encoding=iso-8859-1/>
I need to group by two different elements in my XML using XSLT. Here
XSLT / XML: convert apostrophe to a space My XML <Name>KUEN'S INTERNATIONAL</Name> USING XSL
I'm newbie to XSLT and I have below code which is not working for
I have an XSLT file <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output method=html indent=yes/> <xsl:strip-space elements=*/> <xsl:param

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.