Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

html::html5::parser::error(3pm) [debian man page]

HTML::HTML5::Parser::Error(3pm) 			User Contributed Perl Documentation			   HTML::HTML5::Parser::Error(3pm)

NAME
HTML::HTML5::Parser::Error - an error that occured during parsing DESCRIPTION
Note that HTML::HTML5::Parser is not a validation tool, and there are many classes of error that it does not care about, so will not raise. The "error_handler" and "errors" methods of "HTML::HTML5::Parser" generate "HTML::HTML5::Parser::Error" objects. "HTML::HTML5::Parser::Error" overloads stringification, so can be printed, matched against regular expressions, etc. Constructor "new(level=>$level, type=>$type, token=>$token, ...)" Constructs a new "HTML::HTML5::Parser::Error" object. Methods "level" Returns the level of error. ('MUST', 'SHOULD', 'WARN', 'INFO' or undef.) "layer" Returns the parsing layer involved, often undef. e.g. 'encode'. "type" Returns the type of error as a string. "tag_name" Returns the tag name (if any). "source_line" ($line, $col) = $error->source_line(); $line = $error->source_line; In scalar context, "source_line" returns the line number of the source code that triggered the error. In list context, returns a line/column pair. (Tab characters count as one column, not eight.) "to_string" Returns a friendly error string. SEE ALSO
HTML::HTML5::Parser. AUTHOR
Toby Inkster, <tobyink@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2011-2012 by Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-03-19 HTML::HTML5::Parser::Error(3pm)

Check Out this Related Man Page

RDF::TrineX::Parser::RDFa(3pm)				User Contributed Perl Documentation			    RDF::TrineX::Parser::RDFa(3pm)

NAME
RDF::TrineX::Parser::RDFa - RDF::Trine::Parser-compatible interface for RDF::RDFa::Parser DESCRIPTION
While RDF::RDFa::Parser is a good RDFa parser, its interface is a tad... shall we say... crufty. RDF::TrineX::Parser::RDFa provides a much nicer interface, and is a subclass of RDF::Trine::Parser, so you get super-polymorphic benefits. Yay! Class Method "parse_url_into_model($url, $model, %args)" As per the method of the same name in RDF::Trine::Parser, this retrieves the URL and parses it into a model. Unlike RDF::Trine::Parser, this method always assumes you're trying to parse some variety of RDFa. Constructor "new(%options)" Constructs a new RDF::TrineX::Parser::RDFa parser. The two important options are flavour (which defaults to 'xhtml') and version (which defaults to '1.1'). Other options are documented in RDF::RDFa::Parser::Config. Let's imagine that you want to parse RDFa 1.1 in HTML5, and you want to also parse the "role", "longdesc" and "cite" attibutes (which are not strictly part of RDFa, but nevertheless often interesting). Then you'd use: my $parser = RDF::TrineX::Parser::RDFa->new( flavour => 'html5', version => '1.1', role_attr => 1, longdesc_attr => 1, cite_attr => 1, ); Object Methods The following methods are supported, as documented in RDF::Trine::Parser. "parse_into_model($base_uri, $data, $model [,context => $context])" "parse($base_uri, $data, &handler)" "parse_file_into_model($base_uri, $fh, $model [,context => $context])" "parse_file($base_uri, $fh, &handler)" The following additional methods are supported: "rdfa_flavour" Returns the RDFa host language being used. "rdfa_version" Returns the RDFa version number being used. Subclasses The following subclasses of RDF::TrineX::Parser::RDFa exist: RDF::TrineX::Parser::XHTML_RDFa10 RDF::TrineX::Parser::HTML32_RDFa10 RDF::TrineX::Parser::HTML4_RDFa10 RDF::TrineX::Parser::HTML5_RDFa10 RDF::TrineX::Parser::XHTML5_RDFa10 RDF::TrineX::Parser::Atom_RDFa10 RDF::TrineX::Parser::DataRSS_RDFa10 RDF::TrineX::Parser::SVG_RDFa10 RDF::TrineX::Parser::XML_RDFa10 RDF::TrineX::Parser::OpenDocument_RDFa10 RDF::TrineX::Parser::XHTML_RDFa11 RDF::TrineX::Parser::HTML32_RDFa11 RDF::TrineX::Parser::HTML4_RDFa11 RDF::TrineX::Parser::HTML5_RDFa11 RDF::TrineX::Parser::XHTML5_RDFa11 RDF::TrineX::Parser::Atom_RDFa11 RDF::TrineX::Parser::DataRSS_RDFa11 RDF::TrineX::Parser::SVG_RDFa11 RDF::TrineX::Parser::XML_RDFa11 RDF::TrineX::Parser::OpenDocument_RDFa11 By using these classes, you can skip the need to pass the 'flavour' and 'version' options to the constructor. For example: my $parser = RDF::TrineX::Parser::HTML5_RDFa11->new( role_attr => 1, longdesc_attr => 1, cite_attr => 1, ); Note that these are classes, but they are not modules. You should not attempt to load them with "require" or "use". SEE ALSO
RDF::Trine::Parser, RDF::RDFa::Parser, RDF::RDFa::Parser::Config. <http://www.perlrdf.org/>, <http://rdfa.info/>. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT AND LICENCE
Copyright 2012 Toby Inkster This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. perl v5.14.2 2012-06-05 RDF::TrineX::Parser::RDFa(3pm)
Man Page