SOLVED: RE: [thelist] XML/ XSL and ASP question

Nicole Parrot nicole at parrot.ca
Sat Oct 28 16:05:21 CDT 2000


It's always when one has given up figuring things out by oneself, and has
decided to ask for help, that one finds the solution....
Duh....

Since the loops are nested, the inner one should simply read:
>         <xsl:for-each select="menuitem">
since the skin/menucat is implied by the outer loop.

Thanks anyway ;-)


> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Nicole Parrot
> Sent: October 28, 2000 4:52 PM
> To: Thelist at Lists.Evolt.Org
> Subject: [thelist] XML/ XSL and ASP question
>
>
> 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
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list