Transforming xsl with namespaces

I'm having some trouble trying to transform this XML:

 <soapenv:Envelope xmlns:soapenv="">
   <p:GetAgendamento xmlns:p="">
    <xs:Servico xmlns:xs="">1</xs:Servico>
    <xs:Oportunidade xmlns:xs="">2</xs:Oportunidade>
    <xs:Caso xmlns:xs="">3</xs:Caso>

to this:


But, using a tool that generate this xsl:

<xsl:transform xmlns:xsl="" xmlns:xs="" xmlns:p="" version="2.0" xpath-default-namespace="">
  <xsl:output method="xml" indent="yes" />
  <xsl:template match="p:GetAgendamento">
      <xsl:call-template name="_template_0" />
  <xsl:template name="_template_0">
    <xsl:for-each select="xs:Servico">
        <xsl:apply-templates select="." />
    <xsl:for-each select="xs:Oportunidade">
        <xsl:apply-templates select="." />
    <xsl:for-each select="xs:Caso">
        <xsl:apply-templates select="." />

It results in:

<?xml version="1.0" encoding="UTF-8"?>
<GetAppointment xmlns:xs="" 

I guess it is a problem caused by the namespaces. Please help.


In your xsl: xmlns:xs=""

In your source xml: xmlns:xs=""

Fix this discrepancy, and it should work better.

Need Your Help

iPhone getting compile error ABC Functions forbid explocit messages send of dealoc


When I try to build my project, I get the following error message

TSQL- Rearrange sql job step order in code

sql sql-server-2008 tsql sql-server-2008-r2 database-administration

I have a few SQL maintenance jobs that have upwards of 50 job steps. Occasionally, there is a need to add a step or two to one of these monstrous SQL jobs. The issue I have is that I prefer each st...