xslt - Which namespace is used for xsl:element when name is an attribute value template -


i'm trying understand how xsl:element works , have test transform:

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet     version="1.0"     xmlns:xsl="http://www.w3.org/1999/xsl/transform"     xmlns="http://www.w3.org/1999/xhtml">      <xsl:template match="test">         <output>             <test1/>             <xsl:element name="test2"/>             <xsl:variable name="three" select="3"/>             <xsl:element name="test{$three}"/>         </output>     </xsl:template> </xsl:stylesheet> 

when applied document:

<?xml version="1.0" encoding="utf-8"?> <test/> 

i result using xsltproc

<?xml version="1.0"?> <output xmlns="http://www.w3.org/1999/xhtml">     <test1/>     <test2/>     <test3 xmlns=""/> </output> 

why test3 node not in same namespace test1 , test2?

using visual studio , getting apply xslt below (formatted readability), bug in xsltproc.

<?xml version="1.0" encoding="utf-8"?> <output xmlns="http://www.w3.org/1999/xhtml">   <test1 />   <test2 />   <test3 /> </output> 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -