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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:52:08+00:00 2026-05-16T17:52:08+00:00

I am using XSLT1.0 for transforming my XML. I am having below Tabs.xml <?xml

  • 0

I am using XSLT1.0 for transforming my XML.

I am having below Tabs.xml

<?xml version="1.0"?>
<tcm:ListItems xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ID="tcm:481-87289-4" Managed="68">
  <tcm:Item ID="tcm:481-596728-64" Title="T000. Brisbane" pageURL="/australia/brisbane/index.aspx" componentTitle="Overview"/>
  <tcm:Item ID="tcm:481-598671-64" Title="Tabs XML"/>
  <tcm:Item ID="tcm:481-598672-64" Title="T030 Special Offers" pageURL="/australia/brisbane/specialoffers.aspx" componentTitle="Special Offers"/>
  <tcm:Item ID="tcm:481-598673-64" Title="020 Flight Schedules" pageURL="/australia/brisbane/flightschedules.aspx" componentTitle="Flight Schedules"/>
  <tcm:Item ID="tcm:481-598674-64" Title="T010 Guide" pageURL="/australia/brisbane/guide.aspx" componentTitle="Guide"/>
</tcm:ListItems>

And I am using below xslt to transform it!

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:em="http://www.emirates.com/tridion/schemas" xmlns:tcmse="http://www.tridion.com/ContentManager/5.1/TcmScriptAssistant" exclude-result-prefixes="em xlink tcmse tcm">
  <xsl:output method="xml" version="1.0" encoding="UTF-16" indent="yes"/>
  <xsl:template match="tcm:ListItems">
    <list type="Tabs">
      <xsl:apply-templates select="tcm:Item">
        <xsl:sort select="@Title" order="ascending"/>
      </xsl:apply-templates>
    </list>
  </xsl:template>
  <!-- add field values for each item-->
  <xsl:template match="tcm:Item">
    <xsl:if test="@componentTitle != ''">
      <xsl:element name="tab">
        <xsl:attribute name="id">
          <xsl:value-of select="substring-after(@ID, '-')"/>
        </xsl:attribute>
        <xsl:attribute name="title">
          <xsl:value-of select="@componentTitle"/>
        </xsl:attribute>
        <xsl:attribute name="url">
          <xsl:value-of select="@pageURL"/>
        </xsl:attribute>
      </xsl:element>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>

Previously, it was working fine, but now there is another change required, now I need those node to be rendered whose @Title starts with ‘T’ or ‘t’ as well as next 3 character should be number for example in above xml “Flight Schedule” shouldn’t come, I assume i just need to write one more and condition in <xsl:if test="@componentTitle != ''">,

Please suggest! how it can be done!

  • 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-16T17:52:09+00:00Added an answer on May 16, 2026 at 5:52 pm

    I came up with below solution, please suggest if it is OK!

    <xsl:template match="tcm:Item">
        <xsl:if test="@componentTitle != '' and (starts-with(translate(@Title, 't', 'T'), 'T')and string(number(substring(@Title,2,3))) != 'NaN')">
          <xsl:element name="tab">
            <xsl:attribute name="id">
              <xsl:value-of select="substring-after(@ID, '-')"/>
            </xsl:attribute>
            <xsl:attribute name="title">
              <xsl:value-of select="@componentTitle"/>
            </xsl:attribute>
            <xsl:attribute name="url">
              <xsl:value-of select="@pageURL"/>
            </xsl:attribute>
          </xsl:element>
        </xsl:if>
      </xsl:template>
    

    Your all input is required!

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

Sidebar

Related Questions

I've xml as below, <?xml version=1.0 encoding=utf-16 ?> <AllResidentAndUnitInfo xmlns:i=http://www.w3.org/2001/XMLSchema-instance i:type=ResidentsByUnitInfo xmlns=http://schemas.datacontract.org/2004/07/FSRSchema> <BillingAddresses> <BillingAddress>
I am using xslt 2.0 for transforming one xml format to another xml format.But
I'm transforming an XML Schema using XSLT 2.0. The first schema (s1.xsd) imports a
I am having trouble transforming particular characters from an XML feed into XHTML. I
I'm transforming xml into wordml using xslt. I would like to be able to
I'm transforming an XML document with mimimized br tags like this: <br/> I'm using
I am using XSLT and XML, I have below XML format with me. <?xml
I am transforming XML into HTML using XSLT. I have the following XML structure:
i am currently using xslt1.0 and jdk1.6.0_10 for converting xml to html..but i couldnt
I have an XML(XHTML) file which I'm transforming into another XML file by using

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.