RE: [xsl] XSLT2 variables / nodesets and their namespace

Subject: RE: [xsl] XSLT2 variables / nodesets and their namespace
From: Tom Schutzer-Weissmann <trmsw@xxxxxxxxxxx>
Date: Fri, 21 Jan 2005 12:32:38 +0000
On Fri, 2005-01-21 at 12:03, Michael Kay wrote:

> I think you need to show us what you did first, and what output it produced,
> and what output you wanted, rather than showing us all the ways you tried to
> fix the problem.

quite. 

Initially I added the namespace to the <html> tag in my output. That's
what created all the xmlns=""s. Certain bits of the document were
missing.

I moved the namespace declaration to the stylesheet itself. Now even
more of the output was missing:

eg                      
<ul>
 <xsl:for-each select="$links/ul/li">
  <li>
   <xsl:apply-templates select="*" mode="mklinks">
    <xsl:with-param name="path" select="$path"/>
   </xsl:apply-templates>
  </li>
 </xsl:for-each>
</ul>

gives <ul></ul>

Where $links was created so:

 <xsl:variable name="links">
    <ul>
      <xsl:for-each select="/root/page">
        <li>
          <a href="{@short}/"><xsl:value-of select="@name"/></a>
        </li>
      </xsl:for-each>
      <li><a href="/">home</a></li>
    </ul>
  </xsl:variable>

Why is this?

Many thanks,
Tom

Current Thread