I'm kind of confused by your reply. The @id attribute that is called is part of the <xsl:for-each method, like this: <xsl:for-each select="$internal_links/internal_links/page">. @id is the attribute value of the page node. But I'm not having a problem with that setup if I use a generic <xsl:value-of method. It's only when I try to pull a variable's generic value that I get this issue. I've also tried using a xsl:param instead, but it didn't change anything.
I want to know if I could have a variable at the top of the document and outside of the template body that contains a generic value in its select property. I then want to call that variable's generic select property in within different methods (i.e. <xsl:for-each...). But when I use the method that I included, it does pull that variable's value, but it doesn't pull the actual values from the XML doc.
Every path for all pages within our site are going to use the exact same path & querystring:
http://SERVER/DIRECTORY/index.aspx?p...ORTORDER_VALUE
...but the values will come from the different methods that contain the $fullpath variable.
For instance:
<xsl:variable name="mainpath">http://SERVER/DIRECTORY/index.aspx?</xsl:variable>
<xsl:param name="fullpath" select="concat($mainpath, 'page=', @id, '#38;dir=', dir_code, '#38;subdir1=', subdir1_code, '#38;subdir2', subdir2_code, '#38;subleftnav=', subleftnav, '#38;modules=', modules, '#38;sortby=', sortby, '#38;sorttype=', sorttype, '#38;sortorder=', sortorder)" />
<xsl:template match="/">
<xsl:for-each select="$internal_links/internal_links/page">
<xsl:if test="@id = 'home'">
<a class="small" href="{$fullpath}">Home</a>
</xsl:if>
<xsl:if test="@id = 'formsdocs'">
<a class="small" href="{$fullpath}">Forms #38; Documents</a>
</xsl:if>
</xsl:for-each>
</xsl:template match>
results in:
<a href="http://SERVER/DIRECTORY/index.aspx?page=&dir=&subdir1=&subdir2=&subleftnav =&modules=&sortby=&sorttype=&sortorder=">Home</a>
<a href="http://SERVER/DIRECTORY/index.aspx?page=&dir=&subdir1=&subdir2=&subleftnav =&modules=&sortby=&sorttype=&sortorder=">Forms #38; Documents</a>
...but I want it to result in:
<a href="http://SERVER/DIRECTORY/index.aspx?page=home&dir=&subdir1=&subdir2=&sublef tnav=&modules=true&sortby=&sorttype=&sortorder=">H ome</a>
<a href="http://SERVER/DIRECTORY/index.aspx?page=formsdocs&dir=onlineservices&subdi r1=formsdocs&subdir2=&subleftnav=&modules=true&sor tby=title&sorttype=text&sortorder=ascending">Forms #38; Documents</a>
KWilliams