[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Help Stepping through XML nodes back and forward


Subject: Re: [xsl] Help Stepping through XML nodes back and forward
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 21 Jan 2005 15:42:25 -0500

Paul,

At 02:21 PM 1/21/2005, you wrote:
Firstly let me say I hate XSLT, sometimes it easy then other times its
just plain confusing!!

There are places you could say that safely ... and then there's XSL-List! (I commend your forthrightness: saying you hate our favorite toy is quite bold really. :-)


Heres my problem.
I have an xml doc(navigation.xml), which is the basis for navigation
between pages in our site.  I'm adding various types of additional
navigation up,home etc as options which can be turned on/off.
Iv been asked to add a linear hierarchical navigation option (Back & Forward)

Im passing in the current page id (tcm attribute) then I need to find
the current page check if its published and also order the page nodes
(order attribute), so it needs to be able to navigate
siblings/children/parents etcl and check when it reaches the start/end
etc..

To summarize its a next and back button functionality I want on each page.

I'm afraid this problem statement is way too underspecified. I've implemented something that does this, and yet have almost no idea of what it is you actually want (so maybe I haven't).


If you reframe your question in terms of inputs (the code snippet is fine) and outputs (which is the part you haven't really said yet), someone might be able to help.

That is, if input is

<?xml version="1.0" encoding="UTF-8"?>
<webstructure pagecount="10" lastmodified="19/01/2005 15:07:52">
        <page title="tcm:4-148994-64" tcm="Home" channel="10"
att4="/lts/testbed/index.asp" att5="Yes" att6="Young people" att7=""
att8="True">
                <page tcm="tcm:4-148994-64" title="Home" order="10"
filename="/lts/testbed/index.asp" leftmenu="Yes" titleattribute="Young
people" accesskey="" published="True"/>
                <page tcm="tcm:4-148843-64" title="level1" order="0"
filename="/lts/testbed/level1/index.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True">
                        <page tcm="tcm:4-148844-64" title="page1" order="1"
filename="/lts/testbed/level1/page1.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True"/>
                        <page tcm="tcm:4-148845-64" title="page2" order="2"
filename="/lts/testbed/level1/page2.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True"/>
                        <page tcm="tcm:4-148846-64" title="page3" order="3"
filename="/lts/testbed/level1/page3.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True"/>
                </page>
                <page tcm="tcm:4-148847-64" title="level2" order="0"
filename="/lts/testbed/level2/index.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True">
                        <page tcm="tcm:4-148848-64" title="page1" order="1"
filename="/lts/testbed/level2/page1.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True"/>
                        <page tcm="tcm:4-148849-64" title="page2" order="2"
filename="/lts/testbed/level2/page2.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True"/>
                        <page tcm="tcm:4-148850-64" title="page3" order="3"
filename="/lts/testbed/level2/page3.asp" leftmenu="Yes"
titleattribute="" accesskey="" published="True"/>
                </page>
        </page>
</webstructure>

plus a TCM value of "tcm:4-148848-64" (just to pick one example at random), what output do you want to see?


Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


Current Thread
Keywords