forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Dixon (JIRA)" <>
Subject [jira] Commented: (FOR-448) Faulty treatment of a-Elements in html-pipeline
Date Thu, 24 Aug 2006 20:16:32 GMT
    [ ] 
Jim Dixon commented on FOR-448:

The original problem report contains at least one minor error.  There are a number of anchors
in the page.  The second of these has as text "Anchor 2" but the anchor element is misleadingly
labelled with 
  href = "#anchor1"

The problem reported arises for two reasons.  First, the template handling anchors in html-to-document.xsl
allows both the name and href attributes whereas they should be alternatives.  The correction
is to replace two IF elements with a CHOOSE with two WHENs, with the href attribute preferred,
so that badly written HTML will be silently corrected (that is, if both name and href attributes
are present, the name attribute will be discarded).

Secondly, the template attempts to add an ID attribute, apparently in order to add the named
anchor to the table of contents.  This is an error (Sablotron rejects the original stylesheet)
and anyway appears to be confused: generally speaking, adding named anchors to the TOC will
simply confuse it.

> Faulty treatment of a-Elements in html-pipeline
> -----------------------------------------------
>                 Key: FOR-448
>                 URL:
>             Project: Forrest
>          Issue Type: Bug
>          Components: Core operations
>    Affects Versions: 0.7
>         Environment: Windows XP SP2
>            Reporter: Ferdinand Soethe
>         Attachments:, html-to-document.xml.diff
> After noticing that anchor elements in html-files got lost in the Forrest default pipeline,
I did some test with a sample document (before and after are included) and found that named
anchors either get completely lost or messed up pretty bad. Even text within them is sometimes
> The lines refer to original and translated file.
> Original     Translated   Looks   Function
>   line          line
> ------------------------------------------
>    16            157       ok       gone     
>    <a> element is completely lost
>    22            162       bad       ok      
>    there are now 2 <a> elements
>    <a name="anchor2"></a>Anchor 2<a href="#anchor1">Anchor 2</a>
>    and unfortunately twice the text!
>    29            166       ok       gone
>    <a> element is completely lost
>    35            171       bad      gone
>    <a> element and text within it is completely lost!
>    42            176       ok       gone 
>    <a> element is completely lost
>    49            181       ok       gone
>    <a> element is completely lost  

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message