/[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.21 by wakaba, Sat Aug 30 10:26:39 2008 UTC revision 1.22 by wakaba, Sat Sep 20 06:10:18 2008 UTC
# Line 23  sub FEATURE_RFC4685 () { Line 23  sub FEATURE_RFC4685 () {
23    
24  ## NOTE: Commants and PIs are not explicitly allowed.  ## NOTE: Commants and PIs are not explicitly allowed.
25    
26    our $IsInHTMLInteractiveContent; # See Whatpm::ContentChecker.
27    
28  our $AttrChecker;  our $AttrChecker;
29    
30  ## Any element MAY have xml:base, xml:lang  ## Any element MAY have xml:base, xml:lang
# Line 105  my %AtomTextConstruct = ( Line 107  my %AtomTextConstruct = (
107    check_child_element => sub {    check_child_element => sub {
108      my ($self, $item, $child_el, $child_nsuri, $child_ln,      my ($self, $item, $child_el, $child_nsuri, $child_ln,
109          $child_is_transparent, $element_state) = @_;          $child_is_transparent, $element_state) = @_;
110      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
111            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
112        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
113                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
114                           level => $self->{level}->{must});                           level => $self->{level}->{must});
# Line 184  my %AtomPersonConstruct = ( Line 187  my %AtomPersonConstruct = (
187    check_child_element => sub {    check_child_element => sub {
188      my ($self, $item, $child_el, $child_nsuri, $child_ln,      my ($self, $item, $child_el, $child_nsuri, $child_ln,
189          $child_is_transparent, $element_state) = @_;          $child_is_transparent, $element_state) = @_;
190      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
191            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
192        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
193                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
194                           level => $self->{level}->{must});                           level => $self->{level}->{must});
# Line 387  $Element->{$ATOM_NS}->{entry} = { Line 391  $Element->{$ATOM_NS}->{entry} = {
391    
392      ## NOTE: metadata elements, followed by atom:entry* (no explicit MAY)      ## NOTE: metadata elements, followed by atom:entry* (no explicit MAY)
393    
394      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
395            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
396        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
397                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
398                           level => $self->{level}->{must});                           level => $self->{level}->{must});
# Line 548  $Element->{$ATOM_NS}->{feed} = { Line 553  $Element->{$ATOM_NS}->{feed} = {
553    
554      ## NOTE: metadata elements, followed by atom:entry* (no explicit MAY)      ## NOTE: metadata elements, followed by atom:entry* (no explicit MAY)
555    
556      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
557            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
558        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
559                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
560                           level => $self->{level}->{must});                           level => $self->{level}->{must});
# Line 747  $Element->{$ATOM_NS}->{content} = { Line 753  $Element->{$ATOM_NS}->{content} = {
753      my ($self, $item, $child_el, $child_nsuri, $child_ln,      my ($self, $item, $child_el, $child_nsuri, $child_ln,
754          $child_is_transparent, $element_state) = @_;          $child_is_transparent, $element_state) = @_;
755    
756      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
757            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
758        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
759                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
760                           level => $self->{level}->{must});                           level => $self->{level}->{must});
# Line 1123  $Element->{$ATOM_NS}->{source} = { Line 1130  $Element->{$ATOM_NS}->{source} = {
1130      my ($self, $item, $child_el, $child_nsuri, $child_ln,      my ($self, $item, $child_el, $child_nsuri, $child_ln,
1131          $child_is_transparent, $element_state) = @_;          $child_is_transparent, $element_state) = @_;
1132    
1133      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
1134            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
1135        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
1136                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
1137                           level => $self->{level}->{must});                           level => $self->{level}->{must});
# Line 1271  $Element->{$THR_NS}->{total} = { Line 1279  $Element->{$THR_NS}->{total} = {
1279      my ($self, $item, $child_el, $child_nsuri, $child_ln,      my ($self, $item, $child_el, $child_nsuri, $child_ln,
1280          $child_is_transparent, $element_state) = @_;          $child_is_transparent, $element_state) = @_;
1281    
1282      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln}) {      if ($self->{minus_elements}->{$child_nsuri}->{$child_ln} and
1283            $IsInHTMLInteractiveContent->($child_el, $child_nsuri, $child_ln)) {
1284        $self->{onerror}->(node => $child_el,        $self->{onerror}->(node => $child_el,
1285                           type => 'element not allowed:minus',                           type => 'element not allowed:minus',
1286                           level => $self->{level}->{must});                           level => $self->{level}->{must});

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24