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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:30:09+00:00 2026-05-26T10:30:09+00:00

I have an issue with transforming an xml data by using xslt template. I

  • 0

I have an issue with transforming an xml data by using xslt template. I guess the issue is about the namespace in the xml, after I remove the namespace xmlns="http://schemas.microsoft.com/sharepoint/soap/, everything is working fine.

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <GetListCollectionResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <GetListCollectionResult>
                <Lists>
                    <List Title="Announcement1" Description="Announcement 1"/>
                    <List Title="Announcement2" Description="Announcement 2"/>
                </Lists>
            </GetListCollectionResult>
        </GetListCollectionResponse>
    </soap:Body>
</soap:Envelope>

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    exclude-result-prefixes="msxsl">

  <xsl:template match="//Lists">
    <table>
      <xsl:for-each select="List">
        <tr>
          <td>
            <xsl:value-of select="@Title"/>:
          </td>
          <td>
            <xsl:value-of select="@Description"/>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </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-26T10:30:10+00:00Added an answer on May 26, 2026 at 10:30 am

    Just add a namespace to your stylesheet and it will work fine. Here’s your stylesheet with the namespace ms used. You can use whatever prefix you want though:

    <xsl:stylesheet version="1.0"
      xmlns:ms="http://schemas.microsoft.com/sharepoint/soap/"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      exclude-result-prefixes="msxsl ms">
    
      <xsl:template match="//ms:Lists">
        <table>
          <xsl:for-each select="ms:List">
            <tr>
              <td>
                <xsl:value-of select="@Title"/>:
              </td>
              <td>
                <xsl:value-of select="@Description"/>
              </td>
            </tr>
          </xsl:for-each>
        </table>
      </xsl:template>
    </xsl:stylesheet>
    

    This produces the following output:

    <table><tr><td>Announcement1:
      </td><td>Announcement 1</td></tr><tr><td>Announcement2:
      </td><td>Announcement 2</td></tr></table>
    

    Alternatively, in XSLT 2.0, you can just use an asterisk (*) for the prefix and not add a namespace at all:

    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      exclude-result-prefixes="msxsl">
    
      <xsl:template match="//*:Lists">
        <table>
          <xsl:for-each select="*:List">
            <tr>
              <td>
                <xsl:value-of select="@Title"/>:
              </td>
              <td>
                <xsl:value-of select="@Description"/>
              </td>
            </tr>
          </xsl:for-each>
        </table>
      </xsl:template>
    </xsl:stylesheet>
    

    This will produce the same output as the previous example.

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

Sidebar

Related Questions

I have an issue with using AWK to simply remove a field from a
MSSQL database. I have issue to create database using old databases data. Old database
I have issue, after checkout on checkout/onepage/success get a user info using order id,
I have an issue that is driving me a bit nuts: Using a UserProfileManager
We have an issue using the PEAR libraries on Windows from PHP . Pear
I have issue wuth Firefox not displaying style text-decoration: line-through. I am using jqGrid
i have issue regarding Paging using filterexpression. here's the piece of code for filtering
I have a problem parsing an xml, actually transforming it. The error I get
i have done drag and drop using with jquery. here i have issue that
We have an odd problem, we are tranforming a pretty complicated XML file using

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.