#882 html: Broken output if copyright <year> contains a range

output: HTML
closed-fixed
XSL (1066)
5
2009-03-18
2007-02-27
No

If the <year> element contains something like

<year>2000,2001,2002</year>
<year>2000-2002</year>

then the resulting HTML file will show:

2000,2001,2002-NaN
2000-2002-NaN

This doesn't look like intended output.

Discussion

  • Daniel Leidert

    Daniel Leidert - 2007-02-27
    • summary: Broken output of copyright years, if <year> contains a range --> HTML: Broken output if copyright <year> contains a range
     
  • Daniel Leidert

    Daniel Leidert - 2007-02-27
    • summary: HTML: Broken output if copyright <year> contains a range --> html: Broken output if copyright <year> contains a range
     
  • Robert Stayton

    Robert Stayton - 2007-02-28
    • assigned_to: nobody --> bobstayton
     
  • Robert Stayton

    Robert Stayton - 2007-02-28

    Logged In: YES
    user_id=193218
    Originator: NO

    Actually, this is a documentation problem. You turned on the make.year.ranges stylesheet parameter, but that only works when you put each year into a separate year element, which is permitted by the copyright element:

    <copyright>
    <year>2000</year>
    <year>2001</year>
    <year>2002</year>
    ...

    When that parameter is set, these elements are handled as numbers and ranges can be computed. The parameter does not parse a complex year element to reform it into ranges.

    So either enter your range literally and turn off make.year.ranges, or enter multiple year elements and turn on make.year.ranges. The doc will be fixed.

     
  • Daniel Leidert

    Daniel Leidert - 2007-03-06

    Logged In: YES
    user_id=1102637
    Originator: YES

    Thanks for the explanation. This was already my understanding of the parameter. But in this special case, I have a DocBook XML, that inbounds several XML files from third parties and their use of the <year> tag is different.

    So I would like to request a more robust handling of the <year> tag in such a case. What about a check, if the <year> tag contains "-" or "," if yes, simply don't try to compute a range for this element (leave them as is), even if that means, that something like

    <year>1996</year>
    <year>1997</year>
    <year>1998</year>
    <year>2000-2002</year>
    <year>2003,2004</year>
    <year>2005</year>
    <year>2006</year>
    <year>2007</year>

    1996-1998,2000-2002,2003,2004,2005-2007

    will be output?

     
  • Robert Stayton

    Robert Stayton - 2009-02-27

    A fix for this issue has been added to the current codebase.
    Please test the fix with the latest snapshot from:

    http://docbook.sourceforge.net/snapshots/

     
  • Robert Stayton

    Robert Stayton - 2009-02-27
    • status: open --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks