1 |
use strict; |
2 |
package SuikaWiki::Plugin::Registry; |
3 |
|
4 |
|
5 |
our %Info; |
6 |
$Info{q#ExternalEmbedLink#}->{Name} = q#ExternalEmbedLink#; |
7 |
$Info{q#ExternalEmbedLink#}->{q#Version#} = q#2005.0130.0335#; |
8 |
$Info{q#ExternalEmbedLink#}->{q#InterfaceVersion#} = q#2.9.1#; |
9 |
$Info{q#ExternalEmbedLink#}->{q#mkpluginVersion#} = q#2.1.21#; |
10 |
$Info{q#ExternalEmbedLink#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::ExternalEmbedLink1050030033538OUJ0#; |
11 |
$Info{q#ExternalEmbedLink#}->{q#Date.RCS#} = q#$Date: 2004/03/10 06:57:25 $#; |
12 |
$Info{q#ExternalEmbedLink#}->{RequiredModule} = [q#URI#]; |
13 |
$Info{q#ExternalEmbedLink#}->{Description} = [[q#Embed-style linking of external resources#, q#en#, q##]]; |
14 |
$Info{q#ExternalEmbedLink#}->{License} = [[q#%%Perl%%#, q##, q##]]; |
15 |
$Info{q#ExternalEmbedLink#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [[q#w@suika.fam.cx#]], [q##]]]; |
16 |
package SuikaWiki::Plugin::plugin::ExternalEmbedLink1050030033538OUJ0; |
17 |
|
18 |
|
19 |
#line 1 "(WikiPlugin module source xembed.wp2, block Plugin/Use)" |
20 |
require URI; |
21 |
#line 1 "(WikiPlugin module ExternalEmbedLink, chunk 1)" |
22 |
|
23 |
{my $def = {q#Parameter#, {q#alt#, {q#Type#, q#text#, q#Default#, q#(empty)#, q#Description#, [[q#A short description for the image.#, q#en#, q##]]}, q#uri#, {q#Type#, q#URI-reference#, q#Default#, q#(required)#, q#Description#, [[q#URI reference of the image to embed.#, q#en#, q##]]}}, q#Description#, [[q#Embeds an external image resource. |
24 |
|
25 |
STATUS: EXPERIMENTAL#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
26 |
|
27 |
#line 1 "(WikiPlugin module source xembed.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/xe__img']/Formatting)" |
28 |
$p->{q#uri#} = do { my $r = $f->parse_attr ($p=>q#uri#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
29 |
$p->{q#alt#} = do { my $r = $f->parse_attr ($p=>q#alt#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
30 |
for ($p->{-parent}->append_new_node |
31 |
(type => '#element', |
32 |
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
33 |
local_name => 'img')) { |
34 |
$_->flag (use_EmptyElemTag => 1); |
35 |
$_->set_attribute (src => ''.URI->new ($p->{uri})); |
36 |
$_->set_attribute (alt => $p->{alt}); |
37 |
}}} |
38 |
#line 1 "(WikiPlugin module ExternalEmbedLink, chunk 2)" |
39 |
; |
40 |
$SuikaWiki::Plugin::Rule{view}->{xe__img} = $def; |
41 |
$SuikaWiki::Plugin::Rule{view_resource}->{xe__img} = $def; |
42 |
$SuikaWiki::Plugin::Rule{form_input}->{xe__img} = $def; |
43 |
}; |
44 |
package SuikaWiki::Plugin::Registry; |
45 |
|
46 |
$Info{q#ExternalEmbedLink#}->{provide} = {q#rule#, {q#form_input#, [q#xe__img#], q#view#, [q#xe__img#], q#view_resource#, [q#xe__img#]}}; |
47 |
|
48 |
1; |