[thelist] XML/ XSL and ASP question

Niklaus Haldimann n.haldimann at derbund.ch
Mon Oct 30 09:58:53 CST 2000


hi nicole.

you don't really need those loops. you should have a closer look at the
concept of xml/xsl ... xsl isn't a programming language. just go like this:

<!-- START MENU CATEGORIES -->
<xsl:template match="skin/menucat">
    <p class="MenuCategory">
    <xsl:value-of select="@category" /><br />
    <xsl:value-of select="."/>
    <xsl:apply-templates/>
    </p>
</xsl:template>

<xsl:template match="skin/menucat/menuitem">
       <a><xsl:attribute name="href"><xsl:value-of select="@menuurl"
/></xsl:attribute><xsl:value-of select="@item"/></a><br />
</xsl:template>
<!-- END MENU CATEGORIES -->

i think it should work. i'm no expert neither, but i've fiddled around
quite a bit with xsl style sheets lastly.

niklaus.

At 16:52 28.10.00 -0400, you wrote:
>I'm trying to get my first ever XML/XSL going and all from within ASP and MS
>SQL.
>
>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


--
http://eBund.ch http://eGames.ch
aktuell: http://www.eWahlen.ch




More information about the thelist mailing list