Update of /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector In directory usw-pr-cvs1:/tmp/cvs-serv20716/lib/CSS/SAC/Selector Modified Files: CharacterData.pm Conditional.pm Descendant.pm Element.pm Negative.pm ProcessingInstruction.pm Sibling.pm Simple.pm Log Message: stupid dos endings, samba really sucks when it wants to Index: CharacterData.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/CharacterData.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CharacterData.pm 2001/08/17 17:50:15 1.2 +++ CharacterData.pm 2001/08/17 18:00:01 1.3 @@ -1,126 +1,126 @@ - -### -# CSS::SAC::Selector::CharacterData - SAC CharacterDataSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::CharacterData; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector::Simple); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector::Simple', - with => [qw( - _data_ - )], - }; -#---------------------------------------------------------------------# - - - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::CharacterData->new($type,$data) -# creates a new sac CharacterDataSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; # should be one of the cdata selectors - my $data = shift; - - # create a selector - my $csel = $class->SUPER::new($type); - - # add our fields - $csel->[_data_] = $data if defined $data; - - return $csel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - -*CSS::SAC::Selector::CharacterData::getData = \&Data; - -#---------------------------------------------------------------------# -# my $data = $csel->Data() -# $csel->Data($data) -# get/set the selector's cdata -#---------------------------------------------------------------------# -sub Data { - (@_==2) ? $_[0]->[_data_] = $_[1] : - $_[0]->[_data_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::CharacterData - SAC CharacterDataSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector::Simple, look there for more -documentation. This class adds the following methods (which also exist -in spec style, simply prepend them with 'get'): - -=head1 METHODS - -=over - -=item * CSS::SAC::Selector::CharacterData->new($type,$data) -=item * $sel->new($type,$data) - -Creates a new cdata selector. - -=item * $csel->Data([$data]) - -get/set the selector's data - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut - - + +### +# CSS::SAC::Selector::CharacterData - SAC CharacterDataSelector +# Robin Berjon <ro...@kn...> +# 24/02/2001 +### + +package CSS::SAC::Selector::CharacterData; +use strict; +use vars qw($VERSION); +$VERSION = $CSS::SAC::VERSION || '0.03'; + +use base qw(CSS::SAC::Selector::Simple); + + +#---------------------------------------------------------------------# +# build the fields for an array based object +#---------------------------------------------------------------------# +use Class::ArrayObjects extend => { + class => 'CSS::SAC::Selector::Simple', + with => [qw( + _data_ + )], + }; +#---------------------------------------------------------------------# + + + + +### Constructor ####################################################### +# # +# # + + +#---------------------------------------------------------------------# +# CSS::SAC::Selector::CharacterData->new($type,$data) +# creates a new sac CharacterDataSelector object +#---------------------------------------------------------------------# +sub new { + my $class = ref($_[0])?ref(shift):shift; + my $type = shift; # should be one of the cdata selectors + my $data = shift; + + # create a selector + my $csel = $class->SUPER::new($type); + + # add our fields + $csel->[_data_] = $data if defined $data; + + return $csel; +} +#---------------------------------------------------------------------# + + +# # +# # +### Constructor ####################################################### + + + +### Accessors ######################################################### +# # +# # + +*CSS::SAC::Selector::CharacterData::getData = \&Data; + +#---------------------------------------------------------------------# +# my $data = $csel->Data() +# $csel->Data($data) +# get/set the selector's cdata +#---------------------------------------------------------------------# +sub Data { + (@_==2) ? $_[0]->[_data_] = $_[1] : + $_[0]->[_data_]; +} +#---------------------------------------------------------------------# + + +# # +# # +### Accessors ######################################################### + + + +1; + +=pod + +=head1 NAME + +CSS::SAC::Selector::CharacterData - SAC CharacterDataSelector + +=head1 SYNOPSIS + + see CSS::SAC::Selector + +=head1 DESCRIPTION + +This is a subclass of CSS::SAC::Selector::Simple, look there for more +documentation. This class adds the following methods (which also exist +in spec style, simply prepend them with 'get'): + +=head1 METHODS + +=over + +=item * CSS::SAC::Selector::CharacterData->new($type,$data) +=item * $sel->new($type,$data) + +Creates a new cdata selector. + +=item * $csel->Data([$data]) + +get/set the selector's data + +=back + +=head1 AUTHOR + +Robin Berjon <ro...@kn...> + +This module is licensed under the same terms as Perl itself. + +=cut + + Index: Conditional.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/Conditional.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Conditional.pm 2001/08/17 17:50:15 1.2 +++ Conditional.pm 2001/08/17 18:00:01 1.3 @@ -1,146 +1,146 @@ - -### -# CSS::SAC::Selector::Conditional - SAC ConditionalSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::Conditional; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector::Simple); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector::Simple', - with => [qw( - _selector_ - _condition_ - )], - }; -#---------------------------------------------------------------------# - - - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::Conditional->new($type,$selector,$condition) -# creates a new sac ConditionalSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; - my $selector = shift; - my $condition = shift; - - # create a selector - my $csel = $class->SUPER::new($type); - - # add our fields - $csel->[_condition_] = $condition; - $csel->[_selector_] = $selector; - - return $csel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - -*CSS::SAC::Selector::Conditional::getCondition = \&Condition; -*CSS::SAC::Selector::Conditional::getSimpleSelector = \&SimpleSelector; - -#---------------------------------------------------------------------# -# my $cond = $csel->Condition() -# $csel->Condition($cond) -# get/set the selector's condition -#---------------------------------------------------------------------# -sub Condition { - (@_==2) ? $_[0]->[_condition_] = $_[1] : - $_[0]->[_condition_]; -} -#---------------------------------------------------------------------# - - -#---------------------------------------------------------------------# -# my $cond = $csel->SimpleSelector() -# $csel->SimpleSelector($cond) -# get/set the selector's simple selector -#---------------------------------------------------------------------# -sub SimpleSelector { - (@_==2) ? $_[0]->[_selector_] = $_[1] : - $_[0]->[_selector_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::Conditional - SAC ConditionalSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector::Simple, look there for more -documentation. This class adds the following methods (which also exist -in spec style, simply prepend them with 'get'): - -=head1 METHODS - -=over - -=item * CSS::SAC::Selector::Conditional->new($type,$selector,$condition) -=item * $sel->new($type,$selector,$condition) - -Creates a new conditional selector. - -=item * $csel->Condition([$cond]) - -get/set the selector's condition - -=item * $csel->SimpleSelector([$cond]) - -get/set the selector's simple selector - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut - - + +### +# CSS::SAC::Selector::Conditional - SAC ConditionalSelector +# Robin Berjon <ro...@kn...> +# 24/02/2001 +### + +package CSS::SAC::Selector::Conditional; +use strict; +use vars qw($VERSION); +$VERSION = $CSS::SAC::VERSION || '0.03'; + +use base qw(CSS::SAC::Selector::Simple); + + +#---------------------------------------------------------------------# +# build the fields for an array based object +#---------------------------------------------------------------------# +use Class::ArrayObjects extend => { + class => 'CSS::SAC::Selector::Simple', + with => [qw( + _selector_ + _condition_ + )], + }; +#---------------------------------------------------------------------# + + + + +### Constructor ####################################################### +# # +# # + + +#---------------------------------------------------------------------# +# CSS::SAC::Selector::Conditional->new($type,$selector,$condition) +# creates a new sac ConditionalSelector object +#---------------------------------------------------------------------# +sub new { + my $class = ref($_[0])?ref(shift):shift; + my $type = shift; + my $selector = shift; + my $condition = shift; + + # create a selector + my $csel = $class->SUPER::new($type); + + # add our fields + $csel->[_condition_] = $condition; + $csel->[_selector_] = $selector; + + return $csel; +} +#---------------------------------------------------------------------# + + +# # +# # +### Constructor ####################################################### + + + +### Accessors ######################################################### +# # +# # + +*CSS::SAC::Selector::Conditional::getCondition = \&Condition; +*CSS::SAC::Selector::Conditional::getSimpleSelector = \&SimpleSelector; + +#---------------------------------------------------------------------# +# my $cond = $csel->Condition() +# $csel->Condition($cond) +# get/set the selector's condition +#---------------------------------------------------------------------# +sub Condition { + (@_==2) ? $_[0]->[_condition_] = $_[1] : + $_[0]->[_condition_]; +} +#---------------------------------------------------------------------# + + +#---------------------------------------------------------------------# +# my $cond = $csel->SimpleSelector() +# $csel->SimpleSelector($cond) +# get/set the selector's simple selector +#---------------------------------------------------------------------# +sub SimpleSelector { + (@_==2) ? $_[0]->[_selector_] = $_[1] : + $_[0]->[_selector_]; +} +#---------------------------------------------------------------------# + + +# # +# # +### Accessors ######################################################### + + + +1; + +=pod + +=head1 NAME + +CSS::SAC::Selector::Conditional - SAC ConditionalSelector + +=head1 SYNOPSIS + + see CSS::SAC::Selector + +=head1 DESCRIPTION + +This is a subclass of CSS::SAC::Selector::Simple, look there for more +documentation. This class adds the following methods (which also exist +in spec style, simply prepend them with 'get'): + +=head1 METHODS + +=over + +=item * CSS::SAC::Selector::Conditional->new($type,$selector,$condition) +=item * $sel->new($type,$selector,$condition) + +Creates a new conditional selector. + +=item * $csel->Condition([$cond]) + +get/set the selector's condition + +=item * $csel->SimpleSelector([$cond]) + +get/set the selector's simple selector + +=back + +=head1 AUTHOR + +Robin Berjon <ro...@kn...> + +This module is licensed under the same terms as Perl itself. + +=cut + + Index: Descendant.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/Descendant.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Descendant.pm 2001/08/17 17:50:15 1.2 +++ Descendant.pm 2001/08/17 18:00:01 1.3 @@ -1,146 +1,146 @@ - -### -# CSS::SAC::Selector::Descendant - SAC DescendantSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::Descendant; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector', - with => [qw( - _ancestor_ - _simple_ - )], - }; -#---------------------------------------------------------------------# - - - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::Descendant->new($type,$ancestor_sel,$simple_sel) -# creates a new sac DescendantSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; - my $ancestor_sel = shift; - my $simple_sel = shift; - - # create a selector - my $dsel = $class->SUPER::new($type); - - # add our fields - $dsel->[_ancestor_] = $ancestor_sel; - $dsel->[_simple_] = $simple_sel; - - return $dsel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - -*CSS::SAC::Selector::Descendant::getAncestorSelector = \&AncestorSelector; -*CSS::SAC::Selector::Descendant::getSimpleSelector = \&SimpleSelector; - -#---------------------------------------------------------------------# -# my $ancestor_sel = $dsel->AncestorSelector() -# $dsel->AncestorSelector($ancestor_sel) -# get/set the selector's ancestor selector -#---------------------------------------------------------------------# -sub AncestorSelector { - (@_==2) ? $_[0]->[_ancestor_] = $_[1] : - $_[0]->[_ancestor_]; -} -#---------------------------------------------------------------------# - - -#---------------------------------------------------------------------# -# my $simple_sel = $dsel->SimpleSelector() -# $dsel->SimpleSelector($simple_sel) -# get/set the selector's simple selector -#---------------------------------------------------------------------# -sub SimpleSelector { - (@_==2) ? $_[0]->[_simple_] = $_[1] : - $_[0]->[_simple_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::Descendant - SAC DescendantSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector, look there for more -documentation. This class adds the following methods (which also exist -in spec style, simply prepend them with 'get'): - -=head1 METHODS - -=over - -=item * CSS::SAC::Selector::Descendant->new($type,$ancestor_sel,$simple_sel) -=item * $dsel->new($type,$ancestor_sel,$simple_sel) - -Creates a new descendant selector. - -=item * $dsel->AncestorSelector([$ancestor_sel]) - -get/set the selector's ancestor selector - -=item * $dsel->SimpleSelector([$simple_sel]) - -get/set the selector's simple selector - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut - - + +### +# CSS::SAC::Selector::Descendant - SAC DescendantSelector +# Robin Berjon <ro...@kn...> +# 24/02/2001 +### + +package CSS::SAC::Selector::Descendant; +use strict; +use vars qw($VERSION); +$VERSION = $CSS::SAC::VERSION || '0.03'; + +use base qw(CSS::SAC::Selector); + + +#---------------------------------------------------------------------# +# build the fields for an array based object +#---------------------------------------------------------------------# +use Class::ArrayObjects extend => { + class => 'CSS::SAC::Selector', + with => [qw( + _ancestor_ + _simple_ + )], + }; +#---------------------------------------------------------------------# + + + + +### Constructor ####################################################### +# # +# # + + +#---------------------------------------------------------------------# +# CSS::SAC::Selector::Descendant->new($type,$ancestor_sel,$simple_sel) +# creates a new sac DescendantSelector object +#---------------------------------------------------------------------# +sub new { + my $class = ref($_[0])?ref(shift):shift; + my $type = shift; + my $ancestor_sel = shift; + my $simple_sel = shift; + + # create a selector + my $dsel = $class->SUPER::new($type); + + # add our fields + $dsel->[_ancestor_] = $ancestor_sel; + $dsel->[_simple_] = $simple_sel; + + return $dsel; +} +#---------------------------------------------------------------------# + + +# # +# # +### Constructor ####################################################### + + + +### Accessors ######################################################### +# # +# # + +*CSS::SAC::Selector::Descendant::getAncestorSelector = \&AncestorSelector; +*CSS::SAC::Selector::Descendant::getSimpleSelector = \&SimpleSelector; + +#---------------------------------------------------------------------# +# my $ancestor_sel = $dsel->AncestorSelector() +# $dsel->AncestorSelector($ancestor_sel) +# get/set the selector's ancestor selector +#---------------------------------------------------------------------# +sub AncestorSelector { + (@_==2) ? $_[0]->[_ancestor_] = $_[1] : + $_[0]->[_ancestor_]; +} +#---------------------------------------------------------------------# + + +#---------------------------------------------------------------------# +# my $simple_sel = $dsel->SimpleSelector() +# $dsel->SimpleSelector($simple_sel) +# get/set the selector's simple selector +#---------------------------------------------------------------------# +sub SimpleSelector { + (@_==2) ? $_[0]->[_simple_] = $_[1] : + $_[0]->[_simple_]; +} +#---------------------------------------------------------------------# + + +# # +# # +### Accessors ######################################################### + + + +1; + +=pod + +=head1 NAME + +CSS::SAC::Selector::Descendant - SAC DescendantSelector + +=head1 SYNOPSIS + + see CSS::SAC::Selector + +=head1 DESCRIPTION + +This is a subclass of CSS::SAC::Selector, look there for more +documentation. This class adds the following methods (which also exist +in spec style, simply prepend them with 'get'): + +=head1 METHODS + +=over + +=item * CSS::SAC::Selector::Descendant->new($type,$ancestor_sel,$simple_sel) +=item * $dsel->new($type,$ancestor_sel,$simple_sel) + +Creates a new descendant selector. + +=item * $dsel->AncestorSelector([$ancestor_sel]) + +get/set the selector's ancestor selector + +=item * $dsel->SimpleSelector([$simple_sel]) + +get/set the selector's simple selector + +=back + +=head1 AUTHOR + +Robin Berjon <ro...@kn...> + +This module is licensed under the same terms as Perl itself. + +=cut + + Index: Element.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/Element.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Element.pm 2001/08/17 17:50:15 1.2 +++ Element.pm 2001/08/17 18:00:01 1.3 @@ -1,146 +1,146 @@ - -### -# CSS::SAC::Selector::Element - SAC ElementSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::Element; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector::Simple); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector::Simple', - with => [qw( - _local_name_ - _ns_uri_ - )], - }; -#---------------------------------------------------------------------# - - - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::Element->new($type,$ns_uri,$local_name) -# creates a new sac ElementSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; - my $ns_uri = shift; - my $local_name = shift; - - # create a selector - my $esel = $class->SUPER::new($type); - - # add our fields - $esel->[_local_name_] = $local_name if $local_name; - $esel->[_ns_uri_] = $ns_uri if defined $ns_uri; - - return $esel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - -*CSS::SAC::Selector::Element::getLocalName = \&LocalName; -*CSS::SAC::Selector::Element::getNamespaceURI = \&NamespaceURI; - -#---------------------------------------------------------------------# -# my $lname = $esel->LocalName() -# $esel->LocalName($lname) -# get/set the selector's local name -#---------------------------------------------------------------------# -sub LocalName { - (@_==2) ? $_[0]->[_local_name_] = $_[1] : - $_[0]->[_local_name_]; -} -#---------------------------------------------------------------------# - - -#---------------------------------------------------------------------# -# my $ns = $esel->NamespaceURI() -# $esel->NamespaceURI($ns) -# get/set the selector's ns -#---------------------------------------------------------------------# -sub NamespaceURI { - (@_==2) ? $_[0]->[_ns_uri_] = $_[1] : - $_[0]->[_ns_uri_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::Element - SAC ElementSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector::Simple, look there for more -documentation. This class adds the following methods (which also exist -in spec style, simply prepend them with 'get'): - -=head1 METHODS - -=over - -=item * CSS::SAC::Selector::Element->new($type,$local_name,$ns_uri) -=item * $esel->new($type,$local_name,$ns_uri) - -Creates a new element selector. - -=item * $esel->LocalName([$lname]) - -get/set the selector's local name - -=item * $esel->NamespaceURI([$ns]) - -get/set the selector's ns - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut - - + +### +# CSS::SAC::Selector::Element - SAC ElementSelector +# Robin Berjon <ro...@kn...> +# 24/02/2001 +### + +package CSS::SAC::Selector::Element; +use strict; +use vars qw($VERSION); +$VERSION = $CSS::SAC::VERSION || '0.03'; + +use base qw(CSS::SAC::Selector::Simple); + + +#---------------------------------------------------------------------# +# build the fields for an array based object +#---------------------------------------------------------------------# +use Class::ArrayObjects extend => { + class => 'CSS::SAC::Selector::Simple', + with => [qw( + _local_name_ + _ns_uri_ + )], + }; +#---------------------------------------------------------------------# + + + + +### Constructor ####################################################### +# # +# # + + +#---------------------------------------------------------------------# +# CSS::SAC::Selector::Element->new($type,$ns_uri,$local_name) +# creates a new sac ElementSelector object +#---------------------------------------------------------------------# +sub new { + my $class = ref($_[0])?ref(shift):shift; + my $type = shift; + my $ns_uri = shift; + my $local_name = shift; + + # create a selector + my $esel = $class->SUPER::new($type); + + # add our fields + $esel->[_local_name_] = $local_name if $local_name; + $esel->[_ns_uri_] = $ns_uri if defined $ns_uri; + + return $esel; +} +#---------------------------------------------------------------------# + + +# # +# # +### Constructor ####################################################### + + + +### Accessors ######################################################### +# # +# # + +*CSS::SAC::Selector::Element::getLocalName = \&LocalName; +*CSS::SAC::Selector::Element::getNamespaceURI = \&NamespaceURI; + +#---------------------------------------------------------------------# +# my $lname = $esel->LocalName() +# $esel->LocalName($lname) +# get/set the selector's local name +#---------------------------------------------------------------------# +sub LocalName { + (@_==2) ? $_[0]->[_local_name_] = $_[1] : + $_[0]->[_local_name_]; +} +#---------------------------------------------------------------------# + + +#---------------------------------------------------------------------# +# my $ns = $esel->NamespaceURI() +# $esel->NamespaceURI($ns) +# get/set the selector's ns +#---------------------------------------------------------------------# +sub NamespaceURI { + (@_==2) ? $_[0]->[_ns_uri_] = $_[1] : + $_[0]->[_ns_uri_]; +} +#---------------------------------------------------------------------# + + +# # +# # +### Accessors ######################################################### + + + +1; + +=pod + +=head1 NAME + +CSS::SAC::Selector::Element - SAC ElementSelector + +=head1 SYNOPSIS + + see CSS::SAC::Selector + +=head1 DESCRIPTION + +This is a subclass of CSS::SAC::Selector::Simple, look there for more +documentation. This class adds the following methods (which also exist +in spec style, simply prepend them with 'get'): + +=head1 METHODS + +=over + +=item * CSS::SAC::Selector::Element->new($type,$local_name,$ns_uri) +=item * $esel->new($type,$local_name,$ns_uri) + +Creates a new element selector. + +=item * $esel->LocalName([$lname]) + +get/set the selector's local name + +=item * $esel->NamespaceURI([$ns]) + +get/set the selector's ns + +=back + +=head1 AUTHOR + +Robin Berjon <ro...@kn...> + +This module is licensed under the same terms as Perl itself. + +=cut + + Index: Negative.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/Negative.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Negative.pm 2001/08/17 17:50:15 1.2 +++ Negative.pm 2001/08/17 18:00:01 1.3 @@ -1,127 +1,127 @@ - -### -# CSS::SAC::Selector::Negative - SAC NegativeSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::Negative; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector::Simple); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector::Simple', - with => [qw( - _sel_ - )], - }; -#---------------------------------------------------------------------# - - - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::Negative->new($type,$sel) -# creates a new sac NegativeSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; - my $sel = shift; - - # create a selector - my $nsel = $class->SUPER::new($type); - - # add our fields - $nsel->[_sel_] = $sel; - - return $nsel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - -*CSS::SAC::Selector::Negative::getSimpleSelector = \&SimpleSelector; - -#---------------------------------------------------------------------# -# my $sel = $nsel->SimpleSelector() -# $nsel->SimpleSelector($sel) -# get/set the selector's simple selector -#---------------------------------------------------------------------# -sub SimpleSelector { - (@_==2) ? $_[0]->[_sel_] = $_[1] : - $_[0]->[_sel_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::Negative - SAC NegativeSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector::Simple, look there for more -documentation. This class adds the following methods (which also exist -in spec style, simply prepend them with 'get'): - -=head1 METHODS - -=over 4 - -=item * CSS::SAC::Selector::Negative->new($type,$sel) - -=item * $nsel->new($type,$sel) - -Creates a new negative selector. - -=item * $nsel->SimpleSelector([$sel]) - -get/set the selector's simple selector - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut - - + +### +# CSS::SAC::Selector::Negative - SAC NegativeSelector +# Robin Berjon <ro...@kn...> +# 24/02/2001 +### + +package CSS::SAC::Selector::Negative; +use strict; +use vars qw($VERSION); +$VERSION = $CSS::SAC::VERSION || '0.03'; + +use base qw(CSS::SAC::Selector::Simple); + + +#---------------------------------------------------------------------# +# build the fields for an array based object +#---------------------------------------------------------------------# +use Class::ArrayObjects extend => { + class => 'CSS::SAC::Selector::Simple', + with => [qw( + _sel_ + )], + }; +#---------------------------------------------------------------------# + + + + +### Constructor ####################################################### +# # +# # + + +#---------------------------------------------------------------------# +# CSS::SAC::Selector::Negative->new($type,$sel) +# creates a new sac NegativeSelector object +#---------------------------------------------------------------------# +sub new { + my $class = ref($_[0])?ref(shift):shift; + my $type = shift; + my $sel = shift; + + # create a selector + my $nsel = $class->SUPER::new($type); + + # add our fields + $nsel->[_sel_] = $sel; + + return $nsel; +} +#---------------------------------------------------------------------# + + +# # +# # +### Constructor ####################################################### + + + +### Accessors ######################################################### +# # +# # + +*CSS::SAC::Selector::Negative::getSimpleSelector = \&SimpleSelector; + +#---------------------------------------------------------------------# +# my $sel = $nsel->SimpleSelector() +# $nsel->SimpleSelector($sel) +# get/set the selector's simple selector +#---------------------------------------------------------------------# +sub SimpleSelector { + (@_==2) ? $_[0]->[_sel_] = $_[1] : + $_[0]->[_sel_]; +} +#---------------------------------------------------------------------# + + +# # +# # +### Accessors ######################################################### + + + +1; + +=pod + +=head1 NAME + +CSS::SAC::Selector::Negative - SAC NegativeSelector + +=head1 SYNOPSIS + + see CSS::SAC::Selector + +=head1 DESCRIPTION + +This is a subclass of CSS::SAC::Selector::Simple, look there for more +documentation. This class adds the following methods (which also exist +in spec style, simply prepend them with 'get'): + +=head1 METHODS + +=over 4 + +=item * CSS::SAC::Selector::Negative->new($type,$sel) + +=item * $nsel->new($type,$sel) + +Creates a new negative selector. + +=item * $nsel->SimpleSelector([$sel]) + +get/set the selector's simple selector + +=back + +=head1 AUTHOR + +Robin Berjon <ro...@kn...> + +This module is licensed under the same terms as Perl itself. + +=cut + + Index: ProcessingInstruction.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/ProcessingInstruction.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ProcessingInstruction.pm 2001/08/17 17:50:15 1.2 +++ ProcessingInstruction.pm 2001/08/17 18:00:01 1.3 @@ -1,147 +1,147 @@ - -### -# CSS::SAC::Selector::ProcessingInstruction - SAC ProcessingInstructionSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::ProcessingInstruction; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector::Simple); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector::Simple', - with => [qw( - _target_ - _data_ - )], - }; -#---------------------------------------------------------------------# - - - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::ProcessingInstruction->new($type,$target,$data) -# creates a new sac ProcessingInstructionSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; - my $target = shift; - my $data = shift; - - # create a selector - my $psel = $class->SUPER::new($type); - - # add our fields - $psel->[_target_] = $target; - $psel->[_data_] = $data if defined $data; - - return $psel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - - -*CSS::SAC::Selector::ProcessingInstruction::getTarget = \&Target; -*CSS::SAC::Selector::ProcessingInstruction::getData = \&Data; - -#---------------------------------------------------------------------# -# my $target = $psel->Target() -# $psel->Target($target) -# get/set the selector's target -#---------------------------------------------------------------------# -sub Target { - (@_==2) ? $_[0]->[_target_] = $_[1] : - $_[0]->[_target_]; -} -#---------------------------------------------------------------------# - - -#---------------------------------------------------------------------# -# my $data = $psel->Data() -# $psel->Data($data) -# get/set the selector's data -#---------------------------------------------------------------------# -sub Data { - (@_==2) ? $_[0]->[_data_] = $_[1] : - $_[0]->[_data_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::ProcessingInstruction - SAC ProcessingInstructionSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector::Simple, look there for more -documentation. This class adds the following methods (which also exist -in spec style, simply prepend them with 'get'): - -=head1 METHODS - -=over - -=item * CSS::SAC::Selector::ProcessingInstruction->new($type,$target,$data) -=item * $psel->new($type,$target,$data) - -Creates a new pi selector. - -=item * $psel->Target([$target]) - -get/set the selector's target - -=item * $psel->Data([$data]) - -get/set the selector's data - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut - - + +### +# CSS::SAC::Selector::ProcessingInstruction - SAC ProcessingInstructionSelector +# Robin Berjon <ro...@kn...> +# 24/02/2001 +### + +package CSS::SAC::Selector::ProcessingInstruction; +use strict; +use vars qw($VERSION); +$VERSION = $CSS::SAC::VERSION || '0.03'; + +use base qw(CSS::SAC::Selector::Simple); + + +#---------------------------------------------------------------------# +# build the fields for an array based object +#---------------------------------------------------------------------# +use Class::ArrayObjects extend => { + class => 'CSS::SAC::Selector::Simple', + with => [qw( + _target_ + _data_ + )], + }; +#---------------------------------------------------------------------# + + + + +### Constructor ####################################################### +# # +# # + + +#---------------------------------------------------------------------# +# CSS::SAC::Selector::ProcessingInstruction->new($type,$target,$data) +# creates a new sac ProcessingInstructionSelector object +#---------------------------------------------------------------------# +sub new { + my $class = ref($_[0])?ref(shift):shift; + my $type = shift; + my $target = shift; + my $data = shift; + + # create a selector + my $psel = $class->SUPER::new($type); + + # add our fields + $psel->[_target_] = $target; + $psel->[_data_] = $data if defined $data; + + return $psel; +} +#---------------------------------------------------------------------# + + +# # +# # +### Constructor ####################################################### + + + +### Accessors ######################################################### +# # +# # + + +*CSS::SAC::Selector::ProcessingInstruction::getTarget = \&Target; +*CSS::SAC::Selector::ProcessingInstruction::getData = \&Data; + +#---------------------------------------------------------------------# +# my $target = $psel->Target() +# $psel->Target($target) +# get/set the selector's target +#---------------------------------------------------------------------# +sub Target { + (@_==2) ? $_[0]->[_target_] = $_[1] : + $_[0]->[_target_]; +} +#---------------------------------------------------------------------# + + +#---------------------------------------------------------------------# +# my $data = $psel->Data() +# $psel->Data($data) +# get/set the selector's data +#---------------------------------------------------------------------# +sub Data { + (@_==2) ? $_[0]->[_data_] = $_[1] : + $_[0]->[_data_]; +} +#---------------------------------------------------------------------# + + +# # +# # +### Accessors ######################################################### + + + +1; + +=pod + +=head1 NAME + +CSS::SAC::Selector::ProcessingInstruction - SAC ProcessingInstructionSelector + +=head1 SYNOPSIS + + see CSS::SAC::Selector + +=head1 DESCRIPTION + +This is a subclass of CSS::SAC::Selector::Simple, look there for more +documentation. This class adds the following methods (which also exist +in spec style, simply prepend them with 'get'): + +=head1 METHODS + +=over + +=item * CSS::SAC::Selector::ProcessingInstruction->new($type,$target,$data) +=item * $psel->new($type,$target,$data) + +Creates a new pi selector. + +=item * $psel->Target([$target]) + +get/set the selector's target + +=item * $psel->Data([$data]) + +get/set the selector's data + +=back + +=head1 AUTHOR + +Robin Berjon <ro...@kn...> + +This module is licensed under the same terms as Perl itself. + +=cut + + Index: Sibling.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/lib/CSS/SAC/Selector/Sibling.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Sibling.pm 2001/08/17 17:50:15 1.2 +++ Sibling.pm 2001/08/17 18:00:01 1.3 @@ -1,263 +1,263 @@ - -### -# CSS::SAC::Selector::Sibling - SAC SiblingSelector -# Robin Berjon <ro...@kn...> -# 24/02/2001 -### - -package CSS::SAC::Selector::Sibling; -use strict; -use vars qw($VERSION); -$VERSION = $CSS::SAC::VERSION || '0.03'; - -use base qw(CSS::SAC::Selector); - - -#---------------------------------------------------------------------# -# build the fields for an array based object -#---------------------------------------------------------------------# -use Class::ArrayObjects extend => { - class => 'CSS::SAC::Selector', - with => [qw( - _node_type_ - _selector_ - _sibling_selector_ - )], - }; -#---------------------------------------------------------------------# - - - -### Constants ######################################################### -# # -# # - -sub ELEMENT_NODE () { 1 } -sub ATTRIBUTE_NODE () { 2 } -sub TEXT_NODE () { 3 } -sub CDATA_SECTION_NODE () { 4 } -sub ENTITY_REFERENCE_NODE () { 5 } -sub ENTITY_NODE () { 6 } -sub PROCESSING_INSTRUCTION_NODE () { 7 } -sub COMMENT_NODE () { 8 } -sub DOCUMENT_NODE () { 9 } -sub DOCUMENT_TYPE_NODE () { 10 } -sub DOCUMENT_FRAGMENT_NODE () { 11 } -sub NOTATION_NODE () { 12 } -sub ANY_NODE () { 13 } - - -#---------------------------------------------------------------------# -# import() -# all import can do is export the constants -#---------------------------------------------------------------------# -sub import { - my $class = shift; - my $tag = shift || ''; - - # check that we have the right tag - return unless $tag eq ':constants'; - - # define some useful vars - my $pkg = caller; - my @constants = qw( - ELEMENT_NODE - ATTRIBUTE_NODE - TEXT_NODE - CDATA_SECTION_NODE - ENTITY_REFERENCE_NODE - ENTITY_NODE - PROCESSING_INSTRUCTION_NODE - COMMENT_NODE - DOCUMENT_NODE - DOCUMENT_TYPE_NODE - DOCUMENT_FRAGMENT_NODE - NOTATION_NODE - ANY_NODE - ); - - # now lets create the constants in the caller's package - no strict 'refs'; - for my $c (@constants) { - my $qname = "${pkg}::$c"; - *$qname = \&{$c}; - } -} -#---------------------------------------------------------------------# - - -# # -# # -### Constants ######################################################### - - -### Constructor ####################################################### -# # -# # - - -#---------------------------------------------------------------------# -# CSS::SAC::Selector::Sibling->new($type,$node_type,$sel,$sibling_sel) -# creates a new sac SiblingSelector object -#---------------------------------------------------------------------# -sub new { - my $class = ref($_[0])?ref(shift):shift; - my $type = shift; - my $node_type = shift; - my $sel = shift; - my $sibling_sel = shift; - - # create a selector - my $ssel = $class->SUPER::new($type); - - # add our fields - $ssel->[_node_type_] = $node_type || ANY_NODE; - $ssel->[_selector_] = $sel; - $ssel->[_sibling_selector_] = $sibling_sel; - - return $ssel; -} -#---------------------------------------------------------------------# - - -# # -# # -### Constructor ####################################################### - - - -### Accessors ######################################################### -# # -# # - -*CSS::SAC::Selector::Sibling::getNodeType = \&NodeType; -*CSS::SAC::Selector::Sibling::getSelector = \&Selector; -*CSS::SAC::Selector::Sibling::getSiblingSelector = \&SiblingSelector; - -#---------------------------------------------------------------------# -# my $node_type = $ssel->NodeType() -# $ssel->NodeType($node_type) -# get/set the node type to which we apply -#---------------------------------------------------------------------# -sub NodeType { - (@_==2) ? $_[0]->[_node_type_] = $_[1] : - $_[0]->[_node_type_]; -} -#---------------------------------------------------------------------# - - -#---------------------------------------------------------------------# -# my $sel = $ssel->Selector() -# $ssel->Selector($sel) -# get/set the selector -#---------------------------------------------------------------------# -sub Selector { - (@_==2) ? $_[0]->[_selector_] = $_[1] : - $_[0]->[_selector_]; -} -#---------------------------------------------------------------------# - - -#---------------------------------------------------------------------# -# my $o_ssel = $ssel->SiblingSelector() -# $ssel->SiblingSelector($o_ssel) -# get/set the sibling selector -#---------------------------------------------------------------------# -sub SiblingSelector { - (@_==2) ? $_[0]->[_sibling_selector_] = $_[1] : - $_[0]->[_sibling_selector_]; -} -#---------------------------------------------------------------------# - - -# # -# # -### Accessors ######################################################### - - - -1; - -=pod - -=head1 NAME - -CSS::SAC::Selector::Sibling - SAC SiblingSelector - -=head1 SYNOPSIS - - see CSS::SAC::Selector - -=head1 DESCRIPTION - -This is a subclass of CSS::SAC::Selector, look there for more -documentation. This class adds the methods described below. - -This subclass also defines the constants for the DOM nodes. It uses -the same constants as the DOM, and adds the ANY_NODE constant which -matches any node. - -=head1 CONSTANTS - -=over - -=item * ELEMENT_NODE - -=item * ATTRIBUTE_NODE - -=item * TEXT_NODE - -=item * CDATA_SECTION_NODE - -=item * ENTITY_REFERENCE_NODE - -=item * ENTITY_NODE - -=item * PROCESSING_INSTRUCTION_NODE - -=item * COMMENT_NODE - -=item * DOCUMENT_NODE - -=item * DOCUMENT_TYPE_NODE - -=item * DOCUMENT_FRAGMENT_NODE - -=item * NOTATION_NODE - -=item * ANY_NODE - -=back - -=head1 METHODS - -These also exist in spec style, simply prepend them with 'get'. - -=over - -=item * CSS::SAC::Selector::Sibling->new($type,$node_type,$sel,$sibling_sel) -=item * $ssel->new($type,$node_type,$sel,$sibling_sel) - -Creates a new sibling selector. - -=item * $ssel->NodeType([$node_type]) - -get/set the node type to which we apply - -=item * $ssel->Selector([$sel]) - -get/set the selector's sub selector - -=item * $ssel->SiblingSelector([$sib_sel]) - -get/set the selector's sibling selector - -=back - -=head1 AUTHOR - -Robin Berjon <ro...@kn...> - -This module is licensed under the same terms as Perl itself. - -=cut + +### +# CSS:... [truncated message content] |