Merge lp:~leonardr/launchpadlib/bug-286941 into lp:launchpadlib
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2010-07-12 |
| Approved revision: | 91 |
| Merged at revision: | 91 |
| Proposed branch: | lp:~leonardr/launchpadlib/bug-286941 |
| Merge into: | lp:launchpadlib |
| Diff against target: |
131 lines (+38/-20) 3 files modified
src/launchpadlib/NEWS.txt (+6/-0) src/launchpadlib/__init__.py (+1/-1) src/launchpadlib/wadl-to-refhtml.xsl (+31/-19) |
| To merge this branch: | bzr merge lp:~leonardr/launchpadlib/bug-286941 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | code | 2010-07-12 | Approve on 2010-07-12 |
| LAZR Developers | 2010-07-12 | Pending | |
|
Review via email:
|
|||
Description of the Change
This branch improves the XSLT stylesheet to fix bug 286941 and some related bugs we didn't notice.
The XSLT stylesheet, forged in the earliest days of Launchpad, divides the web service into "top-level collections" and "entry types". However, "top-level collections" are now only part of the story. There are two top-level objects which are not collections: 'me' and 'pillars'. 'me' is a person, and 'pillars' is a special pillars object.
I changed the XSLT stylesheet to refer to top-level objects instead of top-level collections. However, there was a more serious problem: Since the display name of a top-level 'collection' was taken from the resource type instead of the link name, the 'me' object was showing up as 'person', not 'me'. I changed the XSLT to get the display names using an algorithm similar to the one used by launchpadlib (chop off '_link' or '_collection_link' from the name). Now 'me' shows up as a person-type object, which is good enough for now.

This looks good to land.