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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:45:27+00:00 2026-05-19T09:45:27+00:00

I want to change this xml content to HTML table <SSI> <data> <expanded>Chemical Research</expanded><abbre>Chem.

  • 0

I want to change this xml content to HTML table

    <SSI>
        <data>
            <expanded>Chemical Research</expanded><abbre>Chem. Res.</abbre>
            <expanded>Materials Journal</expanded><abbre>Mater. J.</abbre>
            <expanded>Chemical Biology</expanded><abbre>Chem. Biol.</abbre>
            <expanded>Symposium Series</expanded><abbre>Symp. Ser.</abbre>
            <expanded>Biochimica Polonica</expanded><abbre>Biochim. Pol.</abbre>
            <expanded>Chemica Scandinavica</expanded><abbre>Chem. Scand.</abbre>
        <\data>
        <data>
            <expanded>Botany</expanded><abbre>Bot.</abbre>
            <expanded>Chemical Engineering</expanded><abbre>Chem. Eng.</abbre>
            <expanded>Chemistry</expanded><abbre>Chem.</abbre>
            <expanded>Earth Sciences</expanded><abbre>Earth Sci.</abbre>
            <expanded>Microbiology</expanded><abbre>Microbiol.</abbre>
        <\data>
    <\SSI>

Tried with following XSL

      <?xml version="1.0"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:template match="/">
      <html>
      <head><title>Abbreviate</title></head>
      <body>
      <table border="1">
      <tr>
      <th>Expanded</th>
      <th>Abbre</th>
      </tr>
       <xsl:for-each select="SSI/data">
       <tr>
        <td><xsl:value-of select="expanded"/></td>
        <td><xsl:value-of select="abbre"/></td>
       </tr>
       </xsl:for-each>
      </table>
      </body></html>
      </xsl:template>
      </xsl:stylesheet>

I got only the first entry of data tag in HTML Table format

    Expanded               Abbre  
    -----------           --------------------  
    Chemical Research     Chem. Res  
    Botany                Bot.

how can get all the values in HTMl???

  • 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-19T09:45:28+00:00Added an answer on May 19, 2026 at 9:45 am

    If you clean up your XSLT and use xsl:apply-templates rather than xsl:for-each, life will become simpler. There is almost never a reason to use xsl:for-each. Try this:

    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:template match="/">
            <html>
                <head><title>Abbreviate</title></head>
                <body>
                    <table border="1">
                        <tr>
                            <th>Expanded</th>
                            <th>Abbre</th>
                        </tr>
                        <xsl:apply-templates select='SSI/data/expanded'/>
                    </table>
                </body></html>
        </xsl:template>
    
        <xsl:template match="expanded">
            <tr>
                <td><xsl:apply-templates/></td>
                <xsl:apply-templates select='following-sibling::abbre[1]'/>
            </tr>
        </xsl:template>
    
        <xsl:template match="abbre">
            <td><xsl:apply-templates/></td>
        </xsl:template>
    
    </xsl:stylesheet>
    

    By using small templates that are applied, you simplify your stylesheet. Additionally, there is no real reason to use xsl:value-of here – the built-in templates will do the right thing. You will end up with simpler templates that are easier to understand.

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

Sidebar

Related Questions

I want to change my div content on the click of a link, this
i have many div's with the same background image and i want change this
I want to change this date format: Tue Apr 3 15:00:03 GMT+0300 2012 to
i'm studying wp7 app changing app on https://github.com/slodge/face . I want to change this
I have the following property public MyType MyProperty {get;set;} I want to change this
I want to change color of h3 links to red in this code: <div
I want to change the behaviour of the editable ComboBox. This is the behaviour
I want to change the link-style for some of my links, like this: a:hover
I have this wonderful iFrame that has wonkey dimensions that I want to change
Ok, not sure if this is even possible, but I want to change 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.