You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Sjur N. Moshagen (JIRA)" <ji...@apache.org> on 2006/06/15 17:12:30 UTC

[jira] Updated: (FOR-680) The jspwiki parser renders nested lists invalid

     [ http://issues.apache.org/jira/browse/FOR-680?page=all ]

Sjur N. Moshagen updated FOR-680:
---------------------------------

    Attachment: wiki-update-diff.txt

Gavin was on the right track with his last comment. Here's a patch that fixes the issue - all nested lists are now correctly nested.

It also replaces the horisontal bar (----) with a real <hr/> (it used to be a long line of dashes).

> 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: input.wiki
>     Versions: 0.7
>  Environment: MacOS X 10.4.2, Java 1.4.2
>     Reporter: Sjur N. Moshagen
>  Attachments: wiki-update-diff.txt
>
> 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


Re: [jira] Updated: (FOR-680) The jspwiki parser renders nested lists invalid

Posted by Sjur Moshagen <sj...@mac.com>.
Den 16. jun. 2006 kl. 17.13 skrev Ross Gardler:

> Don't be sorry, we all make mistakes. As I did in testing your  
> patch before applying it. We value your contribution even if not  
> 100% correct.

Thanks:-)

> I'll leave it as is for now since you say you are working on a  
> solution, however, I will reopen the issue so that you can attach  
> patches there. If you get distracted with something else let us  
> know and we will roll back the commit until you have more time.

I fixed it - and I have tested it extensively and systematically this  
time:-)

The working solution required a slightly different angle than my  
original patch: instead of targeting the wanted element, I needed to  
target the next sibling, and filtering out the unwanted ones (i.e.  
the regular list items on the same level). See the patch for details.

I have also included an updated status.xml in the patch.

The patch will soon arrive in JIRA.

Sjur


Re: [jira] Updated: (FOR-680) The jspwiki parser renders nested lists invalid

Posted by Ross Gardler <rg...@apache.org>.
Sjur Moshagen wrote:
> Den 16. jun. 2006 kl. 01.49 skrev Gav....:

...

> Unfortunately, I was happy too early. It turns out that my solution  
> isn't working. Although lists are now nested properly inside each  other 
> the way they should, some list items are repeated several  times. I'm 
> sorry I didn't test my solution properly before sending in  the patch - 
> I'm working on a correction now, but I don't know when  I'm able to 
> finish it.

Don't be sorry, we all make mistakes. As I did in testing your patch 
before applying it. We value your contribution even if not 100% correct.

> You may consider rolling back my patch, since the previous, non- 
> conformant structure behaved well in all other respects.

I'll leave it as is for now since you say you are working on a solution, 
however, I will reopen the issue so that you can attach patches there. 
If you get distracted with something else let us know and we will roll 
back the commit until you have more time.

Ross

Re: [jira] Updated: (FOR-680) The jspwiki parser renders nested lists invalid

Posted by Sjur Moshagen <sj...@mac.com>.
Den 16. jun. 2006 kl. 01.49 skrev Gav....:

>> Gavin was on the right track with his last comment. Here's a patch  
>> that
>> fixes the issue - all nested lists are now correctly nested.
>
> Cool! Good solution, apologies I never got back to this one.

No problem.

Unfortunately, I was happy too early. It turns out that my solution  
isn't working. Although lists are now nested properly inside each  
other the way they should, some list items are repeated several  
times. I'm sorry I didn't test my solution properly before sending in  
the patch - I'm working on a correction now, but I don't know when  
I'm able to finish it.

You may consider rolling back my patch, since the previous, non- 
conformant structure behaved well in all other respects.

Best,
Sjur


RE: [jira] Updated: (FOR-680) The jspwiki parser renders nested lists invalid

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: Sjur N. Moshagen (JIRA) [mailto:jira@apache.org]
> Sent: Thursday, 15 June 2006 11:13 PM
> To: dev@forrest.apache.org
> Subject: [jira] Updated: (FOR-680) The jspwiki parser renders nested lists
> invalid
> 
>      [ http://issues.apache.org/jira/browse/FOR-680?page=all ]
> 
> Sjur N. Moshagen updated FOR-680:
> ---------------------------------
> 
>     Attachment: wiki-update-diff.txt
> 
> Gavin was on the right track with his last comment. Here's a patch that
> fixes the issue - all nested lists are now correctly nested.

Cool! Good solution, apologies I never got back to this one.

Gav...

> 
> It also replaces the horisontal bar (----) with a real <hr/> (it used to
> be a long line of dashes).
> 
> > 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: input.wiki
> >     Versions: 0.7
> >  Environment: MacOS X 10.4.2, Java 1.4.2
> >     Reporter: Sjur N. Moshagen
> >  Attachments: wiki-update-diff.txt
> >
> > 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
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.9.0/366 - Release Date: 6/15/2006