| Summary: | [api] provide API for converting content to wiki markup | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | David Green <greensopinion> | ||||
| Component: | Mylyn | Assignee: | David Green <greensopinion> | ||||
| Status: | RESOLVED FIXED | QA Contact: | David Green <greensopinion> | ||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | milesparker, torkildr | ||||
| Version: | unspecified | Keywords: | api, noteworthy, plan | ||||
| Target Milestone: | 1.6.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 368066 | ||||||
| Bug Blocks: | 348298 | ||||||
| Attachments: |
|
||||||
|
Description
David Green
pushed commit e600cfbb5cc970a65b5dca509027a5f82411760d new API introduced: * @org.eclipse.mylyn.wikitext.core.parser.HtmlParser@ - parses XHTML and drives the DocumentBuilder API * @org.eclipse.mylyn.wikitext.textile.core.TextileDocumentBuilder@ - emits content as Textile markup Created attachment 203097 [details]
mylyn/context/zip
David, not sure what you're planning to use for parser, but JSoup is really nice to use, especially for wonky html. The changes broke the build on 3.5. I think you need to depend on org.junit4 (3.5 ships version 4.5.0) if you want to use org.junit.Assert instead of junit.framework.Assert. [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.12.0:compile (default-compile) on project org.eclipse.mylyn.wikitext.tests: Compilation failure: Compilation failure: [ERROR] /opt/users/hudsonbuild/workspace/mylyn-integration-e3.5/org.eclipse.mylyn.docs/org.eclipse.mylyn.wikitext.tests/src/org/eclipse/mylyn/wikitext/textile/core/TextileDocumentBuilderTest.java (at line 23):[-1,-1] [ERROR] import org.junit.Assert; [ERROR] ^^^^^^^^^ [ERROR] The import org.junit cannot be resolved [ERROR] Thanks Miles, JSoup looks great! The current implementation in WikiText is using SAX, which has some obvious shortcomings (such as requiring that the source input be well-formed XML). We're looking for a more reliable parsing solution. JSoup related links: * http://jsoup.org/ * "MIT License":http://jsoup.org/license Another advantage is that the selector interface and other API features makes parsing much less nicer than using the IMO very fiddly DOM API. http://jsoup.org/cookbook/extracting-data/selector-syntax (In reply to comment #6) > Another advantage is that the selector interface and other API features makes > parsing much less nicer than using the IMO very fiddly DOM API. > http://jsoup.org/cookbook/extracting-data/selector-syntax "much less nicer" -> "much nicer" :) Filed "CQ 5559":https://dev.eclipse.org/ipzilla/show_bug.cgi?id=5559 CQ has been approved. The next step is to get jsoup into orbit. I updated the poms to use the latest Orbit S-build and added jsoup to the target definitions. You should be able to consume it in WikiText now. Thanks Steffen. implemented. In case you didn't notice, a few tests are now failing on the build server: https://hudson.eclipse.org/hudson/job/mylyn-docs-nightly/. These are now fixed. I added the jsoup bundle to the WikiText SDK to ensure that it gets published to the update site. Great, thanks |