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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:07:40+00:00 2026-05-23T03:07:40+00:00

I need some to help oon generating the XSL file for my XML Data.

  • 0

I need some to help oon generating the XSL file for my XML Data.

Here is my XML Data

<?xml-stylesheet href="C:\Style.xsl" type="text/xsl" ?>    

<xml>
<ApproverRoles OperationType="RemovedUser" xmlns="http://tempuri.org/">
<UserName>Bhupathiraju, Venkata</UserName><UserRole>IT Owner</UserRole><RoleDescription>Role Owner
</RoleDescription><UserRoleID>138</UserRoleID></ApproverRoles>
<ApproverRoles OperationType="RemovedUser" xmlns="http://tempuri.org/">
<UserName>Bhupathiraju, Venkata</UserName><UserRole>Business Owner</UserRole>
<RoleDescription>Role Owner</RoleDescription><UserRoleID>136</UserRoleID></ApproverRoles>
<ApproverRoles OperationType="RemovedUser" xmlns="http://tempuri.org/"><UserName>Amperayeni, Kiran K</UserName>
<UserRole>IT Owner</UserRole><RoleDescription>asdasdasd</RoleDescription><UserRoleID>97</UserRoleID>
</ApproverRoles>
<ApproverRoles OperationType="RemovedUser" xmlns="http://tempuri.org/"><UserName>Amperayeni, Kiran K</UserName>
<UserRole>IT Owner</UserRole><RoleDescription>i</RoleDescription><UserRoleID>135</UserRoleID></ApproverRoles>
</xml>

My XSL file is below

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match ="/" >
        <html>
            <head>
                <title>User Management</title>
            </head>
            <body>
                <table width="600" border="1" style='font-family:Calibri;font-size:10pt;background-color:#FFFFFF;border-color:#ccccff'>
            <tr bgcolor = "#ccccff" style='font-weight:bold;'>
                <td colspan="3">Proposed Users :</td>
            </tr>
            <tr bgcolor = "#cccccc" style='font-weight:bold;'>
                <td>User Name</td>
                <td>Role</td>
                <td>Role Qualifier</td>
            </tr>

            <xsl:for-each select="//ns1:ApproverRoles" >
                <tr>
                    <td>
                        <xsl:value-of select="UserName" />
                    </td>
                    <td>
                        <xsl:value-of select="UserRole" />
                    </td>
                    <td>
                        <xsl:value-of select="RoleDescription" />
                    </td>
                </tr>
            </xsl:for-each>
            <tr bgcolor = "#ccccff" style='font-weight:bold;'>
                <td colspan="3">Removed Users :</td>
            </tr>
            <tr bgcolor = "#cccccc" style='font-weight:bold;'>
                <td>User Name</td>
                <td>Role</td>
                <td>Role Qualifier</td>
            </tr>
        </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-23T03:07:41+00:00Added an answer on May 23, 2026 at 3:07 am

    You are not correctly dealing with the default namespace present in the input document. If you do not associate a prefix to the corresponding namespace uri, the XSLT processor will search for elements in no namespace. Actually, the elements in your input document, are all in the namespace http://tempuri.org/.

    So, you need first to declare the namespace prefix in the transform:

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

    Then, you have to use the prefix accordingly. For instance:

                    <xsl:for-each select="//ns1:ApproverRoles" >
                        <tr>
                            <td>
                                <xsl:value-of select="ns1:UserName" />
                            </td>
                            <td>
                                <xsl:value-of select="ns1:UserRole" />
                            </td>
                            <td>
                                <xsl:value-of select="ns1:RoleDescription" />
                            </td>
                        </tr>
                    </xsl:for-each>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help here. I have deployed spree (0.70.3) on slicehost (ubuntu, ruby1.8.7, Rails
Need some help with the CSS for generating a grid of perfect squares. Div's
I need some help/guidance on WinForms data binding and I can't seem to get
I need some help figuring out what I'm doing wrong here. I am trying
Ok need some help here. I have an autocomplete setup to pull from a
Need some help for creating a File and String search engine. The program needs
I need some help understanding how to utilize fgetcsv and arrays to manipulate data.
I need some help with some advanced file include code.. I googled around, but
Need Some Help With Regex: I want to replace [url=http://youtube.com]YouTube.com[/url] with <a href=http://youtube.com>YouTube.com</a> the
Need some help understanding if I'm on the right track here and exactly what

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.