View Single Post
  #3 (permalink)  
Old May 14th, 2007, 09:37 AM
alapati.sasi alapati.sasi is offline
Authorized User
 
Join Date: Apr 2007
Location: guntur, ap, India.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Michael,
Thanks very much for the help . Its working .
Bottom line is this style sheet will remove all the namespace bindings for elements as well as attributes of elements.

i have a small doubt on how the style sheet works. Can you please tell me .

1)<xsl:template match="*">
  <xsl:element name="{local-name()}">
    <xsl:apply-templates select="@*"/>
    <xsl:apply-templates/>
  </xsl:element>
 </xsl:template>

match="*" means for all the elements.

why there are two xsl:apply-templates?
2)<xsl:template match="@*">
  <xsl:attribute name="{local-name()}"
    <xsl:value-of select="."/>
  </xsl:attribute>
 </xsl:template>

This is take the local-name() for all the attributes of a element .
Where are we specifying for all the elements apply this ?

These are my doubts . i asked you because i want to know how it works internally .

Thanks & Regards,
SAsi.A

A. Sasi
Reply With Quote