forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Tulukin" <g...@iteclectic.com>
Subject Re: search engine friendly skins
Date Thu, 16 Dec 2004 23:31:37 GMT
A fix how to have window title separate from the doc title and associate
meta data with the xdoc.

These are steps I did (and it works)

1. In my xdoc index.xml I added some metas:

<document>
    <header>
        <title>This is going to be the Document Title in mainarea</title>
        <meta name="window-title">Window Title Mahalia Jackson keyword1
keyword2 keyword2 </meta>
        <meta name="keywords">keyword1 keyword2 keyword2</meta>
    </header>
    <body>
    ...

2. In my document2html.xsl I added
  <xsl:template match="document">
    <meta-data>
     <window-title><xsl:value-of
select="header/meta[@name='window-title']"/></window-title>
       <keywords><xsl:value-of
select="header/meta[@name='keywords']"/></keywords>
    </meta-data>
    <div class="content">
    ...

and it renders
to HTML.  It renders XML as HTML in this form:

   <meta-data>
    ...
   </meta-data>
  <div class="content">
   ...
  </div>

vs. the <div> only

3. in my site2xhtml.xsl
    <html>
      <head>
        <!-- old title:
        <title><xsl:value-of
select="div[@class='content']//div[@id='apphead']/h2/em"/></title>
        -->
        <title><xsl:value-of select="meta-data/window-title"/></title>
        ...

        <!-- TODO: add meta/keywords although search engines mainly ignore
it -->
      </head>
    ...

As input site2html gets
<site>
  <class="menu"> ...
  <class="tab"> ...
  <meta-data> ...
  <class="content"> ...
</site>

Advantages:
1. We can have meta-data associated with a doc.
2. Meta-data separated from the content. Design is cleaner. Now after
document2html we have almost html and then we PARSE the html we just
generated ourselves:
        <title><xsl:value-of
select="div[@class='content']//div[@id='apphead']/h2/em"/></title>,
suggested <title><xsl:value-of select="meta-data/window-title"/></title>
is cleaner and more efficient (no double-slash // which is a big no-no in
xslt transformation like goto in Java)

I am working on the keyword report I outlined in my prev emails and will
post update soon.
Glen



"Thorsten Scherler" <thorsten@apache.org> wrote in message
news:1103186520.3443.8.camel@gci...
> El jue, 16-12-2004 a las 02:39, Ross Gardler escribió:
> > Glen Tulukin wrote:
> > >>>- SE - friendly generated linkmap.xml. Usually it's not a good idea
to
> > >>>submit home page to yahoo, it should be well-thought site map (what
> > >
> > > other
> > >
> > >>>non-Cocoon people understand under site map)
> > >>
> > >>What is the difference between your proposed linkmap.xml and the
existing
> > >
> > > linkmap.xml?
> > > SE rates a link depending on the surrounding context. I suggest to put
> > > keywords next to the link to increase rating. So each link will have
> > > meaningful context. For a human being to see links with keywords may
be not
> > > the best document but the proposed linkmap is intended for SEs.
> >
> > Would it be possible to enhance the existing linkmap to do this? Does it
> > make sense to have a separate one?
> >
>
> Yeah, should be easy as well. I reckon it is basicly a special
> transformation (XSLT) of the existing linkmap IMO.
> --
> thorsten
>
> "Together we stand, divided we fall!"
> Hey you (Pink Floyd)
>
>




Mime
View raw message