xsl-list
[Top] [All Lists]

Supress namespace auto-ns1

2006-01-11 22:38:58
Hi Michael,

My XSL is as follows:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
     xmlns ="http://integration.sapi.com"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

      <xsl:strip-space elements="*"/>
      <xsl:output method="xml" indent="yes"
media-type="text/xml"/>
      
      <xsl:template match="XferInfo">
          <xsl:element name="sAPI">
                <xsl:attribute
name="xsi:schemalocation">
                        <xsl:value-of
select="'http://integration.sapi.com
http://localhost/services/schemas/fso/Transfer-1.0.xsd'"/>
                </xsl:attribute>
<xsl:element name="Request">
<xsl:attribute
name="TypeOfRequest">Transfer</xsl:attribute> 
<xsl:attribute name="Echo"><xsl:value-of
select="'false'"/> </xsl:attribute>
 <TransferRq xmlns="http://fso.sapi.com/2004"; 
xmlns:sap="http://integration.sapi.com";>
  <xsl:element name="From">
    <Id>00000000000005000011</Id>
    <Info>
       <sap:Id>8888</sap:Id>
    </Info>
  </xsl:element>
  <xsl:element name="To">
     <Id>00000000000005000011</Id>
     <Info>
        <sap:Id>8888</sap:Id>
     </Info>
   </xsl:element>
 </TransferRq>  
</xsl:element>
</xsl:element>
</xsl:template>

The output i got after transformation is:

<?xml version="1.0" encoding="UTF-16" ?> 
 <sAPI xsi:schemalocation="http://integration.sapi.com
http://localhost/services/schemas/fso/Transfer-1.0.xsd";
xmlns="http://integration.sapi.com";>
 <Request TypeOfRequest="Transfer" Echo="false">
 <TransferRq
xmlns:auto-ns1="http://integration.sapi.com";
xmlns="http://fso.sapi.com/2004";
xmlns:sap="http://integration.sapi.com";>
 <From>
  <Id>00000000000005000011</Id> 
 <Info>
  <sap:Id>8888</sap:Id> 
  </Info>
  </From>
 <To>
  <Id>00000000000005000011</Id> 
 <Info>
  <sap:Id>8888</sap:Id> 
  </Info>
  </To>
  </TransferRq>
  </Request>
  </sAPI>

Please let me know how to supress "xmlns:auto-ns1" in
"TransferRq" element.

Thanks&Regards,
JayaVardhani M.


Send instant messages to your online friends http://in.messenger.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>