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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:36:45+00:00 2026-06-07T10:36:45+00:00

input.xml: <comp> <link id=#c1-tbl-0001/> </comp> output.xml: <comp> <link newid=#c1-tbl-0001/><tableno>1.1</tableno> </comp> i need the value

  • 0

input.xml:

<comp>
  <link id="#c1-tbl-0001"/>
</comp>

output.xml:

<comp>
  <link newid="#c1-tbl-0001"/><tableno>1.1</tableno>
</comp>

i need the value for tableno from attribute value like 1 from tb1 and another 1 from 0001. so the ouput should be 1.1

i used the following xsl but it’s not gives the exact result.

 <xsl:element name ="tableno">
  <xsl:value-of select ="substring(@id,7)"/>.<xsl:value-of select="substring(@id,12)"/>
</xsl:element>
  • 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-06-07T10:36:48+00:00Added an answer on June 7, 2026 at 10:36 am

    First of all, the attribute you want to read is named id, not href. (Edit: You seem to have corrected this.)

    You have to give a length to the first substring call, so that it only captures one digit:

    <xsl:value-of select="substring(@id, 7, 1)"/>.<xsl:value-of select="substring(@id, 12)"/>
    

    If the second number may use more than one of the digits, but you want to strip the zeros, you can do

    <xsl:value-of select="substring(@id, 7, 1)"/>.<xsl:value-of select="number(substring(@id, 9))"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to display the parent from the first Element of input.xml Also I
My input XML consists of the following, <root> <entry> <type>U</type> <value>111</value> </entry> <entry> <type>X</type>
The input XML tag must be validated for a pattern which is like this:
This is my input xml: <root> <node1/> <node2/> <node3/> <node4/> <othertags/> </root> The output
My java module gets a huge input xml from a mainframe. Unfortunately, the mainframe
For input XML like: <FlightOptions> <item> <Fares> <item> <FareClass>A</FareClass> <Fare>100</Fare> <FareType>E</FareType> <Seats>5</Seats> </item> <item>
I have an input XML document something like this: <text> <p> Download the software
I need XSLT transformation for money. In input XML data are prices as numbers:
I have a input XML like this : <in_xml> <company> <project> ProjNo1 ProjNo2 ProjNo3
I have an input XML file which I need to copy 1:1 to the

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.