xsl-list
[Top] [All Lists]

RE: XSLT2 variables / nodesets and their namespace

2005-01-21 05:32:38
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="{(_at_)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





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>