I am having trouble outputing namespace declarations in elements as
follows:


    <xsl:for-each select="//tgh:item">
        <xsl:element name="gen:stylesheet">
          <xsl:attribute name="xmlns:lxslt">
            <xsl:value-of select=" 'http://xml.apache.org/xslt' "/>
          </xsl:attribute>
                :
                :
        </xsl:element>
    </xsl:for-each>

I get the namespaces in the gen:stylesheet tag on the first iteration, but
not any subsequeny one.
In short, here's what I get:

     <gen:stylesheet xmlns:lxslt="http://xml.apache.org/xslt";>
               :
     </gen:stylesheet>
     <gen:stylesheet>
               :
     </gen:stylesheet>


But here's what I expect (notice the namespace):

     <gen:stylesheet xmlns:lxslt="http://xml.apache.org/xslt";>
               :
     </gen:stylesheet>
     <gen:stylesheet xmlns:lxslt="http://xml.apache.org/xslt";>
               :
     </gen:stylesheet>

Any ideas, what am I doing wrong.

Cheers,


Tammam

Reply via email to