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]>

Reply via email to