<html>
<br>
Let's say I'm describing the hiearchy of our web site in an XML
document like so...<br>
<br>
<font size=2><site-map><br>
<page
title=</font><font size=2 color="#0000F0">"Section
1"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"1.html"</font><font size=2 color="#000000">><br>
<page
title=</font><font size=2 color="#0000F0">"Page
1.1"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"1.1.html"</font><font size=2 color="#000000">/><br>
<page
title=</font><font size=2 color="#0000F0">"Page
1.2"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"1.2.html"</font><font size=2 color="#000000">/><br>
</page><br>
<page
title=</font><font size=2 color="#0000F0">"Section
2"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"2.html"</font><font size=2 color="#000000">><br>
<page
title=</font><font size=2 color="#0000F0">"Page
2.1"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"2.1.html"</font><font size=2 color="#000000">/><br>
<page
title=</font><font size=2 color="#0000F0">"Page
2.2"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"2.2.html"</font><font size=2 color="#000000">/><br>
</page><br>
<page
title=</font><font size=2 color="#0000F0">"Section
3"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"3.html"</font><font size=2 color="#000000">><br>
<page
title=</font><font size=2 color="#0000F0">"Page
3.1"</font><font size=2 color="#000000">
url=</font><font size=2 color="#0000F0">"3.1.html"</font><font size=2 color="#000000">/><br>
</page><br>
</site-map><br>
<br>
In a given section, the user has links to all the other pages in
that section as well as top-level links to the other sections. In other
words, I only want to "expand" the section that the user is
currently in.<br>
<br>
An XML document that's a part of this hiearchy has some tag that
says where it fits in. Maye 1.1.xml will have <page title="Page
1.1"/> or something... (e.g.
<document-root>&entity-that-expands-to-site-map;<page
title="Page 2.1"/></document-root><br>
<br>
In the XSL proposal, I'd have a field day writing a nifty Java
Script function to do exactly this... in the new world, I'm not sure it
can be done at all.<br>
<br>
The crux of the problem is that I don't know how to make the
<xsl:if test="..."> compare the contents or attribute
values of one tag to the content or attribute values of another tag. It
appears as though the only thing you can do is with the test attribute is
test the position of a tag relative to other tags and what attributes it
has.<br>
<br>
I'd like to do something like this...<br>
<br>
1: <xsl:for-each
select=</font><font size=2 color="#0000F0">"site-map/page"</font><font size=2 color="#000000">><br>
2: <</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">"{attribute(url)}"</font><font size=2 color="#000000">><br>
3: <xsl:value-of
expr=</font><font size=2 color="#0000F0">"attribute(title)"</font><font size=2 color="#000000">/><br>
4: </</font><font size=2 color="#008000">A</font><font size=2 color="#000000">><br>
5: <xsl:if
test=</font><font size=2 color="#0000F0">".[attribute(title)]='value
of page title for this
document'"</font><font size=2 color="#000000">><br>
6: <xsl:for-each
select=</font><font size=2 color="#0000F0">"page"</font><font size=2 color="#000000">><br>
. <</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">"{attribute(url)}"</font><font size=2 color="#000000">><br>
. <xsl:value-of
expr=</font><font size=2 color="#0000F0">"attribute(title)"</font><font size=2 color="#000000">/><br>
. </</font><font size=2 color="#008000">A</font><font size=2 color="#000000">><br>
</xsl:for-each><br>
</xsl:if><br>
</xsl:for-each><br>
<br>
Obviously, line 5 needs some work. If anyone has any ideas or
suggestions on how to reach the goal of spitting out something like the
table below, I would be very grateful...<br>
<br>
<</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">"1.html"</font><font size=2 color="#000000">>Section
1</</font><font size=2 color="#008000">A</font><font size=2 color="#000000">><br>
<</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">2</font><font size=2 color="#000000">.html</font><font size=2 color="#0000F0">">Section
2</A><br>
</font><font size=2 color="#000000"> <</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">2.1</font><font size=2 color="#000000">.html</font><font size=2 color="#0000F0">">Page
2.1</A><br>
</font><font size=2 color="#000000"> <</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">2.2</font><font size=2 color="#000000">.html</font><font size=2 color="#0000F0">">Page
2.2</A><br>
</font><font size=2 color="#000000"><</font><font size=2 color="#008000">A
HREF</font><font size=2 color="#000000">=</font><font size=2 color="#0000F0">"3.html"</font><font size=2 color="#000000">>Section
3</</font><font size=2 color="#008000">A</font><font size=2 color="#000000">><br>
</font><br>
<br>
<div>-- Andrew</div>
<br>
<div> Andrew Bunner</div>
<div> President, Founder Mass Quantities, Inc.</div>
<div> Professional Supplements for the Perfect
Physique</div>
<a href="http://www.massquantities.com/" EUDORA=AUTOURL>http://www.massquantities.com</a>
</html>