CSS::SAC::LexicalUnit

CSS::SAC::LexicalUnit is a Perl module that contains SAC units.
Download

CSS::SAC::LexicalUnit Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Robin Berjon
  • Publisher web site:
  • http://search.cpan.org/~rberjon/XML-XPathExt-0.01_01/XPathExt.pm

CSS::SAC::LexicalUnit Tags


CSS::SAC::LexicalUnit Description

CSS::SAC::LexicalUnit is a Perl module that contains SAC units. CSS::SAC::LexicalUnit is a Perl module that contains SAC units.SYNOPSIS use CSS::SAC::LexicalUnit qw(:constants); foo if $lu->is_type(LU_TYPE_CONSTANT);In the SAC spec, LexicalUnit is a linked list, that is, you only ever hold one LexicalUnit, and you ask for the next of for the previous one when you want to move on.Such a model seems awkward, though I'm sure it makes sense somehow in Java, likely for a Java-specific reason.In the Perl implementation, I have changed this. A LexicalUnit is an object that stands on it's own and has no next/previous objects. Instead, the $handler->property callback gets called with a LexicalUnitList, which is in fact just an array ref of LexicalUnits.We also don't differentiate between IntegerValue, FloatValue, and StringValue, it's always Value in Perl. This also applies to Parameters and SubValues. Both are called as Value and return an array ref of LexicalUnits.I added the is_type() method, see CSS::SAC::Condition for advantages of that approach.CONSTANTS· ATTR· CENTIMETER· COUNTER_FUNCTION· COUNTERS_FUNCTION· DEGREE· DIMENSION· EM· EX· FUNCTION· GRADIAN· HERTZ· IDENT· INCH· INHERIT· INTEGER· KILOHERTZ· MILLIMETER· MILLISECOND· OPERATOR_COMMA· OPERATOR_EXP· OPERATOR_GE· OPERATOR_GT· OPERATOR_LE· OPERATOR_LT· OPERATOR_MINUS· OPERATOR_MOD· OPERATOR_MULTIPLY· OPERATOR_PLUS· OPERATOR_SLASH· OPERATOR_TILDE· PERCENTAGE· PICA· PIXEL· POINT· RADIAN· REAL· RECT_FUNCTION· RGBCOLOR· SECOND· STRING_VALUE· SUB_EXPRESSION· UNICODERANGE· URIMETHODSCSS::SAC::LexicalUnit->new($type,$text,$value) or $lu->new($type,$text,$value) Creates a new unit. The $type must be one of the type constants, the text depends on the type of unit (unit text, func name, etc...), and the value is the content of the lu.$lu->DimensionUnitText() or getDimensionUnitText get/set the text of the dimension unit (eg cm, px, etc...)$lu->FunctionName() or getFunctionName get/set the name of the function (eg attr, uri, etc...)$lu->Value() or getValue get/set the value of the lu (which may be another lu, or a lu list)$lu->LexicalUnitType() or getLexicalUnitType get/set the type of the lu$lu->is_type($lu_constant) returns true is this lu is of type $lu_constant Requirements: · Perl


CSS::SAC::LexicalUnit Related Software