forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sjur N. Moshagen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FOR-680) The jspwiki parser renders nested lists invalid
Date Fri, 30 Sep 2005 06:39:47 GMT
    [ http://issues.apache.org/jira/browse/FOR-680?page=comments#action_12330910 ] 

Sjur N. Moshagen commented on FOR-680:
--------------------------------------

Den 29. sep. 2005 kl. 18.39 skreiv Gav....:

> Ok, yep I see,
> 
> <li> can go inside <ul>
> <ul> can then go inside <li>
> etc..
> 
> This is current xhtml1.1 valid but causes an extra unwanted li indent and 
> bullet point to appear, CSS should sort that out.

It isn't only xhtml1.1 valid, it is also the way it has always been (aside from the fact that
most/all browsers have been forgiving about sloppy coding). Here's from the HTML 2.0 DTD:

<!ELEMENT (OL|UL) - -  (LI)+>
<!ELEMENT LI    - O %flow>

And with no CSS, just default HTML formatting, the code posted originally will produce a nicely
formatted, properly indented and bulleted list, with no extra indentation, no extra bullets
(but there should be exactly one bullet for each of the LI in the nested list - by default
rendered by an open bullet, as opposed to a filled bullet for the outermost list - it is,
after all, a list within another list (item)).
 
Thus, no need to have CSS clean up or fix anything.

> Although
> 
> <ul>
> <li></li>
> <li></li>
> <ul>
> <li></li>
> </ul>
> </ul>
> 
> is nested correct syntax-wise and looks correct as output without unwanted 
> extra indents and bullet points, is invalid.

This must be a misunderstanding. It is of course correct xml syntax (no overlapping elements),
but as far as HTML and similar DTD's are concerned, this has never been the intended structure
of nested lists. And lists within a list item (as it should be), *should* have an indent and
a bullet in normal cases.

Everything is fine with the (visual) rendering:-), the *only problem is the jspwiki parsing
of nested lists*, as it produces invalid (x)html/forrestdoc1.1 documents.

> If I am now on the right track I will look and see where this can be 
> corrected, should the style sheet therefore
> hide the unwanted extra indent etc or not ?

I would assume that the bug is in the jspwiki parser somewhere (and there are other bugs there
as well, as documented elsewhere, both by the author of the jspwiki parser and by issues in
Jira).

> The jspwiki parser renders nested lists invalid
> -----------------------------------------------
>
>          Key: FOR-680
>          URL: http://issues.apache.org/jira/browse/FOR-680
>      Project: Forrest
>         Type: Bug
>   Components: Plugin: Wiki
>     Versions: 0.7
>  Environment: MacOS X 10.4.2, Java 1.4.2
>     Reporter: Sjur N. Moshagen

>
> Lists within lists are parsed into an invalid structure. The following input:
> !!!Test title
> Test list:
> * li1
> * li2
> ** li2a
> ** li2b
> ** li2c
> * li3
> comes out as the following xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
> <document>
> <header>
> <title>test</title>
> </header>
> <body>
> <section>
> <title>Test title</title>
> <p>Test list: </p>
>   <ul>
>     <li>li1 </li>
>     <li>li2 </li>
>       <ul>
>         <li>li2a </li>
>         <li>li2b </li>
>         <li>li2c </li>
>       </ul>
>     <li>li3 </li>
>   </ul>
> </section>
> </body>
> </document>
> Note that the inner <ul> is not within the preceding <li> as required by
the dtd, but inserted between to <li>s.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message