The Drupal 6 module XML display (karljohann@git.drupal.org:sandbox/karljohann/1307164.git) takes XML from any URL and transforms it via XSLT.

It can be useful, for example, in the following cases:

  • Displaying XML information like weather, currency or the likes that there is no point in making into a node.
  • Displaying XML informtaion from something that is not a RSS formed XML. (Generally the Feeds module and Feeds XPath Parser are better for XML that should be turned into nodes. Another module to consider is XML Views)
  • When the developer really, really, really likes XSLT. However uncommon that might be.

The user enters a path and some xsl and a block is created that can be used.

CommentFileSizeAuthor
#1 coder-result.txt12.21 KBklausi

Comments

klausi’s picture

Status: Needs review » Needs work
StatusFileSize
new12.21 KB

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.

misc’s picture

@karljohann has been contacted to ask if the application is abandoned.

After ten weeks with a status of needs work: the applicant may be contacted by a reviewer to determine whether the application was indeed abandoned. The action taken by the reviewer should be documented in the project application issue.

http://drupal.org/node/894256

misc’s picture

Status: Needs work » Closed (won't fix)

The application has been closed. If you would like to reopen it, you are free to do so.
See http://drupal.org/node/894256#abandonedtwoweekscontact

karljohann’s picture

Status: Closed (won't fix) » Needs review
anwar_max’s picture

Status: Needs review » Needs work

Hi karljohann,

Manual Review:
1) Remove unnecessary comments from xml_display_uninstall() function.

Please take a moment to make your project page follow tips for a great project page.

please get a review bonus first. Then try to fix issues raised by automated review tools and set this back to "needs review".

karljohann’s picture

Status: Needs work » Needs review
robinvdvleuten’s picture

Status: Needs review » Needs work

Automated Review:
No issues found here.

Manual Review:

  • Why have you used the function trigger_error on line 99? You can better set a status message or something else to inform the user and create a watchdog log entry.
  • In your admin form, you don't have to add the submit and validation functions if they have the same name as the original form with _submit and _validate added.
karljohann’s picture

Status: Needs work » Needs review

Thanks for the review. The points have been taken and fixed.

_wdm_’s picture

Status: Needs review » Needs work

Automated Review:
Your "xmlt_perm" function should be call xml_display_perm.

Manual Review:
Also on your "xmlt_perm" function, the comment on that function is a bit of a mess (you have extra *s).

In your "xml_display_cache_xml" function:
if (is_null($block_content[$i]['xml']) OR (time() - $block_content[$i]['elapsed_time']) > $block_content[$i]['last_update']) {
$block_content is never set.
$i is never set.

karljohann’s picture

Status: Needs work » Needs review

Silly copy/paste mistakes. Thank you for that.

xenophyle’s picture

Hi karljohann,

I think instead of using xml_display_edit_form_validate() for checking the xsl field you can use the #required attribute on that field.

You can read about how to document your code here: http://drupal.org/node/1354, particularly for the form-related functions in xml_display.admin.inc.

I don't think xml_display_admin_delete_submit() actually implements hook_delete, so the function description should be changed.

Can you suggest one or more urls that contain xml we can use to test the module?

Thanks

karljohann’s picture

Thanks for the review.

I've changed the code and comments according to your recommendations.

You could try this for example: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.b...'Chicago'%20and%20unit%3D'c'%3B&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys

xenophyle’s picture

Status: Needs review » Needs work

Hi karljohann,

In xml_display_schema(), the key 'primary key' and its value need to be lower case.

When I try to view the block, I get the error "Class 'XsltProcessor' not found in /sites/all/modules/contrib/xml_display/xml_display.module". You should indicate what needs to be done to make this class available, like download some library or install a php function.

karljohann’s picture

Fixed the uppercase...

Oh yeah, I forgot that XSL isn't installed by default! (http://www.php.net/manual/en/book.xsl.php)

I will mention the requirement.

karljohann’s picture

Status: Needs work » Needs review

Great, I forgot to change status ...

sreynen’s picture

Title: XML display » [D6] XML display
karljohann’s picture

So... any chance of this project getting approved any time soon? Believe it or not, Drupal 6 was still relevant when I posted this project!

jcaustin98’s picture

Assigned: Unassigned » jcaustin98

Reviewing

jcaustin98’s picture

Assigned: jcaustin98 » Unassigned
Status: Needs review » Needs work

Installed this on simplytest.me.
When to /admin/build/block to add the block and got the following error:

Invalid argument supplied for foreach() in /home/s31d63081dbbb370/www/sites/default/modules/1307164/xml_display.module on line 76.

You have no default definition of $block_content, so if no database records are found it fails.

The block does not appear in list to add.

karljohann’s picture

Status: Needs work » Needs review

OK thanks, fixed that.

karljohann’s picture

Status: Needs review » Reviewed & tested by the community
sreynen’s picture

Status: Reviewed & tested by the community » Needs review

Sorry, karljohann, you can't mark your own application as reviewed. Hopefully someone will be able to do another review soon, and you can help reduce the wait by reviewing other applications in the queue.

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

Looks pretty good, RTBC from me.

One minor point, instead of $block['subject'] = t("xml_display $delta is Empty"); the proper way to use t() is: $block['subject'] = t('xml_display %delta is Empty', array('%delta' => $delta);.

----
Top Shelf Modules - Enterprise modules from the community for the community.

mlncn’s picture

Status: Reviewed & tested by the community » Needs work

Thanks klausi and anwar_max for reviews, and _wdm_, robinvdvleuten, xenophyle, and jcaustin98 for reviews remarkable for their directly applicable recommendations (and good work karljohann for directly applying them!)

karljohann, correct your t() code per kscheirer's suggestion (why does the block subject have the module machine name in it incidentally?) and i'll make you a full project maintainer straight away.

karljohann’s picture

Status: Needs work » Needs review
kscheirer’s picture

Status: Needs review » Fixed

Looks like karljohann committed that fix here: http://drupalcode.org/sandbox/karljohann/1307164.git/commitdiff/26edbb58....
I see you have the XSL requirement on the project page, could you implement a hook_requirements() as well?

I agree with mlncn, this module is ready. Thanks for being patient and working with us karljohann.

Thanks for your contribution, karljohann!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.