[thelist] XML/ XSL and ASP question

Nicole Parrot nicole at parrot.ca
Sat Oct 28 15:43:19 CDT 2000


I'm trying to get my first ever XML/XSL going and all from within ASP and MS
SQL.
Over all, it's not going too badly, considering it's a big morsel..

However I'm failing at getting a nested loop working.

The goal is to get something to display more or less like this:
Menu Category
    Menu Item
    Menu Item

Menu Category
    Menu Item
    Menu Item

The XML code looks like this: (trimmed down, but there are about 8 menucat
entries in the real file)

    <skin>
	<menucat category="PREQUELS">
		<menuitem item="Hidden images" menuurl="http://www.virtualedition.com/">
		</menuitem>
		<menuitem item="Cutting room floor"
menuurl="http://www.virtualedition.com/">
		</menuitem>
		<menuitem item="Episode II news"
menuurl="http://www.theforce.net/episode2">
		</menuitem>
		<menuitem item="Virtual Edition" menuurl="http://www.virtualedition.com">
		</menuitem>
	</menucat>
   </skin>

the XSL code looks like this:

    <!-- START MENU CATEGORIES -->
    <xsl:for-each select="skin/menucat">
        <p class="MenuCategory">
        <xsl:value-of select="@category" /><br />
        <xsl:value-of select="."/>
        <xsl:for-each select="skin/menucat/menuitem">
            <a><xsl:attribute name="href"><xsl:value-of select="@menuurl"
/></xsl:attribute><xsl:value-of select="@item"/></a><br />
        </xsl:for-each>
        </p>
    </xsl:for-each>
    <!-- END MENU CATEGORIES -->

The "menucat" loops properly and I get all of them listed. However I get
none of the internal loop to be displayed.  I tried displaying simple static
text inside the inner loop, and it's not getting displayed. It is however
considered part of the "text" of "menucat", in other words, it gets
displayed with the call to <xsl:value-of select="."/>  (which is here only
for debug purposes btw)

What am I overlooking? ???

Nicole





More information about the thelist mailing list