Hello,
I would like to realize a layer based navigation.
Each entry may have 0...n sublevels. The XML, which describes this navigation
looks like the following:
<navigation>
<entry url=""
href="http://foo">http://foo" name="Foo">
<entry url="" href="http://somewhere">http://bar" name="Bar"
/>
</entry>
</navigation>
Secondly, there exists an XML, which describes the
content of the page itself:
<page>
<title>Blabla</title>
<content>This is the
content</content>
</page>
Now, I have got problems to bring the
navigation informations dynamically into the XSL. I would like to describe each
site in the sitemap and aggregate the navigation-XML and the
page-XML:
<map:match pattern="foo">
<map:aggregate
element="page">
<map:part
src="" />
<map:part
src="" strip-root="true" />
</map:aggregate>
<map:transform type="xsl"
src="" />
<map:serialize type="html"
/>
</map:match>
Now, I would like to get the name of the actual
position on the page. Like this: "You are in area: Foo". Therefore I have
to compare the given navigation path with the navigation.xml and extract the
content of a element called "name" or/and "url" for example.
In my own opinion, I have two choices but I
don't know which one of these works well...
The first one is to give the XSL the actual path of
the position via <map:parameter> in <map:transform>. Is this
possible?
The second one is to write an own action class/XSP,
which gets the actual path via parameter, extracts the necessary informations
from the navigation.xml and returns the values as attributes.
The main question is: How can I extract the
specified content of navigation.xml depending on a parameter?
Is there a better way, to realize this? A best
practice?
Thank you very much.
Regards
Stephan Niedermeier
|
- Re: BestPractice: Navigation Stephan Niedermeier
- Re: BestPractice: Navigation Andrew Savory