Next in thread → Next in month →

Re: [docbook-apps] WebHelp search results - can they be generated in context?

From
Kasun Gajasinghe <>
Date
2012-03-16T15:15:22+00:00
ID
CADg9GQZyT81+qUN25dkB2KF+nd6ZG_JQ8s1xGvvN5aw=
Thread
Re: [docbook-apps] WebHelp search results - can they be generated in context?
On Fri, Mar 16, 2012 at 7:35 PM, Xmplar <> wrote:

  
    
  
  

    The option to add a summary to WebHelp search results appears not to
    work as expected when using: phrase role="summary".

    I set this tag immediately inside each <para> and when I
    search for a word, the summary text I get will be from the *last*
    phrase element in the whole section within which is the search term
    - and not the text from the para that contains the search term.
    Further, the text within <phrase role="summary"> is generated
    in HTML files - so there needs to be either some sort of filter for
    the d:phrase template that excludes the text specified with
    @role="summary" from being propagated, or change the name of the
    element in the relevant WebHelp template (and even then, the summary
    displayed in a search must come from the para containing the found
    term).

The summary is per chapter/section; not per para. I think the documentation meant to say that the summary text for a chapter/section will be picked from a para or phrase that contain role="summary". Adding the relevant contents to abstract of the chapterinfo is a much cleaner way. But if you include a abstract, it will be in the generated html. So, yes either way there should some XSL processing and filter out the relevant content if this content shouldn't be in the generated htmls.

Regards,

--Kasun

 

    

    On 16-03-12 12:32 AM, David Cramer wrote:
    
      
      

      -----BEGIN PGP SIGNED MESSAGE-----

      Hash: SHA1

      

      Not sure if this is what you mean, but you can have it include
      brief summaries in the search results:

      

      http://snapshots.docbook.org/xsl/webhelp/docs/content/ch02s02.html

      

      "When you perform a search, the results can include brief
      summaries. These are populated in one of two ways:

      

        *

      

          By adding |role="summary"| to a |para| or |phrase| in the
      |chapter| or |section|.

      

        *

      

          By adding an |abstract| to the |chapterinfo| or |sectioninfo|
      element."

      

      Including a few words before and after the found term would be
      hard to implement with the current client-side search. You
      probably want to use a google site search for that.

      

      David

      

      

      On 3/15/12 6:35 AM, Xmplar wrote:

      > Am wondering whether it's
        possible to customise or develop WebHelp so that when invoking a
        search, the results include a few words before and after the
        search term. It seems that (say, with autoindex) at best only
        the section title within which a search term is located will be
        displayed as a search result.

        > Is it possible to get search term results linking to the
        actual search term?

        > -- 

        > *Dave Gardiner*

        >

      

      -----BEGIN PGP SIGNATURE-----

      Version: GnuPG/MacGPG2 v2.0.17 (Darwin)

      Comment: GPGTools - http://gpgtools.org

      Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

      

      iQEcBAEBAgAGBQJPYe9aAAoJEMHeSXG7afUh2/kH/0tX0YmTgXIOzfzqIkIz3Oa5

      9Ha+cC1EYL9ZlMrlDBn7ztB80SsXRqDfc0SMRogbupmCi85yR1NJzGtK4tHAw9au

      hDR7zYV9Cjnx4enBkJIN0yd6vJhn77n4WhBfe2rVOAGw7FyubLKPasIjnzpUcZKo

      cLveyZkgnlTBkcP7AaTrbPLjm7FPmrQ5HG+23En4d1QaRAkSB5uQh4zIvVtC30o7

      KK7p8lGktLgQ3eutekyzYpLiCTt2W/Wy6Br+gw8PryrBhVyL/eNEJSPlNLn8yh6B

      OOmk1L1OGLstPpYek+u3KZpw/pv37ahncBWX7YoGy4skJ+cV5Q1kepxBf3VWhPk=

      =gf1P

      -----END PGP SIGNATURE-----

      

    
    

    

-- 

      Dave Gardiner

      

    

  

-- 
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe
Software Engineer; WSO2 Inc.; http://wso2.com,

linked-in: http://lk.linkedin.com/in/gajasinghe

blog: http://blog.kasunbg.org

 

twitter: http://twitter.com/kasunbg
Next in thread → Next in month →