One thing that strikes me is that you're tranferring XML element attributes to HTML element attributes uninspected. It would seem to be, admittedly far from expert, a better practice is to specifically select and handle the XML attributes, transforming then into appropriate (perhaps equivalent) HTML attributes. But for the most part, most such attributes would belong in the xsl-stylesheet or CSS anyway.
I know that doesn't answer your question if why your code doesn't work. But perhaps folks will respond about the wisdom of doing it one way or another. regards, --- Bob > -----Original Message----- > From: yuryx [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 9:48 AM > To: [EMAIL PROTECTED] > Subject: cleaning xmlns attribute with XSL transformation > > > How can I set up the xsp processor that way that it will not unclude > 'xmlns' attributes to HTML output? > > For example. I'm generate XML from my XSP.In XSP page i define the > following namespace: [xmlns:xsp="http://apache.org/xsp"]. > my XSP: > <content> > <test type="test">test</test> > </content> > 1)When I tried to execute this logicsheet > ... > <xsl:template match="content"> > <xsl:apply-templates/> > </xsl:template> > ... > <xsl:template match="@*" priority="-3"> > <xsl:choose> > <xsl:when test="not(contains(name(.),'xmlns'))"> > <xsl:copy><xsl:value-of select="."/></xsl:copy> > </xsl:when> > </xsl:choose> > </xsl:template> > > <xsl:template match="node()" priority="-2"> > <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> > </xsl:template> > > > <xsl:template match="text()" priority="-1"><xsl:value-of > select="."/></xsl:template> > > root tags (<test>) contain [xmlns:xsp="http://apache.org/xsp] attribute > (and 'test' attribute also) > > 2)When I tried to execute this logicsheet > ... > <xsl:template match="content"> > <xsl:apply-templates/> > </xsl:template> > ... > <xsl:template match="@*" priority="-3"> > <xsl:choose> > <!-- ******************************************* --> > <xsl:when test="not(contains(name(.),'test'))"> > <!-- ******************************************* --> > <xsl:copy><xsl:value-of select="."/></xsl:copy> > </xsl:when> > </xsl:choose> > </xsl:template> > > <xsl:template match="node()" priority="-2"> > <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> > </xsl:template> > > > <xsl:template match="text()" priority="-1"><xsl:value-of > select="."/></xsl:template> > > Root tags (<test>) contain [xmlns:xsp="http://apache.org/xsp] attribute > without test attribute > Of course I cleaned this attribute, but why xmlns:xsp attribute is not > cleaned in first XSL example? > > Or I'm in a wrong way here? > > > Thanx. > Yury. > > > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>