You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-dev@perl.apache.org by Bill Moseley <mo...@hank.org> on 2002/04/14 17:01:56 UTC

Re: a few search issues

Hi Stas,

I'm confused about the way docset is generating links.

I see this now:


(for example: docs/1.0/guide/Changes.html#04_17_1999_ver_1_09)


    <div class="index-section">
    <!-- SwishCommand index -->
    <h1><a name="Description"></a>
    <a href="#toc_Description">Description</a></h1>

Where it used to be:

    <div class="index-section">
    <!-- SwishCommand index -->
    <h1><a name="Description">Description</a></h1>

The second is a lot easier to parse, of course, with:

$section->look_down( 
     '_tag', 'a', sub { defined($_[0]->attr('name')) } );

because I can grab the link for building the URL fragment from the name
attribute, and grab the text to use for the title from the content of that
*same* tag.

There's a [^ Top] widget in every section, so I don't see the need for the
titles to be links.  I think that's over-linking, frankly.  (And it breaks
my parsing ;)

I don't think it's that intutitive that if you click on a title you get
back to the TOC.  Normally people go from the TOC to the content, not the
other way around.

I can look for an <h1> tag, then look for the name attribute then look for
the next <a> tag.  That coding isn't a problem, I'd think.  But I really
don't see the need for that level of back linking.  Sorry if I missed the
discussion on that.


-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> At 11:22 PM 04/14/02 +0800, Stas Bekman wrote:
> 
> It was like this before, no?
> 
>      <h1><a name="Description">Description</a></h1>
> 
> Remember, I was first grabbing the text to use for the sub-title from the
> name attribute and s/_/ /g; Then I moved to using the real text of the link
> after we discussed it.  I think.

ok

>>This is an experimental new feature. It's not final. Give it a try you 
>>may find it useful. And it's not over-linking, because it's doesn't 
>>change anything at all on the visual front. Those who discover this 
>>feature, may find it very useful. I'm already starting to like it.
> 
> 
> Ok, but when that link changes then the indexing parse code breaks.
> 
> Is it safe to find the sections and titles like this now?
> 
> to get the title look for <h1> then the first <a name> is the link to this
> section and the second <a> content is the text to use for the sub-title
> description?

All you need to is to find <a> within <hX> and having a 'name' attr and 
get its value.
Yes, I think this should be pretty safe. Since it's autogenerated and 
used in the TOC.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Bill Moseley <mo...@hank.org>.
At 11:22 PM 04/14/02 +0800, Stas Bekman wrote:

It was like this before, no?

     <h1><a name="Description">Description</a></h1>

Remember, I was first grabbing the text to use for the sub-title from the
name attribute and s/_/ /g; Then I moved to using the real text of the link
after we discussed it.  I think.

>This is an experimental new feature. It's not final. Give it a try you 
>may find it useful. And it's not over-linking, because it's doesn't 
>change anything at all on the visual front. Those who discover this 
>feature, may find it very useful. I'm already starting to like it.

Ok, but when that link changes then the indexing parse code breaks.

Is it safe to find the sections and titles like this now?

to get the title look for <h1> then the first <a name> is the link to this
section and the second <a> content is the text to use for the sub-title
description?


-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> Hi Stas,
> 
> I'm confused about the way docset is generating links.
> 
> I see this now:
> 
> 
> (for example: docs/1.0/guide/Changes.html#04_17_1999_ver_1_09)
> 
> 
>     <div class="index-section">
>     <!-- SwishCommand index -->
>     <h1><a name="Description"></a>
>     <a href="#toc_Description">Description</a></h1>
> 
> Where it used to be:
> 
>     <div class="index-section">
>     <!-- SwishCommand index -->
>     <h1><a name="Description">Description</a></h1>
> 
> The second is a lot easier to parse, of course, with:
> 
> $section->look_down( 
>      '_tag', 'a', sub { defined($_[0]->attr('name')) } );
> 
> because I can grab the link for building the URL fragment from the name
> attribute, and grab the text to use for the title from the content of that
> *same* tag.

Nothing has changed in that respect. The <a name="Description"></a> is 
just as before, no? You want the 'name' attribute for linking. And it 
didn't change.

> There's a [^ Top] widget in every section, so I don't see the need for the
> titles to be links.  I think that's over-linking, frankly.  (And it breaks
> my parsing ;)
> 
> I don't think it's that intutitive that if you click on a title you get
> back to the TOC.  Normally people go from the TOC to the content, not the
> other way around.

This is an experimental new feature. It's not final. Give it a try you 
may find it useful. And it's not over-linking, because it's doesn't 
change anything at all on the visual front. Those who discover this 
feature, may find it very useful. I'm already starting to like it.

> I can look for an <h1> tag, then look for the name attribute then look for
> the next <a> tag.  That coding isn't a problem, I'd think.  But I really
> don't see the need for that level of back linking.  Sorry if I missed the
> discussion on that.

Yes, we had a long discussion, see the archives.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> At 10:15 PM 04/15/02 +0800, Stas Bekman wrote:
> 
>>Bill Moseley wrote:
>>
>>>At 11:51 AM 04/15/02 +0800, Stas Bekman wrote:
>>>
>>>
>>>>>Should the radio buttons be removed at the top level when there's no "this
>>>>>section"?
>>>>
>>>>Searching for 'this section' at / is the same  as searching for 'the 
>>>>whole', so it doesn't matter. And consistency is preserved.
>>>
>>>
>>>Yes, it's consistent, but it's giving the same options for both, really.
>>>It's basically saying on the root page:
>>>
>>>  _ Search this section
>>>  _ Search this section
>>>
>>>
>>>I think it would be nice if it said [Search the "docs" section], depending
>>>on which page the user is on, so it's clear.

