You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Johnny Jones <ja...@hotmail.com> on 2005/05/27 18:05:04 UTC
how to make site map or table of contents for entire site
Hi Users,
I am trying to create a Site Map (or Table of Contents for an entire site).
I would like to make it similar to the menu with all levels and links
displayed. If possible, I would also like to include the information from
H2 or H3 tags inside the pages, similar to what is described here:
http://wiki.apache.org/lenya/HowToTableOfContents
I have tried putting something like this insude my XML file:
<xhtml:body>
<xhtml:h3>Welcome page</xhtml:h3>
</xhtml:body>
Also, inside my xsl file, I tried to read all of h3 header by entering:
<xsl:for-each select="//xhtml:body//xhtml:h3">.
However, the problem that I am having right now is that I was able to see
only headers within my current XML page, but I was not able to see header
from other pages. Can you give me some suggestions of what I can do so that
I would be able to query all of the h3 headers that I have created on all
pages so that I can put them into table of content?
I have read documentation, the wiki and studied the menu.xsl file but I'm
still stuck. For example, in the wiki HowToTableOfContents, it says I am
supposed to query the header as follow:
<xsl:for-each select="//xhtml:div[@id='body']/xhtml:h3">
I think the way I set my XML page is different from the intended way it
appears in the document because the table of content becomes blank if I use
that code. If I am going to use the above code to access all of the header
inside my publication, what are the changes that I need from my current
templates and XML pages?
Another thing that I noticed is that the publication that I downloaded from
wyona (unicms) has a feature to create a new Table of Contents. However,
after the table was being created, the only header that being display is the
header of the current page but not from any others.
I also notice that menu.xsl did a very good job querying all created
documents and put them into a menu. However, I tried to apply the same
concepts into my table of contents, but I also seem to be a litle bit lost
on how the hierarchy are being set up so that all they did is saying
"ancestor" or "descendant" and they were able to get all the name of the
documents they need.
I have tried many different methods that I mentioned above, but in the end,
I was never able to see headers beyond the current pages that I am at.
Thanks in advance!
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by so...@gmail.com.
> I am trying to create a Site Map (or Table of Contents for an entire site).
> I would like to make it similar to the menu with all levels and links
> displayed.
http://solprovider.com/lenya/map
> If possible, I would also like to include the information from
> H2 or H3 tags inside the pages, similar to what is described here:
> http://wiki.apache.org/lenya/HowToTableOfContents
The process in my instructions is fast enough that every page
generation can run the code. It is just XSL applied to the
Lenya-maintained sitetree.xml.
Adding the headers from each page could add tons of processing time
because you need to look at every content page. If you do, make
certain you cache the results.
The best design is to patch the sitetree maintenance process to add
header labels to sitetree.xml. XSL can add anchors to the headers in
the content pages. Minor additions to map.xsl could add the headers
and link directly to them.
solprovider
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Johnny Jones wrote:
> Gregor and solprovider, thanks for the tips. I would like to try
> Gregor's suggestion first because it is targeted more to calls of H2 tags.
maybe also helpful: http://solprovider.com/lenya/map
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by Johnny Jones <ja...@hotmail.com>.
Hi Users,
Gregor and solprovider, thanks for the tips. I would like to try Gregor's
suggestion first because it is targeted more to calls of H2 tags.
I am using the wyona.org pubs called unizh and unitemplate with 1.2.1. I
then follow instructions from
http://wiki.apache.org/lenya/ProposalXIncludeAggregation and add the
XInclude Transformer into unizh/publication-sitemap.xmap. I also create
unizh/xslt/mount-href.xslt and declaring xi:include in there. Also, inside
unizh/xslt/doctypes/xhtml-standard.xsl, I created a template called
"DefaultTemplate".
What, exactly, should I do next so that whenever I create a new document
using DefaultTemplate, the table of content will be displayed? I tried
using xi:include by entering <xsl:apply-templates select="xi:include"/>
inside the DefaultTemplat, but that seems to take no affect. I tried some
other way calling xi:include, but none seems to work. How exactly do I use
xi:include? Should I call xi:include to be able to display the table or I
have to do it in some other way, if so, can you give me some idea of what I
need to next that is not mentioned from
http://wiki.apache.org/lenya/ProposalXIncludeAggregation?
I know that the XInclude Aggregation Proposal is incomplete, but I guess
that if you directed me there to find my solution it must work somehow. But
I need more step by step instructions to get it to work to reach the
solution you suggested.
Thanks in advance for your help!
>From: "Gregor J. Rothfuss" <gr...@apache.org>
>Reply-To: user@lenya.apache.org
>To: user@lenya.apache.org
>Subject: Re: how to make site map or table of contents for entire site
>Date: Fri, 27 May 2005 14:23:17 -0400
>
>Johnny Jones wrote:
>
>>When you say, "run it through xinclude" where is the xinclude? Is it in
>>the sitemaps or is it somewhere else? For example, is it in the following
>>files:
>>lenya/pubs/blog/xslt/feed/xinclude.xsl
>>lenya/pubs/blog/xslt/archive/xinclude.xsl
>
>yeah, 1.2 has a clunkier way: it uses an xslt transform and then the xlink
>transformer. ths xinclude xslt prepares the aggregation, and the xlink
>transformer pulls it in. try it out by commenting out parts of the
>pipeline. this is the ATOM feed pipeline from the blog
>
>http://svn.apache.org/viewcvs.cgi/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/blog/sitemap.xmap?rev=170255&view=markup
>
> <map:match pattern="*/feeds/*/index.xml">
> <map:act type="resource-exists">
> <map:parameter name="url" value="content/{1}/entries"/>
>
> <map:generate type="directory" src="content/{../1}/entries">
> <map:parameter name="depth" value="4"/>
> <map:parameter name="reverse" value="true"/>
> </map:generate>
> <map:transform src="xslt/feed/xinclude.xsl">
> <map:parameter name="feedid" value="{../2}"/>
> </map:transform>
> <map:transform type="xlink">
> <map:parameter name="href" value="content/{../1}/dummy.xml"/>
> </map:transform>
> <map:serialize type="xml"/>
> </map:act>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Johnny Jones wrote:
> When you say, "run it through xinclude" where is the xinclude? Is it in
> the sitemaps or is it somewhere else? For example, is it in the
> following files:
> lenya/pubs/blog/xslt/feed/xinclude.xsl
> lenya/pubs/blog/xslt/archive/xinclude.xsl
yeah, 1.2 has a clunkier way: it uses an xslt transform and then the
xlink transformer. ths xinclude xslt prepares the aggregation, and the
xlink transformer pulls it in. try it out by commenting out parts of the
pipeline. this is the ATOM feed pipeline from the blog
http://svn.apache.org/viewcvs.cgi/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/blog/sitemap.xmap?rev=170255&view=markup
<map:match pattern="*/feeds/*/index.xml">
<map:act type="resource-exists">
<map:parameter name="url" value="content/{1}/entries"/>
<map:generate type="directory" src="content/{../1}/entries">
<map:parameter name="depth" value="4"/>
<map:parameter name="reverse" value="true"/>
</map:generate>
<map:transform src="xslt/feed/xinclude.xsl">
<map:parameter name="feedid" value="{../2}"/>
</map:transform>
<map:transform type="xlink">
<map:parameter name="href" value="content/{../1}/dummy.xml"/>
</map:transform>
<map:serialize type="xml"/>
</map:act>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by Johnny Jones <ja...@hotmail.com>.
Gregor,
Thanks again.
When you say, "run it through xinclude" where is the xinclude? Is it in the
sitemaps or is it somewhere else? For example, is it in the following
files:
lenya/pubs/blog/xslt/feed/xinclude.xsl
lenya/pubs/blog/xslt/archive/xinclude.xsl
Thanks for answering my questions - I am a bit lost regarding what files and
where to look in the files for the process of "running it through xinclude".
>From: "Gregor J. Rothfuss" <gr...@apache.org>
>Reply-To: user@lenya.apache.org
>To: user@lenya.apache.org
>Subject: Re: how to make site map or table of contents for entire site
>Date: Fri, 27 May 2005 13:53:46 -0400
>
>Johnny Jones wrote:
>
>>In the blog publication, which files and parts of files should I review?
>>In the unipublic publication, which files and parts of files should I
>>review?
>
>the sitemaps, in both cases. they show how to aggregate content from
>multiple sources, run it through xinclude, and then applying your
>stylesheet to do the TOC / map of the site
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Johnny Jones wrote:
> In the blog publication, which files and parts of files should I review?
> In the unipublic publication, which files and parts of files should I
> review?
the sitemaps, in both cases. they show how to aggregate content from
multiple sources, run it through xinclude, and then applying your
stylesheet to do the TOC / map of the site
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by Johnny Jones <ja...@hotmail.com>.
Gregor,
Thank you very much for the tips.
In the blog publication, which files and parts of files should I review?
In the unipublic publication, which files and parts of files should I
review?
Thanks!
>From: "Gregor J. Rothfuss" <gr...@apache.org>
>Reply-To: user@lenya.apache.org
>To: user@lenya.apache.org
>Subject: Re: how to make site map or table of contents for entire site
>Date: Fri, 27 May 2005 12:14:29 -0400
>
>Johnny Jones wrote:
>
>>However, the problem that I am having right now is that I was able to see
>>only headers within my current XML page, but I was not able to see header
>>from other pages. Can you give me some suggestions of what I can do so
>>that I would be able to query all of the h3 headers that I have created on
>>all pages so that I can put them into table of content?
>
>you need to aggregate all your pages into one big xml and then run your
>stylesheet over that. there are examples in the blog publication (look for
>the directory generator / xinclude) and also in the unipublic publication
>(wyona.org)
>
>also: http://wiki.apache.org/lenya/ProposalXIncludeAggregation
>(incomplete at this time)
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: how to make site map or table of contents for entire site
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Johnny Jones wrote:
> However, the problem that I am having right now is that I was able to
> see only headers within my current XML page, but I was not able to see
> header from other pages. Can you give me some suggestions of what I can
> do so that I would be able to query all of the h3 headers that I have
> created on all pages so that I can put them into table of content?
you need to aggregate all your pages into one big xml and then run your
stylesheet over that. there are examples in the blog publication (look
for the directory generator / xinclude) and also in the unipublic
publication (wyona.org)
also: http://wiki.apache.org/lenya/ProposalXIncludeAggregation
(incomplete at this time)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org