
May 28th, 2004, 10:40 AM
|
|
Registered User
|
|
Join Date: May 2004
Location: New Orleans
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
XSLT Hang up...any help welcome...
I've been working on some XSLTs for a new content management system my employer is deploying and I have encounterd one rather frustrating hang up. I have a sitemap that is generated by the CMS in which a page is flagged with an attribute named 'current' and a value of 'true' indicating the page that includes the sitemap as part of it. The XSLT is applied to this Sitemap and finds the page with the 'current' attribute and then walks back up the sitemap marking the parent of the page with a tag name 'tagged' and a value of true and it does this all the way back up the chain. Where I am getting hung up is in writing the template that walks back down the tree looking for each of the 'tagged' folder items in the sitemap and then getting the value of their 'title' elements for display as part of a bread crumb trail.
Here is the Sitemap XML (without the 'current' attribute):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<system-index-block name="Sitemap" current-time="1085758459172">
<system-folder id="611adaa30a0101040084c1f9b7546308">
<name>Academics</name>
<path>/NOBTS/Academics</path>
</system-folder>
<system-folder id="a86aaa050a010104002e749cf9ef62c9">
<name>Chapel</name>
<path>/NOBTS/Chapel</path>
</system-folder>
<system-folder id="a86b13840a010104002e749c0fb8320a">
<name>Enlistment</name>
<display-name>Student Enlistment</display-name>
<path>/NOBTS/Enlistment</path>
<title>Student Enlistment</title>
<system-page id="a86d5ce50a010104002e749c0c1e3eee">
<name>Default</name>
<title>Welcome to Shepherd's Corner</title>
<path>/NOBTS/Enlistment/Default</path>
<display-name>Welcome to Shepherd's Corner</display-name>
</system-page>
</system-folder>
<system-folder id="a86ad4a20a010104002e749c0d4ee2ec">
<name>Extensions</name>
<path>/NOBTS/Extensions</path>
</system-folder>
<system-folder id="a86a62bc0a010104002e749c661a4a47">
<name>LeavellCollege</name>
<path>/NOBTS/LeavellCollege</path>
</system-folder>
<system-folder id="a86b8eca0a010104002e749c548d465b">
<name>Library</name>
<path>/NOBTS/Library</path>
</system-folder>
<system-page id="6fc6fc7e0a0101040084c1f99d473716">
<name>Default</name>
<title>Home Page</title>
<description>New Orleans Baptist Theological Seminary</description>
<path>/NOBTS/Default</path>
</system-page>
<system-page id="c217e0bf0a01010401ad44f61008eed3">
<name>Sitemap</name>
<title>Sitemap</title>
<summary>Map of the NOBTS.EDU web site</summary>
<author>James W. Thompson, II</author>
<description>Map of the NOBTS.EDU web site.</description>
<path>/NOBTS/Sitemap</path>
<display-name>Sitemap</display-name>
</system-page>
</system-index-block>
I attached the XSLT I am trying to work on...
The last template named 'walk-down-path' is where I am trying to implement the functionality. To be honest, I do not understand xpath well enough and would like any hints in the right direction I can get. Thanks!
|