/[suikacvs]/markup/html/whatpm/Whatpm/ContentChecker/Atom.pm
Suika

Diff of /markup/html/whatpm/Whatpm/ContentChecker/Atom.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by wakaba, Fri Aug 15 12:46:44 2008 UTC revision 1.19 by wakaba, Fri Aug 15 16:02:02 2008 UTC
# Line 69  my $AtomLanguageTagAttrChecker = sub { Line 69  my $AtomLanguageTagAttrChecker = sub {
69    require Whatpm::LangTag;    require Whatpm::LangTag;
70    Whatpm::LangTag->check_rfc3066_language_tag ($value, sub {    Whatpm::LangTag->check_rfc3066_language_tag ($value, sub {
71      $self->{onerror}->(@_, node => $attr);      $self->{onerror}->(@_, node => $attr);
72    });    }, $self->{level});
73    ## ISSUE: RFC 4646 (3066bis)?    ## ISSUE: RFC 4646 (3066bis)?
74  }; # $AtomLanguageTagAttrChecker  }; # $AtomLanguageTagAttrChecker
75    
# Line 292  $Element->{$ATOM_NS}->{uri} = { Line 292  $Element->{$ATOM_NS}->{uri} = {
292      ## NOTE: There MUST NOT be any white space.      ## NOTE: There MUST NOT be any white space.
293      Whatpm::URIChecker->check_iri_reference ($element_state->{value}, sub {      Whatpm::URIChecker->check_iri_reference ($element_state->{value}, sub {
294        $self->{onerror}->(@_, node => $item->{node});        $self->{onerror}->(@_, node => $item->{node});
295      });      }, $self->{level});
296    
297      $AtomChecker{check_end}->(@_);      $AtomChecker{check_end}->(@_);
298    },    },
# Line 681  $Element->{$ATOM_NS}->{content} = { Line 681  $Element->{$ATOM_NS}->{content} = {
681        ## NOTE: There MUST NOT be any white space.        ## NOTE: There MUST NOT be any white space.
682        Whatpm::URIChecker->check_iri_reference ($attr->value, sub {        Whatpm::URIChecker->check_iri_reference ($attr->value, sub {
683          $self->{onerror}->(@_, node => $item->{node});          $self->{onerror}->(@_, node => $item->{node});
684        });        }, $self->{level});
685      },      },
686      type => sub {      type => sub {
687        my ($self, $attr, $item, $element_state) = @_;        my ($self, $attr, $item, $element_state) = @_;
# Line 879  $Element->{$ATOM_NS}->{category} = { Line 879  $Element->{$ATOM_NS}->{category} = {
879        ## NOTE: There MUST NOT be any white space.        ## NOTE: There MUST NOT be any white space.
880        Whatpm::URIChecker->check_iri ($attr->value, sub {        Whatpm::URIChecker->check_iri ($attr->value, sub {
881          $self->{onerror}->(@_, node => $attr);          $self->{onerror}->(@_, node => $attr);
882        });        }, $self->{level});
883      },      },
884      term => sub {      term => sub {
885        my ($self, $attr, $item, $element_state) = @_;        my ($self, $attr, $item, $element_state) = @_;
# Line 919  $Element->{$ATOM_NS}->{generator} = { Line 919  $Element->{$ATOM_NS}->{generator} = {
919        ## NOTE: There MUST NOT be any white space.        ## NOTE: There MUST NOT be any white space.
920        Whatpm::URIChecker->check_iri_reference ($attr->value, sub {        Whatpm::URIChecker->check_iri_reference ($attr->value, sub {
921          $self->{onerror}->(@_, node => $attr);          $self->{onerror}->(@_, node => $attr);
922        });        }, $self->{level});
923        ## NOTE: Dereferencing SHOULD produce a representation        ## NOTE: Dereferencing SHOULD produce a representation
924        ## that is relevant to the agent.        ## that is relevant to the agent.
925      },      },
# Line 953  $Element->{$ATOM_NS}->{icon} = { Line 953  $Element->{$ATOM_NS}->{icon} = {
953      ## NOTE: There MUST NOT be any white space.      ## NOTE: There MUST NOT be any white space.
954      Whatpm::URIChecker->check_iri_reference ($element_state->{value}, sub {      Whatpm::URIChecker->check_iri_reference ($element_state->{value}, sub {
955        $self->{onerror}->(@_, node => $item->{node});        $self->{onerror}->(@_, node => $item->{node});
956      });      }, $self->{level});
957    
958      ## NOTE: Image SHOULD be 1:1 and SHOULD be small      ## NOTE: Image SHOULD be 1:1 and SHOULD be small
959    
# Line 978  $Element->{$ATOM_NS}->{id} = { Line 978  $Element->{$ATOM_NS}->{id} = {
978      ## NOTE: There MUST NOT be any white space.      ## NOTE: There MUST NOT be any white space.
979      Whatpm::URIChecker->check_iri ($element_state->{value}, sub {      Whatpm::URIChecker->check_iri ($element_state->{value}, sub {
980        $self->{onerror}->(@_, node => $item->{node});        $self->{onerror}->(@_, node => $item->{node});
981      });      }, $self->{level});
982      ## TODO: SHOULD be normalized      ## TODO: SHOULD be normalized
983    
984      $AtomChecker{check_end}->(@_);      $AtomChecker{check_end}->(@_);
# Line 1019  my $AtomIRIReferenceAttrChecker = sub { Line 1019  my $AtomIRIReferenceAttrChecker = sub {
1019    ## NOTE: There MUST NOT be any white space.    ## NOTE: There MUST NOT be any white space.
1020    Whatpm::URIChecker->check_iri_reference ($attr->value, sub {    Whatpm::URIChecker->check_iri_reference ($attr->value, sub {
1021      $self->{onerror}->(@_, node => $attr);      $self->{onerror}->(@_, node => $attr);
1022    });    }, $self->{level});
1023  }; # $AtomIRIReferenceAttrChecker  }; # $AtomIRIReferenceAttrChecker
1024    
1025  $Element->{$ATOM_NS}->{link} = {  $Element->{$ATOM_NS}->{link} = {
# Line 1038  $Element->{$ATOM_NS}->{link} = { Line 1038  $Element->{$ATOM_NS}->{link} = {
1038        ## NOTE: There MUST NOT be any white space.        ## NOTE: There MUST NOT be any white space.
1039        Whatpm::URIChecker->check_iri ($value, sub {        Whatpm::URIChecker->check_iri ($value, sub {
1040          $self->{onerror}->(@_, node => $attr);          $self->{onerror}->(@_, node => $attr);
1041        });        }, $self->{level});
1042    
1043        ## TODO: Warn if unregistered        ## TODO: Warn if unregistered
1044    
# Line 1100  $Element->{$ATOM_NS}->{logo} = { Line 1100  $Element->{$ATOM_NS}->{logo} = {
1100      ## NOTE: There MUST NOT be any white space.      ## NOTE: There MUST NOT be any white space.
1101      Whatpm::URIChecker->check_iri_reference ($element_state->{value}, sub {      Whatpm::URIChecker->check_iri_reference ($element_state->{value}, sub {
1102        $self->{onerror}->(@_, node => $item->{node});        $self->{onerror}->(@_, node => $item->{node});
1103      });      }, $self->{level});
1104            
1105      ## NOTE: Image SHOULD be 2:1      ## NOTE: Image SHOULD be 2:1
1106    
# Line 1227  $Element->{$THR_NS}->{'in-reply-to'} = { Line 1227  $Element->{$THR_NS}->{'in-reply-to'} = {
1227        ## NOTE: There MUST NOT be any white space.        ## NOTE: There MUST NOT be any white space.
1228        Whatpm::URIChecker->check_iri ($attr->value, sub {        Whatpm::URIChecker->check_iri ($attr->value, sub {
1229          $self->{onerror}->(@_, node => $attr);          $self->{onerror}->(@_, node => $attr);
1230        });        }, $self->{level});
1231    
1232        ## TODO: Check against ID guideline...        ## TODO: Check against ID guideline...
1233      },      },

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24