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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:33:48+00:00 2026-06-15T05:33:48+00:00

I have an XML document and XSLT style sheet to change up how it

  • 0

I have an XML document and XSLT style sheet to change up how it displays. Right now I just want the XSLT document to make “Hello World!” show up when the XML document is run, but I am just getting a display of the XML document on the web page.

Here is the XML document (trial Doc.xml):

<?xml-styelsheet type="text/xsl" href="trialDoc.xsl"?>

<people>
    <person gender="M">
    <firstName>Sam</firstName>
    <lastName>McAllister</lastName>
    <age>25</age>
    </person>
    <person gender="F">
    <firstName>Kris</firstName>
    <lastName>Paolini</lastName>
    <age>24</age>
    </person>
    <person gender="M">
    <firstName>Bob</firstName>
    <lastName>Turring</lastName>
    <age>19</age>
    </person>
</people>

And here is my XSL Document (trialDoc.xsl):

<xsl:stylesheet version="1.0" 

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<xsl:template match="/">
    Hello World!
</xsl:template>


</xsl:stylesheet>

What am I doing wrong?

  • 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-15T05:33:49+00:00Added an answer on June 15, 2026 at 5:33 am

    First, your XML has a typo; you probably wanted

    <?xml-stylesheet type="text/xsl" href="trialDoc.xsl"?>
    

    Then, your XSL should produce XML tree – enclose your output with some XML structure with single node at the top:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <h1>Hello World!</h1>
      </xsl:template>
    </xsl:stylesheet>
    

    Alternatively, instruct the XSL processor to generate text output:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="text"/>
      <xsl:template match="/">
        Hello World!
      </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a xml document, now i want to translate it to another xml
I just added a namespace to my XML document and now my XSLT stylesheet
I have the following XML document: <root someAttribute=someValue /> Now I want to add
I have created a xslt document which formats an xml document, but I would
I have an XML document, and I want to print the tag names and
Next question: I have InputDoc xml document and xslt file in order to transform
I have an XML document and made an XSLT to output is as HTML
I have an XSLT stylesheet that processes an XML document to produce HTML. I've
I have an xml document that I am transforming with xslt into an xsl-fo
I have an XML document (in a .net C# web app) that I want

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.