[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
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)

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

the XSL code looks like this:

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

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


More information about the thelist mailing list