Agreed, but it's not "feasible" since certain pages have very long 
titles. That's why we don't
have the titles for prev and next, which were originally there.


-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Bill Moseley <mo...@hank.org>.
At 10:15 PM 04/15/02 +0800, Stas Bekman wrote:
>Bill Moseley wrote:
>> At 11:51 AM 04/15/02 +0800, Stas Bekman wrote:
>> 
>>>>Should the radio buttons be removed at the top level when there's no "this
>>>>section"?
>>>
>>>Searching for 'this section' at / is the same  as searching for 'the 
>>>whole', so it doesn't matter. And consistency is preserved.
>> 
>> 
>> Yes, it's consistent, but it's giving the same options for both, really.
>> It's basically saying on the root page:
>> 
>>   _ Search this section
>>   _ Search this section
>> 
>> 
>> I think it would be nice if it said [Search the "docs" section], depending
>> on which page the user is on, so it's clear.
>> 
>> On the top page it's basically saying:
>
>what was the end of the email it didn't make it...


The end was that line above I forgot to trim before hitting send.


-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> At 11:51 AM 04/15/02 +0800, Stas Bekman wrote:
> 
>>>Should the radio buttons be removed at the top level when there's no "this
>>>section"?
>>
>>Searching for 'this section' at / is the same  as searching for 'the 
>>whole', so it doesn't matter. And consistency is preserved.
> 
> 
> Yes, it's consistent, but it's giving the same options for both, really.
> It's basically saying on the root page:
> 
>   _ Search this section
>   _ Search this section
> 
> 
> I think it would be nice if it said [Search the "docs" section], depending
> on which page the user is on, so it's clear.
> 
> On the top page it's basically saying:

what was the end of the email it didn't make it...


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Bill Moseley <mo...@hank.org>.
At 11:51 AM 04/15/02 +0800, Stas Bekman wrote:
>> Should the radio buttons be removed at the top level when there's no "this
>> section"?
>
>Searching for 'this section' at / is the same  as searching for 'the 
>whole', so it doesn't matter. And consistency is preserved.

Yes, it's consistent, but it's giving the same options for both, really.
It's basically saying on the root page:

  _ Search this section
  _ Search this section


I think it would be nice if it said [Search the "docs" section], depending
on which page the user is on, so it's clear.

On the top page it's basically saying:



-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> At 02:45 AM 04/15/02 +0800, Stas Bekman wrote:
> 
>>yup, seems to work :) a great idea, Bill. Committed, currently updating 
>>apache.org.
>>
>>Thanks a bunch. (you just didn't want to change the parser, do you? :)
> 
> 
> ;)
> 
> Should the radio buttons be removed at the top level when there's no "this
> section"?

Searching for 'this section' at / is the same  as searching for 'the 
whole', so it doesn't matter. And consistency is preserved.

> <td><input type="radio" name="sbm" value="" checked></td>
> <td class="radio-font">This section</td>



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Bill Moseley <mo...@hank.org>.
At 02:45 AM 04/15/02 +0800, Stas Bekman wrote:
>yup, seems to work :) a great idea, Bill. Committed, currently updating 
>apache.org.
>
>Thanks a bunch. (you just didn't want to change the parser, do you? :)

;)

Should the radio buttons be removed at the top level when there's no "this
section"?

<td><input type="radio" name="sbm" value="" checked></td>
<td class="radio-font">This section</td>


-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> At 02:39 AM 04/15/02 +0800, Stas Bekman wrote:
> 
>>Bill Moseley wrote:
>>
>>>At 08:01 AM 04/14/02 -0700, Bill Moseley wrote:
>>>
>>>
>>>>  <h1><a name="Description"></a>
>>>>  <a href="#toc_Description">Description</a></h1>
>>>
>>>
>>>Why not:
>>>
>>><h1>
>>>   <a name="foo" href="#toc_foo">foo</a>
>>></h1>
>>
>>Can you do that? I've never seen such a thing before. Is it a valid HTML?
> 
> 
> http://hank.org:5000/test2.html.
> 
> 

yup, seems to work :) a great idea, Bill. Committed, currently updating 
apache.org.

Thanks a bunch. (you just didn't want to change the parser, do you? :)



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Bill Moseley <mo...@hank.org>.
At 02:39 AM 04/15/02 +0800, Stas Bekman wrote:
>Bill Moseley wrote:
>> At 08:01 AM 04/14/02 -0700, Bill Moseley wrote:
>> 
>>>   <h1><a name="Description"></a>
>>>   <a href="#toc_Description">Description</a></h1>
>> 
>> 
>> Why not:
>> 
>> <h1>
>>    <a name="foo" href="#toc_foo">foo</a>
>> </h1>
>
>Can you do that? I've never seen such a thing before. Is it a valid HTML?

http://hank.org:5000/test2.html.


-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Stas Bekman <st...@stason.org>.
Bill Moseley wrote:
> At 08:01 AM 04/14/02 -0700, Bill Moseley wrote:
> 
>>   <h1><a name="Description"></a>
>>   <a href="#toc_Description">Description</a></h1>
> 
> 
> Why not:
> 
> <h1>
>    <a name="foo" href="#toc_foo">foo</a>
> </h1>

Can you do that? I've never seen such a thing before. Is it a valid HTML?

If so, I'll of course change it this way and we have this problem solved.



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re: a few search issues

Posted by Bill Moseley <mo...@hank.org>.
At 08:01 AM 04/14/02 -0700, Bill Moseley wrote:
>    <h1><a name="Description"></a>
>    <a href="#toc_Description">Description</a></h1>

Why not:

<h1>
   <a name="foo" href="#toc_foo">foo</a>
</h1>


-- 
Bill Moseley
mailto:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org