{"id":1852,"date":"2011-03-17T14:54:00","date_gmt":"2011-03-17T14:54:00","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/2011\/03\/17\/i-started-using-eruby-to-create-jasperreport-jrxml-files\/"},"modified":"2011-03-17T14:54:00","modified_gmt":"2011-03-17T14:54:00","slug":"i-started-using-eruby-to-create-jasperreport-jrxml-files","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2011\/03\/17\/i-started-using-eruby-to-create-jasperreport-jrxml-files\/","title":{"rendered":"I started using eRuby to create JasperReport JRXML files"},"content":{"rendered":"<p>\t\t\t\tAll of a sudden I knew, I would immediately need a template mechanism. During the last &#8220;Stuttgart.pm&#8221; meet-up Mason got mentioned, but I was already a little familiar with eRuby, so I gave it a try, and it was just the right thing to do. The XML file to handle got smaller and smaller and smaller \u2013 really, really nice to see.<\/p>\n<p>Update 2011-03-25:<br \/>\nA few days later I am really rather satisfied with this decision.<br \/>\nOf course: eRuby XML files are no longer clean XML, so they are not supported by any editing mode (apart from &#8220;text-mode&#8221;) in emacs, but then that&#8217;s not too terrible.<\/p>\n<p>Update 2011-04-20:<br \/>\nOf course (again) being able to deal with eRuby XML files as XML files within nxml-mode would be a charm. There are 2 obstacles to overcome:<\/p>\n<div>\n<\/div>\n<p>In order to interpolate ruby expressions into XML this syntax is used:<\/p>\n<blockquote><p>\n<span>y=&#8221;&#8221;<\/span><\/p><\/blockquote>\n<p>\nbut nxml-mode does not accept that for a legal XML attribute value.<\/p>\n<div>\n<div>\n<div>\n<div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div>\nLines starting with &#8216;%&#8217; are for ruby code, nxml-mode should \/ may consider them as comments:<\/p>\n<blockquote><p>\n<span>% y0 = 97<\/span><\/p><\/blockquote>\n<p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>All of a sudden I knew, I would immediately need a template mechanism. During the last &#8220;Stuttgart.pm&#8221; meet-up Mason got mentioned, but I was already a little familiar with eRuby, so I gave it a try, and it was just the right thing to do. The XML file to handle got smaller and smaller and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-1852","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-tS","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/1852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=1852"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/1852\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=1852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=1852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=1852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}