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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:46:40+00:00 2026-05-26T14:46:40+00:00

i’ve a XML file which looks like: <VersionHistory> <Release Version=0.0.1 Date=27/1/2011> <NewFeature>foo</NewFeature> <BugFix>some text</BugFix>

  • 0

i’ve a XML file which looks like:

<VersionHistory>
  <Release Version="0.0.1" Date="27/1/2011">
    <NewFeature>foo</NewFeature>
    <BugFix>some text</BugFix>
    <BugFix>some text</BugFix>
    <BugFix Ticket="12004">some text</BugFix>
  </Release>
  <Release Version="0.0.2" Date="15/2/2011">
    <NewFeature>foobar</NewFeature>
    <BugFix>some more text</BugFix>
    <BugFix>some more text</BugFix>
    <BugFix Ticket="12001">some more text</BugFix>
  </Release>
</VersionHistory>

Now my XSLT looks like this:

  <xsl:template match="/">
    <xsl:for-each select="VersionHistory/Release">
      <xsl:sort select="@Version"/>
  <ul>
        <li>
          <h3>New Feature<br/></h3>
          <xsl:for-each select="NewFeature">
            <ul>
              <li>
                <xsl:value-of select="NewFeature"/>
              </li>
            </ul>
          </xsl:for-each>
        </li>
         <h3>
            Fixed<br/>
          </h3>
            <xsl:for-each select="BugFix">
              <ul>
                <li>
                  <p>
                    <xsl:value-of select="BugFix"/>
                  </p>
                </li>
              </ul>
            </xsl:for-each>
        </li>
...

My problem is, that the 2nd for-each which goes through the BugFixes creates the amout of list items the xml contains of this element.. but i dont get the text which is between . Why?
How can i fix this?

this is not only for BugFix of course.. its for all this elements like BugFix, NewFeature (there are some more.. i haven’t list here)

greets

  • 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-26T14:46:41+00:00Added an answer on May 26, 2026 at 2:46 pm

    In your for-each you select NewFeature, then in the value-of, you are calling the value of a child-node called NewFeature:

          <xsl:for-each select="NewFeature">
            <ul>
              <li>
                <xsl:value-of select="NewFeature"/>
              </li>
            </ul>
          </xsl:for-each>
    

    Since NewFeature doesn’t contain a NewFeature node, you see nothing.

    This would work (selecting the current node in the for-each loop):

          <xsl:for-each select="NewFeature">
            <ul>
              <li>
                <xsl:value-of select="."/>
              </li>
            </ul>
          </xsl:for-each>
    

    But a better option would be to use a template (which you should to with all of your for-each loops):

    <xsl:template match="NewFeature">
      <ul>
        <li><xsl:value-of select="."/></li>
      </ul>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an XML file, the creators of it stuck in a bunch social
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is

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.