Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Xalan to add element

 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Im adding <error-page><error-code>300</error-cede><location>/M.jsp</location></error-page> to many web.xml files using xsl
Im having one xsl and input web.xml files

Im adding it by using

<xml:template match="@*|node()"/>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xml:template>


<xml:template match="@*|node()"/>
<xsl:copy>
<error-page><error-code>300</error-cede><location>/M.jsp</location></error-page>

<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xml:template>

im the output xml, it it is filling error-page to out.xml,

but it is adding like

<error-page xmlns:fo="http://www.w3.org/1999/XSL/Format">..</error-page>

i dont need xmlns:fo="http://www.w3.org/1999/XSL/Format

Please help me ?

Raghunath N
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What problem is that extra namespace declaration causing?
 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Paul,It wont give any problem, but why it is generating it,What is the need of name space defining over there,I'm eager to know this.

Thanks
Raghunath N
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic