HTML5 Elements for UNIX.COM


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? HTML5 Elements for UNIX.COM
# 8  
Old 11-29-2018
Status: Making progress on the "showthread" template.... currently 34 HTML Validator warnings and errors.

Early, I have fixed all of these errors, but some errors I fixed caused the quick reply function to break (changing name= to id= tags), so I had to revert about a hours worth of work Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to declare an array in UNIX and print the elements with tab delimits?

Hello, In a shell script, I want to declare an array and subsequently print the elements with tab delimits. My array has the following structure and arbitrary elements: myArray=('fgh' 'ijk' 'xyz' 'abc'); Next, I would like to print it with a '\n' at the end. Thanks for your input! ... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

2. Programming

Array Elements Check

Hi everyone, :) I'm trying to make a simple C program that scans an array of chars to see if its elements are similar. I can't understand what's wrong. Could you help me to fix this? Here is the code. Thanks! #include<stdio.h> int main() { int arr; int i, len; int flag =... (10 Replies)
Discussion started by: IgorGest
10 Replies

3. Shell Programming and Scripting

How to delete first elements from files?

Hello, I want to select first element from 2 to 3 files how I would do that. e.g my input files are:- file1=(1,2,3,4) file2 =(1,2,3,4) file3=(1,2,3,4) output should be outputfile=(1,1,1,1) (12 Replies)
Discussion started by: shazo
12 Replies

4. IP Networking

testing network elements

for testing network elements which of the below is TRUE a)Thorough understanding of RFC s/ IETF standards is enough. b)One has to know design specifications along with standards and specification. c)Understanding customer requirements is required for acceptance test only and not for... (0 Replies)
Discussion started by: venkatadilip
0 Replies

5. UNIX for Dummies Questions & Answers

Help with editing string elements

Hi All I have a question. I would like to edit some string characters by replacing with characters of choice located in another file. For example in sample file>S5_SK1.chr01 NNNNNNNNNNNNNNNNNNNCAGCATGCAATAAGGTGACATAGATATACCCACACACCACACCCTAACACTAACCCTAATCTAACCCTGGCCAACCTGTTT... (9 Replies)
Discussion started by: pawannoel
9 Replies

6. UNIX and Linux Applications

graphical elements under Control-M

Hello Guys... My customer is trying to use Control-M to schedule a batch file that runs my application and executes one Javascript, but he is facing problems with the graphical ellements from my application, that has a splash screen showing the name of the application, the license used and a... (0 Replies)
Discussion started by: ftrapnell
0 Replies

7. Shell Programming and Scripting

just want certail elements

I just want to be able to take every 6 value out of an arrays can someone tell me what i'm doing wrong? the data looks like 1500680,Treverbyn,397,1,2136,4420 and i want the 2 element treverbyn out of every row #hour0.pl my $url = 'http://en19.tribalwars.net/map/tribe.txt'; use... (1 Reply)
Discussion started by: frenchface
1 Replies

8. Shell Programming and Scripting

To return the elements of array

Hi, Please can someone help to return the array elements from a function. Currently the problem I face is that tempValue stores the value in myValue as a string while I need an array of values to be returned instead of string. Many Thanks, Sudhakar the function called is: ... (5 Replies)
Discussion started by: Sudhakar333
5 Replies
Login or Register to Ask a Question
HTML::HTML5::Microdata::Parser(3pm)			User Contributed Perl Documentation		       HTML::HTML5::Microdata::Parser(3pm)

NAME
HTML::HTML5::Microdata::Parser - fairly experimental parser for HTML 'microdata' SYNOPSIS
use HTML::HTML5::Microdata::Parser; my $parser = HTML::HTML5::Microdata::Parser->new($html, $baseURI); my $graph = $parser->graph; DESCRIPTION
This package aims to have a roughly compatible API to RDF::RDFa::Parser. Microdata is an experimental metadata format, not in wide use. Use this module at your own risk. $p = HTML::HTML5::Microdata::Parser->new($html, $baseuri, \%options, $storage) This method creates a new HTML::HTML5::Microdata::Parser object and returns it. The $xhtml variable may contain an XHTML/XML string, or a XML::LibXML::Document. If a string, the document is parsed using HTML::HTML5::Parser and HTML::HTML5::Sanity, which may throw an exception. HTML::HTML5::Microdata::Parser does not catch the exception. The base URI is used to resolve relative URIs found in the document. Options [default in brackets]: * alt_stylesheet - Magic rel="alternate stylesheet". [1] * auto_config - See section "Auto Config" [0] * mhe_lang - Process <meta http-equiv=Content-Language>. [1] * prefix_empty - URI prefix for itemprops of untyped items. [undef] * strategy - URI generation strategy for itemprops of typed items. [HTML::HTML5::Microdata:: Strategy::Heuristic] * tdb_service - thing-described-by.org when possible. [0] * xhtml_base - Process <base href> element. [1] * xhtml_lang - Process @lang. [1] * xhtml_meta - Process <meta>. [0] * xhtml_cite - Process @cite. [0] * xhtml_rel - Process @rel. [0] * xhtml_time - Process <time> element more nicely. [0] * xhtml_title - Process <title> element. [0] * xml_lang - Process @xml:lang. [1] $storage is an RDF::Trine::Storage object. If undef, then a new temporary store is created. $p->xhtml Returns the HTML source of the document being parsed. $p->uri Returns the base URI of the document being parsed. This will usually be the same as the base URI provided to the constructor, but may differ if the document contains a <base> HTML element. Optionally it may be passed a parameter - an absolute or relative URI - in which case it returns the same URI which it was passed as a parameter, but as an absolute URI, resolved relative to the document's base URI. This seems like two unrelated functions, but if you consider the consequence of passing a relative URI consisting of a zero-length string, it in fact makes sense. $p->dom Returns the parsed XML::LibXML::Document. $p->set_callbacks(\%callbacks) Set callback functions for the parser to call on certain events. These are only necessary if you want to do something especially unusual. $p->set_callbacks({ 'pretriple_resource' => sub { ... } , 'pretriple_literal' => sub { ... } , 'ontriple' => undef , }); Either of the two pretriple callbacks can be set to the string 'print' instead of a coderef. This enables built-in callbacks for printing Turtle to STDOUT. For details of the callback functions, see the section CALLBACKS. "set_callbacks" must be used before "consume". "set_callbacks" itself returns a reference to the parser object itself. $p->consume The document is parsed for Microdata. Nothing of interest is returned by this function, but the triples extracted from the document are passed to the callbacks as each one is found. The "graph" method automatically calls "consume", so normally you don't need to call it manually. If you're using callback functions, it may be useful though. $p->consume_microdata_item($element) You almost certainly do not want to use this method. It will consume a single Microdata item, assuming that $element is an element that does or should have the @itemscope attribute set. Returns the URI or blank node identifier for the item. This method is exposed mostly for the benefit of HTML::HTML5::Microdata::ToRDFa. $p->graph() This method will return an RDF::Trine::Model object with all statements of the full graph. $p->graphs() Provided for RDF::RDFa::Parser compatibility. CALLBACKS
Several callback functions are provided. These may be set using the "set_callbacks" function, which taskes a hashref of keys pointing to coderefs. The keys are named for the event to fire the callback on. pretriple_resource This is called when a triple has been found, but before preparing the triple for adding to the model. It is only called for triples with a non-literal object value. The parameters passed to the callback function are: o A reference to the "HTML::HTML5::Microdata::Parser" object o A reference to the "XML::LibXML::Element" being parsed o Subject URI or bnode (string) o Predicate URI (string) o Object URI or bnode (string) The callback should return 1 to tell the parser to skip this triple (not add it to the graph); return 0 otherwise. pretriple_literal This is the equivalent of pretriple_resource, but is only called for triples with a literal object value. The parameters passed to the callback function are: o A reference to the "HTML::HTML5::Microdata::Parser" object o A reference to the "XML::LibXML::Element" being parsed o Subject URI or bnode (string) o Predicate URI (string) o Object literal (string) o Datatype URI (string or undef) o Language (string or undef) Beware: sometimes both a datatype and a language will be passed. This goes beyond the normal RDF data model.) The callback should return 1 to tell the parser to skip this triple (not add it to the graph); return 0 otherwise. ontriple This is called once a triple is ready to be added to the graph. (After the pretriple callbacks.) The parameters passed to the callback function are: o A reference to the "HTML::HTML5::Microdata::Parser" object o A reference to the "XML::LibXML::Element" being parsed o An RDF::Trine::Statement object. The callback should return 1 to tell the parser to skip this triple (not add it to the graph); return 0 otherwise. The callback may modify the RDF::Trine::Statement object. ITEMPROP URI GENERATION STRATEGY
The "itemprop" attribute does not need to be a full URI. <div itemscope itemtype="http://example.com/Person"> <span itemprop="phoneNumber">01234 567 890</span> </div> The "strategy" option passed to the constructor tells the parser how to convert "phoneNumber" in the above example into a URI. This can be a callback function, or an object or class that provides a "generate_uri" method. Three strategies are bundled with this distribution: o HTML::HTML5::Microdata::Strategy::Basic - don't attempt to convert to a URI o HTML::HTML5::Microdata::Strategy::Heuristic - smart strategy, the default o HTML::HTML5::Microdata::Strategy::Microdata0 - official strategy of early Microdata drafts AUTO CONFIG
HTML::HTML5::Microdata::Parser has a lot of different options that can be switched on and off. Sometimes it might be useful to allow the page being parsed to control some of the options. If you switch on the 'auto_config' option, pages can do this. A page can set options using a specially crafted <meta> tag: <meta name="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#auto_config" content="alt_stylesheet=0&amp;prefix_empty=http://example.net/" /> Note that the "content" attribute is an application/x-www-form-urlencoded string (which must then be HTML-escaped of course). Semicolons may be used instead of ampersands, as these tend to look nicer: <meta name="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#auto_config" content="alt_stylesheet=0;prefix_empty=http://example.net/" /> Any option allowed in the constructor may be given using auto config, except 'auto_config' itself. SEE ALSO
XML::LibXML, RDF::Trine, RDF::RDFa::Parser, HTML::HTML5::Parser, HTML::HTML5::Sanity. <http://www.perlrdf.org/>. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT AND LICENCE
Copyright (C) 2009-2011 by Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl 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 2011-10-26 HTML::HTML5::Microdata::Parser(3pm)