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

  • Home
  • SEARCH
  • 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 6702401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:02:58+00:00 2026-05-26T07:02:58+00:00

I have an XML file (dynamically created) and an XSL style sheet; if I

  • 0

I have an XML file (dynamically created) and an XSL style sheet; if I open the XML file within Firefox, I get a nice table of output.

However, I want to render this data within an HTML page. I’ve tried using:

HTML file:

<html>
  <body>
    <xml src="test_data.xml">
    </xml>
    </body>
</html>

But I can’t get anything to render. Both my XML file and my XSL file are in the same directory.

I’ve tried removing <html> and <body> from my XSL output, but still get no results.

Online I’ve read that some methods differ for IE and Firefox; how can I render an XML file within an HTML page in Firefox?


XML file (test_data.xml):

<?xml-stylesheet type="text/xsl" href="report_proteins.xsl"?>
<group_list>
    <protein_group>
        <protein name="A_1" />
        <protein name="A_2" />
    </protein_group>
    <protein_group>
        <protein name="B_1" />
    </protein_group>
    <protein_group>
        <protein name="C_1" />
        <protein name="C_2" />
        <protein name="C_3" />
    </protein_group>
</group_list>

XSL file (report_proteins.xsl):

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
    <h2>MAP proteins</h2>
    <table border="0">
      <tr>
        <th bgcolor="#E7FFCC">Group number</th>
        <th bgcolor="#D2FBFF">Proteins</th>
      </tr>
      <xsl:for-each select="group_list/protein_group">
        <tr>
          <td>
            <xsl:number />
          </td>
          <td>
          <xsl:for-each select="protein">
            <xsl:value-of select="@name"/><xsl:text>&#160;</xsl:text>
          </xsl:for-each>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>
  • 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-26T07:02:59+00:00Added an answer on May 26, 2026 at 7:02 am

    There is no such xml node in HTML, so that is the reason why it doesn’t work. You don’t need the HTML file at all. Your XSLT sheet generates a full XHTML document, and the browser should be able to render that as it is if you open the XML find in the browser.

    You should add the XHTML namespace to the XSLT stylesheet.

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

Sidebar

Related Questions

I have some Dynamically created XML file present in my Document directory.So i want
I have a dynamically created xml file that contains a record with five descriptor
I have a flash movie that loads images dynamically from an xml file. I
I have an XML file, which I open in F# like this: let Bookmarks(xmlFile:string)
I have dynamically created a xml string form a JSON object returned from server.
I have to create an XML file dynamically based on the user input. Here
I have a PHP script that loads XML content dynamically: require_once 'directory/directory/'; $nice= '1149632';
I have a XML created dynamically. However, I want to add a reference to
I have an XML document defined like so XML File <TABLE> <RECORD> <PAGENUMBER> 1
I have situation where table is created dynamically,i don't know the table name it

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.