├── .gitignore ├── LICENSE ├── README.md ├── autotest.php ├── class ├── controller.php ├── hcardvalidator.php ├── loader.php ├── validationresult.php └── vcard.php ├── compilelangs.sh ├── encode └── index.php ├── examples ├── acid.html ├── example 1.html ├── example 10.html ├── example 11.html ├── example 2.html ├── example 3.html ├── example 4.html ├── example 5.html ├── example 6.html ├── example 7.html ├── example 8.html ├── example 9.html ├── geo 1.html ├── geo 2.html ├── hcard in atom.atom ├── ignored_classes.html ├── im invalid.html ├── im valid.html ├── implied n.html ├── include 2.html ├── include 3.html ├── include.html ├── missing_fields.html ├── nested.html ├── obfuscated_email.html ├── orphan_adr.html ├── value_problems 1.html ├── value_problems 2.html ├── values.html ├── xhtml_multi_profile.html ├── xhtml_no_head.html ├── xhtml_no_profile.html ├── xhtml_wrong_profile.html └── xhtml_xmlns.html ├── i ├── error.png ├── favicon.png ├── grad.png ├── info.png ├── invalid.png ├── logo.png ├── style.css ├── valid.png └── warn.png ├── index.php ├── locale ├── cs │ └── LC_MESSAGES │ │ ├── errors.po │ │ ├── main.po │ │ └── props.po ├── en │ └── LC_MESSAGES │ │ ├── errors.po │ │ ├── main.po │ │ └── props.po ├── fr │ └── LC_MESSAGES │ │ ├── errors.po │ │ ├── main.po │ │ └── props.po └── pl │ └── LC_MESSAGES │ ├── errors.po │ ├── main.po │ └── props.po ├── referrer └── index.php ├── robots.txt ├── tpl └── main.html ├── xmlcatalog.xml ├── xmlcatalog ├── xhtml-attribs-1.mod ├── xhtml-charent-1.mod ├── xhtml-datatypes-1.mod ├── xhtml-events-1.mod ├── xhtml-framework-1.mod ├── xhtml-inlstyle-1.mod ├── xhtml-lat1.ent ├── xhtml-qname-1.mod ├── xhtml-special.ent ├── xhtml-symbol.ent ├── xhtml1-strict.dtd ├── xhtml1-trans.dtd ├── xhtml11-model-1.mod └── xhtml11.dtd └── xslt ├── COPYING ├── hcard.xslt ├── html2xhtml.xslt └── include.xslt /.gitignore: -------------------------------------------------------------------------------- 1 | *.mo 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2010 Kornel Lesiński. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | * Neither the name of the the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 19 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/ "This project is not actively maintained") 2 | 3 | #hCard Validator 4 | 5 | Conformance checker for the [hCard microformat](http://microformats.org/wiki/hcard). 6 | 7 | It's a tool written in a mix of PHP and XSLT that checks hCards against the specification. 8 | 9 | ##Live demo 10 | 11 | You can use live version at [hcard.geekhood.net](http://hcard.geekhood.net/). 12 | 13 | ##TODO 14 | 15 | * hCard validator doesn't support latest version of the spec with value class pattern. 16 | * other microformats are not supported. I'd like this project to evolve into conformance checker for all microformats. 17 | 18 | [See issues](http://github.com/pornel/hCardValidator/issues) 19 | 20 | ##Running 21 | 22 | [Setup instructions](http://github.com/pornel/hCardValidator/wiki/Installation) 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /autotest.php: -------------------------------------------------------------------------------- 1 | validator = new hCardValidator(); 20 | } 21 | 22 | private $unexpected_errors = 0; 23 | 24 | function testFile($file, array $expected = []) 25 | { 26 | if (!is_file($file)) return; 27 | 28 | echo '

'.$file.'

'; 29 | $result = $this->validator->validateFile($file); 30 | 31 | $this->addExpectedErrorsFromFile($file, $expected); 32 | 33 | $this->checkResult($result,$expected); 34 | 35 | foreach($expected as $notfound => $x) 36 | { 37 | if (!$x) continue; 38 | 39 | echo "

Expected error $notfound not found".($x > 1 ? " ×$x":"")."

"; 40 | foreach($result->vcards as $vcard) 41 | { 42 | echo '
'.htmlspecialchars(print_r($vcard->data,true)).'
'; 43 | $this->unexpected_errors++; 44 | } 45 | } 46 | echo '
'; 47 | 48 | if ($this->unexpected_errors > 15) throw new Exception("Enough errors"); 49 | } 50 | 51 | private function addExpectedErrorsFromFile($file, array &$expected) 52 | { 53 | if (preg_match_all('/@expect:?\s*([^-\n;]+)/',file_get_contents($file),$m)) 54 | { 55 | foreach($m[1] as $line) 56 | { 57 | foreach(preg_split('/[ ,]+/',$line,NULL,PREG_SPLIT_NO_EMPTY) as $errclass) 58 | { 59 | if(isset($expected[$errclass])) $expected[$errclass]++; else $expected[$errclass] = 1; 60 | } 61 | } 62 | } 63 | } 64 | 65 | /** 66 | * Compares errors in $result with counters in $expected and displays result 67 | * 68 | * @param $expected passed by reference to decrement counters in recursively checked hcards 69 | */ 70 | private function checkResult($result, array &$expected) 71 | { 72 | $hadUnexpectedErrors = false; 73 | 74 | foreach($result->errors as $k => $e) 75 | { 76 | if (isset($expected[ $e['class'] ])) 77 | { 78 | if ($expected[ $e['class'] ]) 79 | { 80 | $result->errors[$k]['expected'] = true; 81 | echo ''.$e['class'].' #'.$expected[ $e['class'] ].' '; 82 | $expected[ $e['class'] ]--; 83 | } 84 | else if (isset($expected[ $e['class'] ])) 85 | { 86 | echo ''.$e['class'].' - occured too many times '; 87 | } 88 | } 89 | } 90 | 91 | foreach($result->errors as $e) 92 | { 93 | if (empty($e['expected'])) 94 | { 95 | $hadUnexpectedErrors = true; 96 | 97 | $args = $e['args']; 98 | array_unshift($args,str_replace('%s','%s',$e['message'])); 99 | 100 | echo '

'.ucwords($e['type']).' ['.$e['class'].']: '.call_user_func_array('sprintf',$args)." ".$e['location']."

"; 101 | } 102 | } 103 | 104 | foreach($result->vcards as $vcard) 105 | { 106 | if ($this->checkResult($vcard->result, $expected)) 107 | { 108 | $hadUnexpectedErrors = true; 109 | echo '
'.htmlspecialchars(print_r($vcard->data,true)).'
'; 110 | $this->unexpected_errors++; 111 | } 112 | } 113 | 114 | return $hadUnexpectedErrors; 115 | } 116 | 117 | function testAll() 118 | { 119 | header("Content-Type:text/html;charset=UTF-8"); 120 | ?>

Selftest

testFile($file); 130 | $filesnum++; 131 | } 132 | 133 | $files = glob("tests/*"); 134 | foreach($files as $file) 135 | { 136 | // tests use filename same as error ID, 137 | // so I don't need to put @expected comment in every one 138 | $expected_error_name = basename($file, '.html'); 139 | $this->testFile($file, [$expected_error_name =>1]); 140 | $filesnum++; 141 | } 142 | 143 | $files = glob("examples/*"); 144 | foreach($files as $file) 145 | { 146 | $this->testFile($file); 147 | $filesnum++; 148 | } 149 | } 150 | catch(Exception $e) 151 | { 152 | echo('

'.htmlspecialchars($e->getMessage()).'

'.$e.'
'); 153 | } 154 | $total = max(0.001,microtime(true) - $start); 155 | 156 | echo '

Done '.$filesnum.' files at '.round($filesnum / $total).' files/s

'; 157 | } 158 | } 159 | 160 | $c = new Controller(); 161 | $c->init(true); 162 | 163 | $t = new AutoTest(); 164 | $t->testAll(); 165 | -------------------------------------------------------------------------------- /class/loader.php: -------------------------------------------------------------------------------- 1 | url;} 8 | 9 | /** 10 | * i18nable messages must pass variable bits separately 11 | * @return array(i18n key, array(vars)) 12 | */ 13 | function getMessageArgs(){return [$this->msg_class,$this->args];} 14 | 15 | function __construct($default_msg, $msg_class, array $args = [],$url = NULL) 16 | { 17 | parent::__construct($default_msg); 18 | $this->url = $url; 19 | $this->args = $args; 20 | $this->msg_class = $msg_class; 21 | } 22 | } 23 | 24 | class LoaderURL 25 | { 26 | function __construct($url) 27 | { 28 | list($hostname,$ip,$path) = $this->paranoidURLSanitization($url); 29 | 30 | $this->hostname = $hostname; 31 | $this->ip = $ip; 32 | $this->path = $path; 33 | } 34 | 35 | private $hostname, $ip, $path; 36 | 37 | function __toString(){return $this->getURL();} 38 | 39 | function getURL() 40 | { 41 | return 'http://'.$this->hostname.$this->path; 42 | } 43 | 44 | function getIPURL() 45 | { 46 | return 'http://'.$this->ip.$this->path; 47 | } 48 | 49 | function getHost() 50 | { 51 | return $this->hostname; 52 | } 53 | 54 | function getPath() 55 | { 56 | return $this->path; 57 | } 58 | 59 | /** 60 | * @return array($hostname,$ip,$path) 61 | */ 62 | private function paranoidURLSanitization($url) 63 | { 64 | $standard_excuse = "URL not allowed\nPardon me being paranoid about security, but this URL doesn't look innocent enough (HTTP with hostname and without authentication or ports please)."; 65 | 66 | $url = trim($url); 67 | $url = preg_replace_callback('/([\x00-\x20\x7f-\xff]+)/',function($m){return rawurlencode($m[0]);},$url); 68 | 69 | if (!preg_match('/https?:\/\//',$url)) $url = 'http://'.$url; 70 | 71 | // PHP's built-in filter is rather weak, so don't stop there 72 | $url = filter_var($url,FILTER_SANITIZE_URL); 73 | $url = filter_var($url,FILTER_VALIDATE_URL,FILTER_FLAG_HOST_REQUIRED|FILTER_FLAG_SCHEME_REQUIRED); 74 | 75 | if (!preg_match('/^https?:\/\/((?:[a-z0-9][a-z0-9-]*\.)+[a-z]{2,6})\.?(\/[^#]*)?(?:#.*)?$/i',$url,$m)) 76 | { 77 | throw new LoaderException($standard_excuse,"invalid_url",[],$url); 78 | } 79 | 80 | $hostname = strtolower($m[1]); 81 | $path = isset($m[2]) ? $m[2] : '/'; 82 | 83 | if (preg_match('/\.sblam\.com$|api\.geekhood.net$|\.local$/',$hostname)) 84 | { 85 | throw new LoaderException($standard_excuse,"invalid_url",[],$url); 86 | } 87 | 88 | $ip = gethostbyname($hostname); 89 | if (!$ip || $ip == $m[1]) 90 | { 91 | throw new LoaderException("Can't find hostname.","dns_error",[$hostname],'http://'.$hostname.$path); 92 | } 93 | 94 | if (!($ip = filter_var($ip,FILTER_VALIDATE_IP,FILTER_FLAG_IPV4|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))) 95 | { 96 | throw new LoaderException($standard_excuse,"invalid_url",[],'http://'.$hostname.$path); 97 | } 98 | 99 | return [$hostname,$ip,$path]; 100 | } 101 | } 102 | 103 | class Loader 104 | { 105 | /** 106 | * get URL content from teh internets 107 | * 108 | * @return array($content,$response_headers,$url); 109 | */ 110 | function fetchURL($url) 111 | { 112 | $lurl = new LoaderURL($url); 113 | 114 | // send XFF header 115 | $xff = $_SERVER['REMOTE_ADDR']; 116 | 117 | // if there's existing one, append 118 | if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match('/^[ ,0-9.]+$/',$_SERVER['HTTP_X_FORWARDED_FOR'])) 119 | { 120 | $xff .= ', '.trim($_SERVER['HTTP_X_FORWARDED_FOR']); 121 | } 122 | 123 | $headers = [ 124 | 'Accept' => 'application/xhtml+xml, application/xml;q=0.9, text/html;q=0.1', // Apache with Multiviews doesn't seem to like it. Poor baby. 125 | 'User-Agent' => 'hCardValidator/1 PHP/5 (http://hcard.geekhood.net)', 126 | 'Referer' => 'http://'.$_SERVER['HTTP_HOST'].'/', 127 | 'X-Forwarded-For' => $xff, 128 | ]; 129 | 130 | return $this->performURLFetch($lurl,$headers); 131 | } 132 | 133 | /** 134 | * HTTP response parser 135 | */ 136 | private function getHeaders($wrapper_data) 137 | { 138 | $response_headers = []; 139 | 140 | if ($wrapper_data && is_array($wrapper_data)) foreach($wrapper_data as $h) 141 | { 142 | if (preg_match('/^([^\s]+)\s*:\s*(.*)$/i',$h,$m)) 143 | { 144 | $response_headers[strtolower($m[1])] = $m[2]; 145 | } 146 | else if (preg_match('/^HTTP\/1\..\s+(\d+)/',$h,$m)) 147 | { 148 | $response_headers['status'] = $m[1]; 149 | } 150 | } 151 | 152 | return $response_headers; 153 | } 154 | 155 | private function throwError(LoaderURL $lurl,array $response_headers) 156 | { 157 | if (empty($response_headers['status'])) 158 | { 159 | throw new LoaderException("Server may be down.","request_failed",[$lurl->getHost()],$lurl->getURL()); 160 | } 161 | 162 | if ($response_headers['status'] == 404 || $response_headers['status'] == 410) 163 | { 164 | throw new LoaderException("File not found","file_not_found",[$lurl->getPath(),$lurl->getHost()],$lurl->getURL()); 165 | } 166 | 167 | if ($response_headers['status'] >= 300 && $response_headers['status'] < 400) 168 | { 169 | throw new LoaderException("Invalid redirect","invalid_redirect",[],$lurl->getURL()); 170 | } 171 | 172 | throw new LoaderException("HTTP error","http_error",[$response_headers['status']],$lurl->getURL()); 173 | } 174 | 175 | private function performURLFetch(LoaderURL $lurl,array $request_headers, $redirects_allowed = 5) 176 | { 177 | global $http_response_header; // PHP is crap. This is automagic variable that's used instead of something that makes sense to sober people. 178 | 179 | $headers_string = ''; 180 | $request_headers['Host'] = $lurl->getHost(); 181 | foreach($request_headers as $k => $v) 182 | { 183 | $headers_string .= "$k: ".preg_replace('/\s+/',' ',$v)."\r\n"; 184 | } 185 | 186 | $ctx = stream_context_create([ 187 | 'http'=>[ 188 | 'method'=>'GET', 189 | 'max_redirects'=>0, // I want to handle redirects myself 190 | 'timeout'=>10, 191 | 'header'=>$headers_string, 192 | ]]); 193 | 194 | $http_response_header = NULL; // PHP is crap² 195 | $fp = @fopen($lurl->getIPURL(),"rb",false,$ctx); 196 | if (!$fp) 197 | { 198 | $response_headers = $this->getHeaders($http_response_header); 199 | } 200 | else 201 | { 202 | $metadata = stream_get_meta_data($fp); 203 | if (empty($metadata['wrapper_data'])) throw new Exception("PHP Sucks"); 204 | $response_headers = $this->getHeaders($metadata['wrapper_data']); 205 | } 206 | 207 | if (empty($response_headers['status']) || $response_headers['status'] < 100 || $response_headers['status'] >= 400) 208 | { 209 | $this->throwError($lurl,$response_headers); 210 | } 211 | elseif ($response_headers['status'] >= 300 && $response_headers['status'] < 400) 212 | { 213 | if (empty($response_headers['location']) || $redirects_allowed <= 0) 214 | { 215 | $this->throwError($lurl,$response_headers); 216 | } 217 | $newurl = new LoaderURL($response_headers['location']); 218 | return $this->performURLFetch($newurl, $request_headers, $redirects_allowed - 1); 219 | } 220 | else 221 | { 222 | $maxlen = 800000; 223 | $file = stream_get_contents($fp,$maxlen); 224 | if (strlen($file) >= $maxlen) 225 | { 226 | throw new LoaderException("File larger than maximum size","maximum_file_size",[round($maxlen/1000)],$url); 227 | } 228 | return [$file,$response_headers,$lurl->getURL()]; 229 | } 230 | } 231 | 232 | } 233 | -------------------------------------------------------------------------------- /class/validationresult.php: -------------------------------------------------------------------------------- 1 | isValid = true; 24 | $this->fileName = $fileName; 25 | } 26 | 27 | /** 28 | * hcard.xslt creates bunch of nice elements, which aren't very useful in their Node'ish form. 29 | * Cram everything into arrays and objects instead! 30 | * 31 | * @return void 32 | */ 33 | function addFromDoc(DOMDocument $doc) 34 | { 35 | $xp = new DOMXPath($doc); 36 | $xp->registerNamespace('v','http://pornel.net/hcard-validator'); // my hacks 37 | $xp->registerNamespace('c','http://www.w3.org/2006/03/hcard'); // let's pretend this is real 38 | 39 | // first get all errors that don't belong to any particular vcard 40 | foreach($xp->query('(//v:error|//v:warn|//v:info)[not(ancestor::c:vcard)]') as $node) 41 | { 42 | $args = []; 43 | foreach($xp->query('v:arg',$node) as $arg) 44 | { 45 | $args[] = $arg->textContent; 46 | } 47 | $this->add($node->localName,$node->getAttribute('id'),Controller::escapeXML($node->textContent),$args,$node->getAttribute('href')); 48 | $node->parentNode->removeChild($node); // clean up errors 49 | } 50 | 51 | // then extract vcards and their errors 52 | foreach($xp->query('//c:vcard') as $vcardNode) 53 | { 54 | $result = new ValidationResult($this->fileName); 55 | foreach($xp->query('(.//v:error|.//v:warn|.//v:info)',$vcardNode) as $node) 56 | { 57 | // build nice location string which won't be used anyway! :) 58 | $location = ''; 59 | foreach($xp->query('ancestor::c:*',$node) as $parent) 60 | { 61 | if ($parent->localName == 'vcard') break; 62 | $location .= ($location ? ' » ':'').$parent->localName; 63 | } 64 | 65 | // args for i18n strings 66 | $args = []; 67 | foreach($xp->query('v:arg',$node) as $arg) 68 | { 69 | $args[] = $arg->textContent; 70 | } 71 | $result->add($node->localName,$node->getAttribute('id'),Controller::escapeXML($node->textContent),$args,$node->getAttribute('href'),$location); 72 | $node->parentNode->removeChild($node); // clean up errors 73 | } 74 | 75 | $vcard = new vCard($vcardNode,$result); 76 | $this->vcards[] = $vcard; 77 | } 78 | } 79 | 80 | /** 81 | * add new error 82 | * 83 | * @param $type - error, warn or info 84 | * @param $error_class - @see localizedMessage 85 | * @param $default_message - if message has more than one line, first line is used as header, rest is body. 86 | * @param $args - @see localizedMessage 87 | * @param $href - link to more detailed explanation of the error 88 | * @param $location - (string) where the error has occured 89 | */ 90 | function add($type, $error_class, $default_message, array $args = [], $href = NULL, $location = NULL) 91 | { 92 | if ($type == 'error') $this->isValid = false; 93 | 94 | $this->errors[] = [ 95 | 'type'=>$type, 96 | 'class'=>$error_class, 97 | 'message'=>$default_message, 98 | 'args'=>$args, 99 | 'href'=>$href, 100 | 'location'=>$location, 101 | ]; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /class/vcard.php: -------------------------------------------------------------------------------- 1 | result holds vcard-specific errors. 7 | */ 8 | class vCard 9 | { 10 | public $data, $result; 11 | private $flags; 12 | 13 | function __construct(DOMNode $node, ValidationResult $result) 14 | { 15 | $this->result = $result; 16 | $this->node = $node; 17 | $this->flags = []; 18 | 19 | $this->data = $this->nodeToArray($node); 20 | if (!is_array($this->data)) 21 | { 22 | $this->data = []; // nodeToArray may return string if there are no elements! 23 | } 24 | } 25 | 26 | function flag($name) 27 | { 28 | if (!isset($this->flags[$name])) return false; 29 | 30 | return $this->flags[$name]; 31 | } 32 | 33 | function __get($name) 34 | { 35 | if (isset($this->data[$name])) return $this->data[$name]; 36 | return []; 37 | } 38 | 39 | function append($name,$value) 40 | { 41 | if (!isset($this->data[$name])) $this->data[$name] = []; 42 | $this->data[$name][] = $value; 43 | } 44 | 45 | function query($path) 46 | { 47 | $parts = explode('/',$path); 48 | $result = []; 49 | $this->queryPart($parts,$this->data,$result); 50 | return $result; 51 | } 52 | 53 | 54 | private function queryPart(array $parts, array $in, array &$result) 55 | { 56 | $prop = array_shift($parts); 57 | 58 | if (isset($in[$prop]) and is_array($in[$prop])) 59 | { 60 | if (count($parts)) 61 | { 62 | foreach($in[$prop] as $k => $v) 63 | { 64 | if (is_array($v)) 65 | { 66 | $this->queryPart($parts, $v, $result); 67 | } 68 | else 69 | { 70 | echo "WTF? $k in $prop"; 71 | } 72 | } 73 | } 74 | else 75 | { 76 | foreach($in[$prop] as $k => $v) 77 | { 78 | $result[] = $v; 79 | } 80 | } 81 | } 82 | } 83 | 84 | function allOrgNames() 85 | { 86 | $org_names = []; 87 | foreach($this->org as $org) 88 | { 89 | if (!empty($org['organization-name'])) foreach($org['organization-name'] as $name) 90 | { 91 | $org_names[] = $name; 92 | } 93 | } 94 | return $org_names; 95 | } 96 | 97 | private function nodeToArray(DOMNode $node) 98 | { 99 | $data = []; 100 | 101 | $hasElements = false; 102 | foreach($node->childNodes as $element) 103 | { 104 | if ($element->nodeType != XML_ELEMENT_NODE) continue; 105 | 106 | if ($element->namespaceURI == "http://www.w3.org/2006/03/hcard") 107 | { 108 | $hasElements = true; 109 | 110 | $name = $element->localName; 111 | if (!isset($data[$name])) $data[$name] = []; 112 | 113 | $data[$name][] = $this->nodeToArray($element); 114 | } 115 | else if ($element->namespaceURI == "http://pornel.net/hcard-validator") 116 | { 117 | if ($element->localName == 'flag') 118 | { 119 | $this->flags[ $element->getAttribute('id') ] = ($element->textContent == '') ? true : $element->textContent; 120 | } 121 | } 122 | } 123 | 124 | if (!$hasElements) 125 | { 126 | return trim($node->textContent,' '); 127 | } 128 | else 129 | { 130 | return $data; 131 | } 132 | } 133 | 134 | 135 | public function checkAndRemoveEmpty() 136 | { 137 | $this->flags['had_n'] = isset($this->data['n']); // even empty n property prevents implied nickname. this function will remove all empty props, so this needs to be saved now. 138 | 139 | $this->checkAndRemoveEmptyRecursive($this->data); 140 | } 141 | 142 | /** 143 | * hcard.xslt may produce properties with empty values 144 | * scan data (recursively) and remove properties (or subtrees) with empty values 145 | * 146 | * some properties can be empty - it's handled elsewhere 147 | */ 148 | private function checkAndRemoveEmptyRecursive(array &$data, $parent = NULL) 149 | { 150 | foreach($data as $prop => &$values) 151 | { 152 | foreach($values as $idx => &$v) 153 | { 154 | if (!is_array($v)) 155 | { 156 | if ('' === trim($v)) 157 | { 158 | $warn_or_err = "warn"; 159 | 160 | // adr and value (combined) of tel/email are not allowed to be empty 161 | if ($prop == 'adr' || ($prop == 'value' && $parent && ($parent == 'tel' || $parent == 'email'))) 162 | { 163 | $warn_or_err = "error"; 164 | } 165 | 166 | if ($parent) $this->result->add($warn_or_err,"empty_subprop","%s property of %s is empty",[$prop,$parent]); 167 | else $this->result->add($warn_or_err,"empty_prop","%s property is empty",[$prop]); 168 | 169 | unset($values[$idx]); 170 | } 171 | } 172 | else 173 | { 174 | $this->checkAndRemoveEmptyRecursive($v, $prop); 175 | if (!count($v)) 176 | { 177 | unset($values[$idx]); 178 | } 179 | } 180 | } 181 | if (!count($values)) 182 | { 183 | unset($data[$prop]); 184 | } 185 | } 186 | } 187 | } 188 | -------------------------------------------------------------------------------- /compilelangs.sh: -------------------------------------------------------------------------------- 1 | msgfmt /www/hcard/locale/en/LC_MESSAGES/errors.po -o /www/hcard/locale/en/LC_MESSAGES/errors.mo 2 | msgfmt /www/hcard/locale/en/LC_MESSAGES/props.po -o /www/hcard/locale/en/LC_MESSAGES/props.mo 3 | msgfmt /www/hcard/locale/en/LC_MESSAGES/main.po -o /www/hcard/locale/en/LC_MESSAGES/main.mo 4 | msgfmt /www/hcard/locale/pl/LC_MESSAGES/errors.po -o /www/hcard/locale/pl/LC_MESSAGES/errors.mo 5 | msgfmt /www/hcard/locale/pl/LC_MESSAGES/props.po -o /www/hcard/locale/pl/LC_MESSAGES/props.mo 6 | msgfmt /www/hcard/locale/pl/LC_MESSAGES/main.po -o /www/hcard/locale/pl/LC_MESSAGES/main.mo 7 | 8 | #sudo /usr/local/apache/sbin/apachectl restart 9 | -------------------------------------------------------------------------------- /encode/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | e-mail address obfuscator 7 |

hCard-friendly e-mail address obfuscator

8 |

It encodes e-mail addresses using random mix of urlencode, HTML entities and then generates markup that's as tricky as possible, while remaining valid and parseable by browsers and XML-compliant parsers. 9 |

10 |
(obviously, these e-mails are not collected)
11 |

12 |
13 | 60 || !ctype_alnum($m[$i]))?sprintf('%%%02x',ord($m[$i])):$m[$i]; 28 | } 29 | $m = 'mailto:%20'.$o.'?'; $o=''; // query string is allowed in mailto:, even if empty 30 | } 31 | 32 | for($i=0;$i>1) $o .= '­'; 38 | 39 | // random characters are encoded + few special characters for added trickyness. 40 | // <>& are encoded to protect encoder against XSS. 41 | if (mt_rand(0,100) > 40 || false !== strpos(" .:<>&",$m[$i])) 42 | { 43 | // mix of decimal and hexadecimal entities 44 | $format = (mt_rand(0,100) > 66) ? '&#%d;' : 45 | '&#x%'.((mt_rand()&4)?'X':'x').';'; 46 | $o .= sprintf($format, ord($m[$i])); 47 | } 48 | else 49 | { 50 | $o .= $m[$i]; 51 | } 52 | } 53 | return $o; 54 | } 55 | 56 | if (isset($_GET['addr'])) 57 | { 58 | $addr = trim($_GET['addr']); 59 | 60 | // that's class attribute containing newlines and attribute-like syntax. 61 | // should be enough to confuse regex-based extractors 62 | $out = "" . 65 | html_encode_email_address($addr,false) . 66 | ''; 67 | 68 | echo '
'.htmlspecialchars($out).'
'; 69 | echo '

Test: '.$out.'

'; 70 | } 71 | ?> 72 |
73 |

Return to the hCard Validator. 74 | -------------------------------------------------------------------------------- /examples/acid.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | µf test 8 | 9 | 10 |

War and Peace

11 |
12 |

13 | ‘Well, Prince, so Genoa and Lucca are now just family estates of the Buonapartes. But I warn you, if you don’t tell me that this means war, if you still try to defend the infamies and horrors perpetrated by that Antichrist—I really believe he is Antichrist—I will have nothing more to do with you and you are no longer my friend, no longer my “faithful slave,” as you call yourself! But how do you do? I see I have frightened you—sit down and tell me all the news.’ 14 | 15 | 16 |

17 | 18 |

19 | It was in July, 1805, and the speaker was the well–known Anna Pavlovna Scherer, maid of honor and favorite of the Empress Marya Fedorovna. With these words she greeted Prince Vasili Kuragin, a man of high rank and importance, who was the first to arrive at her reception. Anna Pavlovna had had a cough for some days. She was, as she said, suffering from la grippe; grippe being then a new word in St. Petersburg, used only by the elite. 20 | 21 | 22 | 23 | 24 | 25 |

26 |

27 | All her invitations without exception, written in French, and delivered by a scarlet-liveried footman that morning, ran as follows: 28 |

29 |

30 | ‘If you have nothing better to do, Count [or Prince], and if the prospect of spending an evening with a poor invalid is not too terrible, I shall be very charmed to see you tonight between 7 and 10—Annette Scherer.’ 31 |

32 | 33 |

34 | 35 | ‘Heavens! what a virulent attack!’ replied the prince, not in the least disconcerted by this reception. He had just entered, wearing an embroidered court uniform, knee breeches, and shoes, and had stars on his breast and a serene expression on his flat face. He spoke in that refined French in which our grandfathers not only spoke but thought, and with the gentle, patronizing intonation natural to a man of importance who had grown old in society and at court. He went up to Anna Pavlovna, kissed her hand, presenting to her his bald, scented, and shining head, and complacently seated himself on the sofa. 36 | 37 | 38 |

39 |

40 | ‘First of all, dear friend, tell me how you are. Set your friend’s mind at rest,’ said he without altering his tone, beneath the 41 | and affected sympathy of which and even irony could be discerned. 43 |

44 |
45 |
46 |

47 | 48 | Dr Jekyll 49 | 50 | aka 51 | 52 | Mr Hyde 53 | 54 |

55 |
56 | F: 57 | 0401950302 58 |
59 |
60 | P: 61 | 62 | 63 |
64 |
65 | T: 66 |
    67 |
  • 1234567890
  • 68 |
  • logo
  • 69 |
70 |
71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
 New YorkSydney is
Good
8:009:00 am
Vodka
Food
9:0010:00 am
Food
Beer
96 | 100 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /examples/example 1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Valid 1 5 | 6 | 7 | 8 |
9 | Test óóó! 10 |
11 | Work: 12 |
169 University Avenue
13 | Palo Alto, 14 | CA 15 | 94301 16 |
USA
17 |
18 |
19 | Work +1-650-289-4040 20 |
21 |
22 | Fax +1-650-289-4041 23 |
24 |
Email: 25 | 26 |
27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/example 10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 10 hcard creator 4 | 5 | 6 | 7 |
8 | 9 | Name 10 | Middle 11 | Family 12 | 13 |
Org
14 | 15 |
16 |
Street
17 | City 18 | , 19 | State 20 | , 21 | Postal 22 | 23 | Country 24 | 25 |
26 |
123-555
27 | AIM 28 | YIM 29 | Jabber 30 |

This hCard created with the hCard creator.

31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/example 11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 11 hcard-examples 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | Fréderic 12 | de Villamil 13 | 14 | 15 | neuro 16 | 19 | Omatis 20 | 21 | France 22 | home address 23 | mail and 24 | shipments: 25 | 12 rue Danton 26 | Le Kremlin-Bicetre 27 | 94270 28 | France 29 | 30 |
31 |              N 48° 81.6667
32 |              E 2° 36.6667
33 |           
34 |
35 | 36 |

37 | 38 | 39 | 40 | Eric Meyer 41 | 42 | wrote a post 43 | ( 44 | 45 | Tax Relief 46 | 47 | ) 48 | about an unintentionally humorous letter he received from the 49 | 50 | 51 | Internal Revenue Service 52 | . 53 |

54 | 55 |
56 | 57 |
58 |
Sprinkler Fitters U.A. Local 483
59 |
Apprenticeship Training Center
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /examples/example 2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 2 org 4 | 5 | 6 | 7 |
8 |

Contact Me

9 |

Jane Doe

10 |

You can contact me via email to 11 | jane@example.com, 12 | 13 | or reach me at the following address:

14 |

255 Some Street,
15 | Some Town,
16 | Some Place

17 | 18 | 19 | 20 | 21 | spelling! 22 | 23 | 24 | 25 |
26 | 27 | 28 |
29 | Tantek Çelik 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/example 3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 3 4 | 5 | 6 | 7 |
8 |

Contact Me

9 |

Jane Doe

10 | 11 | 12 |

You can contact me via email to 13 | , 14 | or reach me at the following address:

15 | 16 | 17 |
18 | 19 | Org 20 | 21 | 22 | 23 | unit 24 | 25 | 26 | 27 | ? 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 255 Some Street 36 | 37 | Some ignore Town 38 | Some Place 39 |
40 | 41 | 42 |
43 | 44 | 45 | openid! 46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /examples/example 4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 4 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Malarkey 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | Some org bla 22 | 23 | Julie 24 | 25 | 26 | 27 | Fax +1-650-289-4041 28 | 29 | 30 | Jan 31 | 32 | 33 | 34 |

photo.gif

35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /examples/example 5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 5 imgs 4 | 5 | 6 | 7 |
8 | 9 | CommerceNet 10 |
11 | Work: 12 | 169 University Avenue 13 | Alto PaloPalo Alto, 14 | CA 15 | 94301 16 |
USA
17 |
18 | 19 |
my photo
20 | 21 | my photo2 22 | my photo3 23 | my photo4 24 | 25 |
26 | Work +1-650-289-4040 27 |
28 |
Email: 29 | 30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/example 6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 6 tricky bday 4 | 5 | 6 | 7 |
8 |

Joe B.

9 | 10 | 11 |
12 |
Birthday
13 |
14 | October 27, 1985 15 |
16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/example 7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 7 hcard-examples 4 | 5 | 6 | 7 | 8 | 9 |
10 | Powell's Pool 11 | 12 | Sutton Park 13 | Birmingham 14 | England 15 | 16 |
17 | 18 | 19 |
20 |
21 |
Phone Boxes by the Sealife Centre
22 | Marine Parade
23 | Brighton & Hove, 24 | England 25 | BN2 1TB
26 | United Kingdom
27 | 01273 606674 28 |
29 | 30 |
Just a meeting place,

in case the venue changes.
31 | 32 |
33 | 34 |
35 | 36 |
37 |
38 |
Sprinkler Fitters U.A. Local 483
39 |
Apprenticeship Training Center
40 |
41 |
2531 Barrington Court
42 | Hayward, 43 | CA 44 | 94545 45 |
46 |
47 | 48 | 63 | 64 | 65 |

66 | 67 | John 68 | Q. 69 | Public 70 | 71 |

72 | 73 | 74 | -------------------------------------------------------------------------------- /examples/example 8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 8 rfc2426 4 | 5 | 6 | 7 | 8 |
9 | CONFIDENTIAL 10 | 12 | EST 13 | 14 | 15 | 16 | Dr. 17 | John 18 | Philip 19 | Paul 20 | Stevenson, 21 | Jr., 22 | M.D., 23 | A.C.P. 24 | 25 | 26 | Sept 9, 1987 27 | 28 |
Just

testing.
29 |
30 | 31 |
32 | Frank Dawson 33 |
Lotus Development Corporation
34 |
35 | work address 36 | (mail and 37 | packages): 38 |
6544 Battleford Drive
39 | Raleigh 40 | NC 41 | 27613-3502 42 |
U.S.A.
43 |
44 |
45 | +1-919-676-9515 46 | (w, 47 | vm) 48 |
49 |
50 | +1-919-676-9564 51 | (wf) 52 |
53 | , 56 | 59 |
60 |
61 | 62 |
Netscape Communications Corp.
63 |
64 | work address: 65 |
501 E. Middlefield Rd.
66 | Mountain View, 67 | CA 68 | 94043 69 |
U.S.A.
70 |
71 |
72 | +1-415-937-3419 73 | (w, 74 | vm) 75 |
76 |
77 | +1-415-528-4164 78 | (wf) 79 |
80 |
81 | 82 |
83 | 84 | Sir 85 | 86 | Rene 87 | 88 | van der Harten 89 | 90 | 91 | (J.), 92 | R.D.O.N. 93 | 94 |
95 | 96 |
97 | 113 | Key 114 | 115 | 116 | PUBLIC 117 | Chez Chic 118 | 19950401-080045-40000F192713-0052 119 | 120 | Robert 121 | Pau 122 | Shou Chang 123 | 124 |
125 | 126 | 127 | -------------------------------------------------------------------------------- /examples/example 9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 9 rfc2426 4 | 5 | 6 | 7 | 8 |
9 | Programmer 10 | 11 |
+1-919-555-7878
12 |
Area Administrator, Assistant
13 | 14 | ABC, Inc., 15 | North American Division, 16 | Marketing, 17 | 18 | 19 | INTERNET, 20 | IETF, 21 | INDUSTRY, 22 | INFORMATION TECHNOLOGY 23 | 24 |

This fax number is operational 0800 to 1715 EST, Mon-Fri.

25 | 26 | Updated: 10/31 10:27p 27 |
28 | 29 | 30 |
31 | Mr. John Q. Public, Esq. 32 | Robbie 33 | April 15, 1996 34 |
35 | US 36 | home address, for 37 | mail and 38 | shipments: 39 |
123 Main Street
40 | Any Town, CA, 41 | 91921-1234 42 |
43 | 44 | my 45 | work 46 | phone, with 47 | voicemail: 48 | +1-213-555-1234 49 | 50 | 51 | Updated: November 15 52 | 53 | 57 |

Jane Doe uses PigeonMail 2.1 for email.

58 | -05:00 59 |
60 | 61 |
62 | 63 | 64 | , 65 | +1-919-555-1234 66 | 67 | 68 | 69 | Director, Research and Development 70 | 71 | Jim, 72 | Jimmie 73 | 74 | Mr. 75 | John 76 | Quinlan 77 | Public, 78 | Esq. 79 | Oct 15, 1953 80 |
81 | local delivery 82 | to my home 83 | of mail 84 | and packages: 85 |
 86 |        Mr.John Q. Public, Esq.
 87 |        Mail Drop: TNE QB
 88 |        123 Main Street
 89 |        Any Town, CA  91921-1234
 90 |        U.S.A.
 91 |        
92 |
93 |
94 | 95 | 98 |
99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /examples/geo 1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Geo 1 4 | 5 | 6 | 7 | 8 |
9 | 10 | Geo test 11 | 37.186013 12 | -122.082932 13 | 14 |
15 |
16 | 17 | 18 | 19 | over 20 | there 21 | 22 | 23 |
24 | 25 |
26 | bla 27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/geo 2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Geo 2 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | invalid 12 | -121.082932 13 | 14 |
15 |
16 | 17 | 18 | over 19 | 20 |
21 |
22 | 23 | 24 | -122.082932 25 | 26 |
27 | 28 | 29 |
30 | 31 | bla 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/hcard in atom.atom: -------------------------------------------------------------------------------- 1 | 2 | 3 | Atom Robots 4 | from outer semantic space! 5 | 6 | http://pornel.net/atom/2008/hcard-example 7 | 2008-06-15T12:00:01+01:00 8 | 9 | http://pornel.net/atom/2008/hcard-example/1 10 | 2008-06-15T12:00:01+01:00 11 | 12 | hCard 13 | Killer Robot 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/ignored_classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 4 4 | 5 | 6 | 7 | 8 | 9 | Malarkey 10 | 11 | 12 | x 13 | x 14 | 15 | 16 | x 17 | 18 | 19 | x 20 | 21 | 22 | x 23 | 24 | 25 | x 26 | 27 | 28 | x 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/im invalid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 7 hcard-examples 4 | 5 | 6 | 7 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/im valid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 7 hcard-examples 4 | 5 | 6 | 7 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/implied n.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Missing fields test 4 | 5 | 6 | 7 |
8 |
given-name family-name
9 |
10 |
11 |

They call me Bond, James Bond.

12 |
13 |
14 |
family-name, X
15 |
16 |
17 |
family-name X.
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/include 2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Include test 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | xx 12 |
13 | F: 14 | 0401950302 15 |
16 | 17 |
18 | P: 19 | not this one 20 |
21 |
22 | P: 23 | not this one 24 |
25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/include 3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Include test 4 | 5 | 6 | 7 |
8 | 9 | 10 |

11 | 12 |
mr. 13 | 14 |
15 |
16 |
17 |
18 |
19 |
include
20 |
21 |
22 | F: 23 | 0401950302 24 |
25 |
26 | P: 27 |

other

28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/include.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Include test 4 | 5 | 6 | 7 |
8 |
9 | F: 10 | 0401950302 11 |
12 |
13 | P: 14 | 15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /examples/missing_fields.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Missing fields 4 | 5 | 6 | 7 |
8 |
9 |
Me
10 |
11 | 12 |
13 |
Name 1
14 |
Name 2
15 |
16 | 17 |
18 |
19 |
Me
20 | or 21 |
Me
22 |
23 |
24 | 25 |
26 |
test 27 |
28 |
29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/nested.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test 4 | 5 | 6 | 7 | 8 |
9 | 10 | Malarkey 11 | 21 |
22 | 23 | 24 |
Melton 27 | Julie 28 |
29 |
30 |
31 |
36 |
37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /examples/obfuscated_email.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Test 6 | 7 | 8 | 9 |
10 |
Test Suite
11 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/orphan_adr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Orphan adr 4 | 5 | 6 | 7 |
8 | 9 | CommerceNet 10 | 11 | Work: 12 | 13 |
169 University Avenue
14 | Palo Alto, 15 | CA 16 | 94301 17 |
USA
18 | 19 |
20 | Work +1-650-289-4040 21 |
22 |
23 | Fax +1-650-289-4041 24 |
25 |
Email: 26 | 27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/value_problems 1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 1 4 | 5 | 6 | 7 |
8 | 9 | Brig. Gen. Testing Jr. 10 | 11 |
12 | 13 | Work: 14 | 15 | CA 16 | 94301 17 |
USA
18 |
19 |
20 | 21 |
Fax
+1-650-289-4041 22 |
23 |
Email: 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /examples/value_problems 2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valid 1 4 | 5 | 6 | 7 |
8 |
9 | 10 | 11 | meh 12 | 13 | 14 | http://foobar.com 15 | 16 | 17 | 169 University Avenue 18 | Palo Alto, 19 |
USA
20 |
21 |
22 | 23 | Work +1-650-289-4040 24 |
25 |
Email: 26 | 27 | 28 | 33 | 34 | 35 | 36 | click me 37 | click me 38 | click me 39 | 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /examples/values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Values 4 | 5 | 6 | 7 |
8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/xhtml_multi_profile.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wrong profile 5 | 6 | 7 | 8 | 9 | 10 |
11 | hcard! not vcard 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/xhtml_no_head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/xhtml_no_profile.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | No profile 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/xhtml_wrong_profile.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wrong profile 5 | 6 | 7 | 8 | 9 | 10 |
11 | hcard! not vcard 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/xhtml_xmlns.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /i/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/error.png -------------------------------------------------------------------------------- /i/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/favicon.png -------------------------------------------------------------------------------- /i/grad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/grad.png -------------------------------------------------------------------------------- /i/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/info.png -------------------------------------------------------------------------------- /i/invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/invalid.png -------------------------------------------------------------------------------- /i/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/logo.png -------------------------------------------------------------------------------- /i/style.css: -------------------------------------------------------------------------------- 1 | /* crappy browsers */ 2 | label {display:-moz-inline-box;-moz-user-select: none;} 3 | * html label {width:8em;} 4 | pre {white-space:-moz-pre-wrap;} 5 | 6 | /* and acidy ones */ 7 | html {background:#eee; color:black; margin:0; font: 1em "Myriad Web","Myriad Pro","Calibri","Arial",sans-serif} 8 | h1 {font-family: "Solex Medium","Myriad Web","Myriad Pro","Calibri","Arial",sans-serif;line-height:2; font-size:2em; margin:0.75em 0} 9 | h1 > small {font-size:0.4em; font-weight:normal;vertical-align:top;color:#aaa} 10 | 11 | h1 + p.invalid {margin:3em 0 1em;} 12 | 13 | body { 14 | position:relative; 15 | background:#fff; 16 | color:black; 17 | max-width:80em; 18 | padding:1em 1.5em; 19 | margin:0 auto; 20 | border: 1px solid #ccc; border-top: 0} 21 | label {display:inline-block; min-width:8em; text-align:right; margin-right:1em;} 22 | textarea {vertical-align:top;min-width:60%;} 23 | input[type=url], textarea {min-width:60%; box-sizing:border-box } 24 | input[type=text] {min-width:25%;} 25 | input {line-height:1;} 26 | form {min-width:23em;} 27 | form > div {margin: 1em 0;} 28 | form > p {margin-left: 9em;} 29 | abbr {text-transform: lowercase; 30 | font-variant:small-caps; 31 | font-style: normal; 32 | border-bottom: 0; 33 | letter-spacing:0.1ex; 34 | font-size:110%;line-height:1} 35 | 36 | #email-encoder input[type=email] {min-width:20em;} 37 | #email-encoder small {margin-left:1em; color:#aaa} 38 | 39 | code,samp,pre {font: 0.91em "Consolas","Monaco","Lucida Console","Andale Mono",monospace;white-space:pre-wrap;} 40 | samp {color:#333;} 41 | h3 > code,h3 > samp {font-size: 0.95em;font-weight:bold} 42 | 43 | code var {color:#444;font-style:normal; border:1px dotted #ccc;padding:2px 1px 0;} 44 | 45 | h1 {padding-left: 45px; background: url(/i/logo.png) 0 0 no-repeat; line-height:1.5;} 46 | h1 > b {color:#666;} 47 | 48 | form p.error {color:red;} 49 | form p.success {color:green;} 50 | 51 | #result .error {background:#fee;} 52 | #result .warn {background:#ffd;} 53 | #result .info {background:#efe;} 54 | #result h3, #result h4 {font-size:1.2em;margin: 0;} 55 | #result li p {margin: 0.2em 0 0 26px;} 56 | #result img {float:left; margin: 0 10px 0 0; opacity:0.8;} 57 | #result ul,#result ol {margin:0;padding:0;list-style:none;} 58 | #result li {margin:0.5em 0;padding:0.5em;} 59 | #result table ul {padding:0;margin: 0 0 0 1em; list-style:disc;} 60 | #result table li {padding:0;margin: 0;} 61 | 62 | .valid,.invalid { font-size:1.5em; min-height:40px; line-height:2em; padding-left:60px;} 63 | .valid {background: url(/i/valid.png) 0 50% no-repeat;} 64 | .invalid {background: url(/i/invalid.png) 0 50% no-repeat;} 65 | 66 | table {border-collapse:collapse;margin:0.3em 0} 67 | td,th {vertical-align:top; padding: 5px 0.5em 0} 68 | th {text-align:right;padding-top:4px} 69 | td pre {font:inherit; margin:0; max-width:100%; overflow:auto;} 70 | 71 | tbody.email > tr > th {white-space:nowrap;} 72 | 73 | th[rowspan] { text-align:left; border-right:1px dotted #ddd;border-top:1px solid #ddd;} 74 | th[colspan] { min-width:5em; border-top:1px solid #ddd;} 75 | th[rowspan] + th { border-top:1px solid #ddd;} 76 | tbody:first-child tr:first-child th {border-top:0;} 77 | 78 | #source {overflow: auto;} 79 | #source > div {float:left; width:48%; margin-right:2%; min-width:400px} 80 | #source pre {font-size:11px;} 81 | 82 | #tabs > ul , .tablist { 83 | margin:0 -1.5em;padding:4px 0 0 1.5em;overflow:hidden; 84 | list-style:none;border-bottom:1px solid #aaa; 85 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQCAYAAAArij59AAAAMElEQVR4Xs2OSQoAAAgCI/r/k235QB4kSPA26FiSUCAG2uLdY2Ac9IX3FwGAOmgLBU2/V88wo7smAAAAAElFTkSuQmCC) repeat-x 0 100%; 86 | } 87 | 88 | #tabs > ul > li { 89 | margin:1px 8px 0 0;padding:2px 10px 0; 90 | color:#444;background:#f5f5f5;line-height:1.8;float:left; 91 | cursor:pointer;border:1px solid #aaa; 92 | border-bottom:1px solid #eee !important; 93 | border-top-right-radius: 7px; border-top-left-radius: 7px; 94 | -webkit-border-top-right-radius: 7px; -webkit-border-top-left-radius: 7px; 95 | -moz-border-radius-topright: 7px; -moz-border-radius-topleft: 7px; 96 | -moz-outline-radius-topright: 6px; -moz-outline-radius-topleft: 6px; 97 | outline-offset:-3px; 98 | -webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2); 99 | -moz-box-shadow: 0 3px 5px rgba(0,0,0,0.2); 100 | box-shadow: 0 3px 5px rgba(0,0,0,0.2); 101 | -moz-user-select: none; 102 | } 103 | #tabs > ul > li:focus {border-color:black;color:black; padding-top:3px;margin-top:0;} 104 | *:-o-prefocus {outline:none !important;background:red !important;} 105 | #tabs > ul > li.active, #tabs > ul > li:active { 106 | color:black;background:white;padding-top:3px;margin-top:0; 107 | -webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.3); 108 | -moz-box-shadow: 0 2px 5px rgba(0,0,0,0.3); 109 | box-shadow: 0 2px 5px rgba(0,0,0,0.3); 110 | } 111 | .hidden {display:none;} 112 | .active > h3 {display:none;} 113 | 114 | #tabs .api-and-other {margin-left:1em} 115 | 116 | @media screen and (max-width:950px) 117 | { 118 | #source pre {font-size: 10px;} 119 | #source div {float:none; width:auto;} 120 | } 121 | 122 | #footnotes {font-size:0.9em;} 123 | hr {border:0;border-top:1px solid #ddd; margin: 2em 0 1em} 124 | a[href='#footnotes']{text-decoration:none;} 125 | 126 | a.button {border:1px outset #aaa;background:#ccc; padding:0.2em 0.5em;color:black;text-shadow: 0 1px 0 white;text-decoration:none} 127 | 128 | .langs {position:absolute; top:1.5em; right:1.5em; text-align:right; margin:0;padding:0;} 129 | 130 | 131 | @media screen and (max-width:800px) { 132 | body {font-size:0.8em} 133 | .langs {position:static;} 134 | } 135 | 136 | @media screen and (max-width:600px) { 137 | body {padding-left:2px;padding-right:2px;} 138 | } 139 | 140 | @media screen and (max-device-width:600px) { 141 | body {padding-left:2px;padding-right:2px;} 142 | } 143 | -------------------------------------------------------------------------------- /i/valid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/valid.png -------------------------------------------------------------------------------- /i/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kornelski/hCardValidator/125d40c42f8ec270c29f178e23eca339c617f1a2/i/warn.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | init($_SERVER['HTTP_HOST'] == 'hcard'); 18 | $c->run(); 19 | } 20 | catch(Exception $e) 21 | { 22 | @header('HTTP/1.1 500 oops'); 23 | @header("Content-Type:application/xhtml+xml;charset=UTF-8"); 24 | ?> 25 | 26 | hCard Validator – Error 27 |

Internal Error

28 |

Because of an error in the validator it was impossible to check this document.

29 | '.Controller::escapeXML($e).''; ?> 30 | 31 | 32 | \n" 6 | "Language-Team: English\n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 11 | 12 | # :file: /www/hcard/tpl/main.html 13 | msgid "title" 14 | msgstr "hCard Validátor" 15 | 16 | msgid "h1" 17 | msgstr "hCard microformat Validátor (beta, samozřejmě)" 18 | 19 | msgid "intro" 20 | msgstr "Toto je neoficiální validátor¹/kontrolor shody se specifikací hCard microformat." 21 | 22 | msgid "Input" 23 | msgstr "Vstup" 24 | 25 | msgid "urlintro" 26 | msgstr "Zkontroluje celou XHTML nebo HTML stránku zadáním HTTP URL." 27 | 28 | msgid "Address:" 29 | msgstr "Adresa:" 30 | 31 | msgid "Validate URL" 32 | msgstr "Validovat URL" 33 | 34 | msgid "Fragment" 35 | msgstr "Fragment" 36 | 37 | msgid "fragmentintro" 38 | msgstr "Vložte správně formátovaný XHTML fragment nebo celý dokument obsahující hCard." 39 | 40 | msgid "Validate fragment" 41 | msgstr "Validovat fragment" 42 | 43 | msgid "Upload" 44 | msgstr "Nahrát" 45 | 46 | msgid "uploadintro" 47 | msgstr "Pro validaci nahrajte HTML nebo XHTML soubor. Aby to fungovalo, Váš prohlížeč musí mít správně nataveny MIME typy." 48 | 49 | msgid "Upload file" 50 | msgstr "Nahrát soubor" 51 | 52 | msgid "Validate file" 53 | msgstr "Validovat soubor" 54 | 55 | msgid "Example" 56 | msgstr "Příklad" 57 | 58 | msgid "exampleintro" 59 | msgstr "Hledáte-li „hCards in the wild“, je to únavné. Zkuste testovací příklady:" 60 | 61 | msgid "Example file" 62 | msgstr "Soubor s příkladem" 63 | 64 | msgid "Browse examples" 65 | msgstr "Procházet příklady" 66 | 67 | msgid "View" 68 | msgstr "Zobraz" 69 | 70 | msgid "Validate example" 71 | msgstr "Validovat příklad" 72 | 73 | msgid "XHTML fragment" 74 | msgstr "XHTML fragment" 75 | 76 | msgid "api_and_other" 77 | msgstr "API & Další" 78 | 79 | msgid "byreferrer" 80 | msgstr "Na jakoukoliv stránku odkazem" 81 | 82 | msgid "Bookmarklet" 83 | msgstr "Bookmarklet" 84 | 85 | msgid "restful" 86 | msgstr "Pohodové JSON API" 87 | 88 | msgid "apidescription" 89 | msgstr "

Odešlete GET požadavek na ${url}.

" 90 | "

Výsledek bude přibližně kompatibilní s ${validatornu}. V budoucnu pravděpodobně dojde ke změnám.

" 91 | 92 | msgid "pleaseuseforvalidation" 93 | msgstr "Prosím použijte toto API pro validaci, a nejen jako nástroj pro konverzi/extrakci." 94 | 95 | msgid "Send Feedback" 96 | msgstr "Poslat zpětnou vazbu" 97 | 98 | msgid "You can ${email} or the form below." 99 | msgstr "Můžete ${email} nebo pomocí formuláře níže." 100 | 101 | msgid "feedbacknote" 102 | msgstr "Pokud ${bug} nebo máte návrh, nezapomeňte zahrnout vzorek kódu hCard." 103 | 104 | msgid "feedbacknote_bug" 105 | msgstr "hlásíte chybu" 106 | 107 | msgid "Your name" 108 | msgstr "Vaše jméno" 109 | 110 | msgid "Your comment" 111 | msgstr "Váš komentář" 112 | 113 | msgid "Send feedback" 114 | msgstr "Odeslat zpětnou vazbu" 115 | 116 | msgid "Result" 117 | msgstr "Výsledek" 118 | 119 | msgid "valid" 120 | msgstr "Gratulujeme! Nebyly nalezeny žádné chyby." 121 | 122 | msgid "invalid" 123 | msgstr "Tento dokument obsahuje chyby." 124 | 125 | msgid "vcardnoerrors" 126 | msgstr "No issues found." 127 | 128 | msgid "More info" 129 | msgstr "Více informací" 130 | 131 | msgid "File source" 132 | msgstr "Zdrojový soubor" 133 | 134 | msgid "Parsed source" 135 | msgstr "Parsrovaný zdroj" 136 | 137 | msgid "Credits" 138 | msgstr "Zásluhy" 139 | 140 | msgid "fullcredits" 141 | msgstr "Napsal ${writtenby}. Ikony jsou z ${tango}. Testovací případy zahrnují ${acid} od Dmitry Baranovskiy, příklady z ${uforg} a ${testsuite}." 142 | 143 | msgid "footnote" 144 | msgstr "Nejedná se o validátor ve smyslu XML/SGML." 145 | 146 | msgid "sourceavailable" 147 | msgstr "Zdrojový kód je dostupný pod BSD licencí." 148 | -------------------------------------------------------------------------------- /locale/cs/LC_MESSAGES/props.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "POT-Creation-Date: \n" 5 | "PO-Revision-Date: \n" 6 | "Last-Translator: porneL \n" 7 | "Language-Team: \n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | 12 | msgid "n" 13 | msgstr "Jméno" 14 | 15 | msgid "name" 16 | msgstr "Název karty kontaktu" 17 | 18 | msgid "fn" 19 | msgstr "Jméno/a a příjmení" 20 | 21 | msgid "email" 22 | msgstr "E-mail" 23 | 24 | msgid "url" 25 | msgstr "URL" 26 | 27 | msgid "nickname" 28 | msgstr "Přezdívka" 29 | 30 | msgid "agent" 31 | msgstr "Agent" 32 | 33 | msgid "geo" 34 | msgstr "GEO" 35 | 36 | msgid "honorific-prefix" 37 | msgstr "Titul před jménem" 38 | 39 | msgid "honorific-suffix" 40 | msgstr "Titul za jménem" 41 | 42 | msgid "given-name" 43 | msgstr "Křestní jméno" 44 | 45 | msgid "additional-name" 46 | msgstr "Druhé jméno" 47 | 48 | msgid "title" 49 | msgstr "Titul" 50 | 51 | msgid "family-name" 52 | msgstr "Příjmení" 53 | 54 | msgid "adr" 55 | msgstr "Adresa" 56 | 57 | msgid "street-address" 58 | msgstr "Ulice" 59 | 60 | msgid "region" 61 | msgstr "Stát nebo provincie" 62 | 63 | msgid "locality" 64 | msgstr "Město" 65 | 66 | msgid "postal-code" 67 | msgstr "PSČ" 68 | 69 | msgid "country-name" 70 | msgstr "Zěmě" 71 | 72 | msgid "org" 73 | msgstr "Organizace" 74 | 75 | msgid "organization-name" 76 | msgstr "Název organizace" 77 | 78 | msgid "organization-unit" 79 | msgstr "Složka organizace" 80 | 81 | msgid "tel" 82 | msgstr "Telefon" 83 | 84 | msgid "fax" 85 | msgstr "Fax" 86 | 87 | msgid "source" 88 | msgstr "Zdroj karty kontaktu" 89 | 90 | msgid "photo" 91 | msgstr "URL fotografie" 92 | 93 | msgid "bday" 94 | msgstr "Narozeniny" 95 | 96 | msgid "extended-address" 97 | msgstr "Rozšířená adresa" 98 | 99 | msgid "class" 100 | msgstr "Klasifikace" 101 | 102 | msgid "note" 103 | msgstr "Poznámka" 104 | 105 | msgid "tz" 106 | msgstr "Časová zóna" 107 | 108 | msgid "sort-string" 109 | msgstr "Řetězec řazení" 110 | 111 | msgid "uid" 112 | msgstr "UID" 113 | 114 | msgid "category" 115 | msgstr "Kategorie" 116 | 117 | msgid "rev" 118 | msgstr "Revize karty kontaktu" 119 | 120 | msgid "role" 121 | msgstr "Pozice" 122 | 123 | msgid "label" 124 | msgstr "Address Label" 125 | 126 | msgid "logo" 127 | msgstr "URL logotypu" 128 | 129 | msgid "sound" 130 | msgstr "URL zvukové stopy" 131 | 132 | msgid "mailer" 133 | msgstr "E-mailový klient" 134 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/main.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2008-06-18 23:33+0100\n" 5 | "Last-Translator: porneL <>\n" 6 | "Language-Team: English\n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 11 | 12 | # :file: /www/hcard/tpl/main.html 13 | msgid "title" 14 | msgstr "hCard Validator" 15 | 16 | msgid "h1" 17 | msgstr "hCard microformat Validator (beta, of course)" 18 | 19 | msgid "intro" 20 | msgstr "This is an unofficial validator¹/conformance checker of the hCard microformat." 21 | 22 | msgid "Input" 23 | msgstr "Input" 24 | 25 | msgid "urlintro" 26 | msgstr "Check entire XHTML or HTML page by entering its HTTP URL." 27 | 28 | msgid "Address:" 29 | msgstr "Address:" 30 | 31 | msgid "Validate URL" 32 | msgstr "Validate URL" 33 | 34 | msgid "Fragment" 35 | msgstr "Fragment" 36 | 37 | msgid "fragmentintro" 38 | msgstr "Paste well-formed XHTML fragment or complete document containing hCard." 39 | 40 | msgid "Validate fragment" 41 | msgstr "Validate fragment" 42 | 43 | msgid "Upload" 44 | msgstr "Upload" 45 | 46 | msgid "uploadintro" 47 | msgstr "Upload HTML or XHTML file to validate it. For this to work your browser must be setting MIME types properly." 48 | 49 | msgid "Upload file" 50 | msgstr "Upload file" 51 | 52 | msgid "Validate file" 53 | msgstr "Validate file" 54 | 55 | msgid "Example" 56 | msgstr "Example" 57 | 58 | msgid "exampleintro" 59 | msgstr "If searching for hCards in the wild is tiring, check one of the test-cases:" 60 | 61 | msgid "Example file" 62 | msgstr "Example file" 63 | 64 | msgid "Browse examples" 65 | msgstr "Browse examples" 66 | 67 | msgid "View" 68 | msgstr "View" 69 | 70 | msgid "Validate example" 71 | msgstr "Validate example" 72 | 73 | msgid "XHTML fragment" 74 | msgstr "XHTML fragment" 75 | 76 | msgid "api_and_other" 77 | msgstr "API & Other" 78 | 79 | msgid "byreferrer" 80 | msgstr "Any page by Referer" 81 | 82 | msgid "Bookmarklet" 83 | msgstr "Bookmarklet" 84 | 85 | msgid "restful" 86 | msgstr "RESTful JSON API" 87 | 88 | msgid "apidescription" 89 | msgstr "

Send GET request to ${url}.

" 90 | "

Output will be roughly compatible with the ${validatornu}. Likely to change in the future.

" 91 | 92 | msgid "pleaseuseforvalidation" 93 | msgstr "Please use this API for validation, not just as an converter/extraction tool." 94 | 95 | msgid "Send Feedback" 96 | msgstr "Send Feedback" 97 | 98 | msgid "You can ${email} or the form below." 99 | msgstr "You can ${email} or the form below." 100 | 101 | msgid "feedbacknote" 102 | msgstr "If you're ${bug} or have a suggestion, don't forget to include example hCard code." 103 | 104 | msgid "feedbacknote_bug" 105 | msgstr "reporting a bug" 106 | 107 | msgid "Your name" 108 | msgstr "Your name" 109 | 110 | msgid "Your comment" 111 | msgstr "Your comment" 112 | 113 | msgid "Send feedback" 114 | msgstr "Send feedback" 115 | 116 | msgid "Result" 117 | msgstr "Result" 118 | 119 | msgid "valid" 120 | msgstr "Congratulations! No errors found." 121 | 122 | msgid "invalid" 123 | msgstr "This document contains errors." 124 | 125 | msgid "vcardnoerrors" 126 | msgstr "No issues found." 127 | 128 | msgid "More info" 129 | msgstr "More info" 130 | 131 | msgid "File source" 132 | msgstr "File source" 133 | 134 | msgid "Parsed source" 135 | msgstr "Parsed source" 136 | 137 | msgid "Credits" 138 | msgstr "Credits" 139 | 140 | msgid "fullcredits" 141 | msgstr "Written by ${writtenby}. Icons are from ${tango}. Test cases include ${acid} by Dmitry Baranovskiy, examples from ${uforg} and ${testsuite}." 142 | 143 | msgid "footnote" 144 | msgstr "It's not a validator in the XML/SGML sense." 145 | 146 | msgid "sourceavailable" 147 | msgstr "Source code is available under the BSD license." 148 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/props.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "POT-Creation-Date: \n" 5 | "PO-Revision-Date: \n" 6 | "Last-Translator: porneL \n" 7 | "Language-Team: \n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | 12 | msgid "n" 13 | msgstr "Name" 14 | 15 | msgid "name" 16 | msgstr "Card name" 17 | 18 | msgid "fn" 19 | msgstr "Formatted name" 20 | 21 | msgid "email" 22 | msgstr "e-mail" 23 | 24 | msgid "url" 25 | msgstr "URL" 26 | 27 | msgid "nickname" 28 | msgstr "Nickname" 29 | 30 | msgid "agent" 31 | msgstr "Agent" 32 | 33 | msgid "geo" 34 | msgstr "GEO" 35 | 36 | msgid "honorific-prefix" 37 | msgstr "Honorific Prefix" 38 | 39 | msgid "honorific-suffix" 40 | msgstr "Honorific Suffix" 41 | 42 | msgid "given-name" 43 | msgstr "Given Name" 44 | 45 | msgid "additional-name" 46 | msgstr "Additional Name" 47 | 48 | msgid "title" 49 | msgstr "Title" 50 | 51 | msgid "family-name" 52 | msgstr "Family Name" 53 | 54 | msgid "adr" 55 | msgstr "Address" 56 | 57 | msgid "street-address" 58 | msgstr "Street" 59 | 60 | msgid "region" 61 | msgstr "State or Province" 62 | 63 | msgid "locality" 64 | msgstr "City" 65 | 66 | msgid "postal-code" 67 | msgstr "Postcode" 68 | 69 | msgid "country-name" 70 | msgstr "Country" 71 | 72 | msgid "org" 73 | msgstr "Organization" 74 | 75 | msgid "organization-name" 76 | msgstr "Org. Name" 77 | 78 | msgid "organization-unit" 79 | msgstr "Org. Unit" 80 | 81 | msgid "tel" 82 | msgstr "Telephone" 83 | 84 | msgid "fax" 85 | msgstr "Fax" 86 | 87 | msgid "source" 88 | msgstr "Card source" 89 | 90 | msgid "photo" 91 | msgstr "Photo URL" 92 | 93 | msgid "bday" 94 | msgstr "Birthday" 95 | 96 | msgid "extended-address" 97 | msgstr "Extended Address" 98 | 99 | msgid "class" 100 | msgstr "Classification" 101 | 102 | msgid "note" 103 | msgstr "Note" 104 | 105 | msgid "tz" 106 | msgstr "Timezone" 107 | 108 | msgid "sort-string" 109 | msgstr "Sort String" 110 | 111 | msgid "uid" 112 | msgstr "UID" 113 | 114 | msgid "category" 115 | msgstr "Category" 116 | 117 | msgid "rev" 118 | msgstr "Card Revision" 119 | 120 | msgid "role" 121 | msgstr "Role" 122 | 123 | msgid "label" 124 | msgstr "Address Label" 125 | 126 | msgid "logo" 127 | msgstr "Logo URL" 128 | 129 | msgid "sound" 130 | msgstr "Sound URL" 131 | 132 | msgid "mailer" 133 | msgstr "e-mail Client" 134 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/main.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2011-07-17 16:44+0100\n" 5 | "Last-Translator: fdf \n" 6 | "Language-Team: English\n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 11 | "POT-Creation-Date: \n" 12 | 13 | # :file: /www/hcard/tpl/main.html 14 | msgid "title" 15 | msgstr "Validation hCard" 16 | 17 | msgid "h1" 18 | msgstr "Validation hCard microformat (beta)" 19 | 20 | msgid "intro" 21 | msgstr "Outil de validation non officiel¹/ Conforme avec hCard microformat." 22 | 23 | msgid "Input" 24 | msgstr "Valeur" 25 | 26 | msgid "urlintro" 27 | msgstr "Indiquer le code XHTML ou la page HTML en indiquant son URL." 28 | 29 | msgid "Address:" 30 | msgstr "Adresse :" 31 | 32 | msgid "Validate URL" 33 | msgstr "Valider l'URL" 34 | 35 | msgid "Fragment" 36 | msgstr "Fragment" 37 | 38 | msgid "fragmentintro" 39 | msgstr "Coller, le code XHTML ou l'ensemble du document qui contient la hCard." 40 | 41 | msgid "Validate fragment" 42 | msgstr "Valider le code" 43 | 44 | msgid "Upload" 45 | msgstr "Importer" 46 | 47 | msgid "uploadintro" 48 | msgstr "Importer le fichier HTML ou XHTML à valider. Pour fonctionner votre navigateur doit utiliser le bon type MIME ." 49 | 50 | msgid "Upload file" 51 | msgstr "Importer un fichier" 52 | 53 | msgid "Validate file" 54 | msgstr "Valider le fichier" 55 | 56 | msgid "Example" 57 | msgstr "Exemples" 58 | 59 | msgid "exampleintro" 60 | msgstr "Rechercher des exemples de hCards sur Internet, c'est fatiguant, consultez les cas de tests." 61 | 62 | msgid "Example file" 63 | msgstr "Fichier exemple" 64 | 65 | msgid "Browse examples" 66 | msgstr "Parcourir les exemples" 67 | 68 | msgid "View" 69 | msgstr "Voir" 70 | 71 | msgid "Validate example" 72 | msgstr "Valider l'exemple" 73 | 74 | msgid "XHTML fragment" 75 | msgstr "Fragment XHTML" 76 | 77 | msgid "api_and_other" 78 | msgstr "API et autres" 79 | 80 | msgid "byreferrer" 81 | msgstr "Ajouter un lien à votre page" 82 | 83 | msgid "Bookmarklet" 84 | msgstr "Ajouter aux favoris" 85 | 86 | msgid "restful" 87 | msgstr "RESTful JSON API" 88 | 89 | msgid "apidescription" 90 | msgstr "

Envoyer la requête GET à ${url}.

La sortie sera à peu près compatible avec la ${validatornu}. Susceptible de changer dans le futur.

" 91 | 92 | msgid "pleaseuseforvalidation" 93 | msgstr "S'il vous plaît utiliser l'API pour la validation, mais aussi comme un convertisseur/outil d'extraction." 94 | 95 | msgid "Send Feedback" 96 | msgstr "Envoyer un feedback" 97 | 98 | msgid "You can ${email} or the form below." 99 | msgstr "Vous pouvez ${email} ou utiliser le formulaire de contact." 100 | 101 | msgid "send feedback via e-mail" 102 | msgstr "envoyer un e-mail" 103 | 104 | msgid "feedbacknote" 105 | msgstr "Si vous rencontrez un ${bug} ou vous avez une suggestion, n'oubliez pas d'inclure le code de votre hCard." 106 | 107 | msgid "feedbacknote_bug" 108 | msgstr "rapporter un bug" 109 | 110 | msgid "Your name" 111 | msgstr "Votre nom" 112 | 113 | msgid "Your comment" 114 | msgstr "Votre commentaire" 115 | 116 | msgid "Send feedback" 117 | msgstr "Envoyer un feedback" 118 | 119 | msgid "Result" 120 | msgstr "Résultat" 121 | 122 | msgid "valid" 123 | msgstr "Félicitations! Aucune erreur trouvée." 124 | 125 | msgid "invalid" 126 | msgstr "Ce document contient des erreurs." 127 | 128 | msgid "vcardnoerrors" 129 | msgstr "Aucun problème détecté." 130 | 131 | msgid "More info" 132 | msgstr "En savoir plus" 133 | 134 | msgid "File source" 135 | msgstr "Fichier source" 136 | 137 | msgid "Parsed source" 138 | msgstr "Compiler la source" 139 | 140 | msgid "Credits" 141 | msgstr "Crédits" 142 | 143 | msgid "fullcredits" 144 | msgstr "Rédigé par ${writtenby}. Les icônes sont de ${tango}. Les tests inclus ${acid} par Dmitry Baranovskiy, exemples à partir de ${uforg} et ${testsuite}. Traduction par Axel Roche" 145 | 146 | msgid "footnote" 147 | msgstr "Ce n'est pas un validateur pour XML/SGML." 148 | 149 | msgid "sourceavailable" 150 | msgstr "Le code source est disponible, sous Licence BSD." 151 | 152 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/props.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "POT-Creation-Date: \n" 5 | "PO-Revision-Date: \n" 6 | "Last-Translator: fdf \n" 7 | "Language-Team: \n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | 12 | msgid "n" 13 | msgstr "Nom" 14 | 15 | msgid "name" 16 | msgstr "Nom de la Carte" 17 | 18 | msgid "fn" 19 | msgstr "Nom formaté" 20 | 21 | msgid "email" 22 | msgstr "e-mail" 23 | 24 | msgid "url" 25 | msgstr "URL" 26 | 27 | msgid "nickname" 28 | msgstr "Surnom" 29 | 30 | msgid "agent" 31 | msgstr "Agent" 32 | 33 | msgid "geo" 34 | msgstr "GEO" 35 | 36 | msgid "honorific-prefix" 37 | msgstr "Civilité" 38 | 39 | msgid "honorific-suffix" 40 | msgstr "Suffixe honorifique" 41 | 42 | msgid "given-name" 43 | msgstr "Prénom" 44 | 45 | msgid "additional-name" 46 | msgstr "Noms supplémentaires" 47 | 48 | msgid "title" 49 | msgstr "Titre" 50 | 51 | msgid "family-name" 52 | msgstr "Nom de Famille" 53 | 54 | msgid "adr" 55 | msgstr "Adresse" 56 | 57 | msgid "street-address" 58 | msgstr "Rue" 59 | 60 | msgid "region" 61 | msgstr "Etat ou Province" 62 | 63 | msgid "locality" 64 | msgstr "Ville" 65 | 66 | msgid "postal-code" 67 | msgstr "Code Postal" 68 | 69 | msgid "country-name" 70 | msgstr "Pays" 71 | 72 | msgid "org" 73 | msgstr "Entreprise" 74 | 75 | msgid "organization-name" 76 | msgstr "Nom Entreprise" 77 | 78 | msgid "organization-unit" 79 | msgstr "Enterprise service" 80 | 81 | msgid "tel" 82 | msgstr "Téléphone" 83 | 84 | msgid "fax" 85 | msgstr "Fax" 86 | 87 | msgid "source" 88 | msgstr "Card source" 89 | 90 | msgid "photo" 91 | msgstr "URL Photo" 92 | 93 | msgid "bday" 94 | msgstr "Anniversaire" 95 | 96 | msgid "extended-address" 97 | msgstr "Complément d'adresse" 98 | 99 | msgid "class" 100 | msgstr "Classification" 101 | 102 | msgid "note" 103 | msgstr "Note" 104 | 105 | msgid "tz" 106 | msgstr "Fuseau horaire" 107 | 108 | msgid "sort-string" 109 | msgstr "Trier" 110 | 111 | msgid "uid" 112 | msgstr "UID" 113 | 114 | msgid "category" 115 | msgstr "Catégorie" 116 | 117 | msgid "rev" 118 | msgstr "Card Revision" 119 | 120 | msgid "role" 121 | msgstr "Role" 122 | 123 | msgid "label" 124 | msgstr "Address Label" 125 | 126 | msgid "logo" 127 | msgstr "URL Logo" 128 | 129 | msgid "sound" 130 | msgstr "URL Musique" 131 | 132 | msgid "mailer" 133 | msgstr "e-mail Client" 134 | 135 | -------------------------------------------------------------------------------- /locale/pl/LC_MESSAGES/main.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2008-06-18 23:33+0100\n" 5 | "Last-Translator: porneL <>\n" 6 | "Language-Team: English\n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 11 | 12 | # :file: /www/hcard/tpl/main.html 13 | msgid "title" 14 | msgstr "Walidator hCard" 15 | 16 | msgid "h1" 17 | msgstr "Walidator mikroformatu hCard (beta, oczywiście)" 18 | 19 | msgid "intro" 20 | msgstr "To jest nieoficjalny walidator¹ do wizytówek osadzonych na stronach za pomocą mikroformatu hCard." 21 | 22 | msgid "Input" 23 | msgstr "Dane wejściowe" 24 | 25 | msgid "urlintro" 26 | msgstr "Podaj adres HTTP strony do sprawdzenia (XHTML i HTML są akceptowane)." 27 | 28 | msgid "Address:" 29 | msgstr "Adres:" 30 | 31 | msgid "Validate URL" 32 | msgstr "Sprawdź URL" 33 | 34 | msgid "Fragment" 35 | msgstr "Fragment" 36 | 37 | msgid "XHTML fragment" 38 | msgstr "Fragment XHTML" 39 | 40 | msgid "fragmentintro" 41 | msgstr "Wklej fragment poprawnego składniowo XHTML lub cały dokument zawierający wizytówki." 42 | 43 | msgid "Validate fragment" 44 | msgstr "Sprawdź fragment" 45 | 46 | msgid "Upload" 47 | msgstr "Wgrany plik" 48 | 49 | msgid "uploadintro" 50 | msgstr "Wgraj plik do sprawdzenia w formacie HTML lub XHTML. Ta funkcja wymaga, aby twoja przeglądarka wysyłała poprawny typ MIME." 51 | 52 | msgid "Upload file" 53 | msgstr "Wgraj plik" 54 | 55 | msgid "Validate file" 56 | msgstr "Sprawdź plik" 57 | 58 | msgid "Example" 59 | msgstr "Przykład" 60 | 61 | msgid "exampleintro" 62 | msgstr "Jeżeli szukanie wizytówek na stronach jest zbyt męczące, wypróbuj walidator na przykładowym pliku:" 63 | 64 | msgid "Example file" 65 | msgstr "Przykładowy plik" 66 | 67 | msgid "Browse examples" 68 | msgstr "Przeglądaj przykłady" 69 | 70 | msgid "View" 71 | msgstr "Zobacz" 72 | 73 | msgid "Validate example" 74 | msgstr "Sprawdź przykład" 75 | 76 | msgid "api_and_other" 77 | msgstr "API i inne" 78 | 79 | msgid "byreferrer" 80 | msgstr "Dowolna strona na podstawie nagłówka Referer" 81 | 82 | msgid "Bookmarklet" 83 | msgstr "Skryptozakładka" 84 | 85 | msgid "restful" 86 | msgstr "RESTowe API wysyłające JSON" 87 | 88 | msgid "URL to validate" 89 | msgstr "URL do sprawdzenia" 90 | 91 | msgid "apidescription" 92 | msgstr "

Wyślij zapytanie GET pod adres ${url}.

" 93 | "

Wynik będzie w formacie z grubsza zgodnym z ${validatornu}. API może zmienić się w przyszłości.

" 94 | 95 | msgid "Validate hCards" 96 | msgstr "Sprawdź poprawność hCard" 97 | 98 | msgid "pleaseuseforvalidation" 99 | msgstr "Proszę używać API tylko do walidacji, a nie jako narzędzie do wyciągania wizytówek ze stron." 100 | 101 | msgid "Send Feedback" 102 | msgstr "Wyślij komentarz" 103 | 104 | msgid "send feedback via e-mail" 105 | msgstr "wysłać komentarz przez e-mail" 106 | 107 | msgid "feedbacknote" 108 | msgstr "Jeśli ${bug} lub masz sugestię, nie zapomnij dołączyć przykładowego kodu." 109 | 110 | msgid "feedbacknote_bug" 111 | msgstr "zgłaszasz błąd" 112 | 113 | msgid "You can ${email} or the form below." 114 | msgstr "Możesz ${email} lub użyć formularza poniżej." 115 | 116 | msgid "Your name" 117 | msgstr "Twoje imię" 118 | 119 | msgid "Your comment" 120 | msgstr "Komentarz" 121 | 122 | msgid "Send feedback" 123 | msgstr "Wyślij komentarz" 124 | 125 | msgid "Result" 126 | msgstr "Wynik" 127 | 128 | msgid "hCard #${n}" 129 | msgstr "hCard numer ${n}" 130 | 131 | msgid "valid" 132 | msgstr "Gratulacje! Nie znaleziono błędów." 133 | 134 | msgid "invalid" 135 | msgstr "Ten dokument zawiera błędy." 136 | 137 | msgid "vcardnoerrors" 138 | msgstr "Bez problemów." 139 | 140 | msgid "More info" 141 | msgstr "Więcej informacji" 142 | 143 | msgid "File source" 144 | msgstr "Źródło pliku" 145 | 146 | msgid "Parsed source" 147 | msgstr "Zinterpretowane źródło" 148 | 149 | msgid "Credits" 150 | msgstr "Twórcy" 151 | 152 | msgid "fullcredits" 153 | msgstr "

Autorem walidatora jest ${writtenby}. Ikony pochodzą z ${tango}. Testowe pliki zawierają ${acid} Dmitriego Baranowskiego, a przykłady pochodzą z ${uforg} oraz ${testsuite}.

" 154 | 155 | msgid "footnote" 156 | msgstr "To nie jest walidacja w znaczeniu użytym w XML/SGML." 157 | 158 | msgid "sourceavailable" 159 | msgstr "Kod źródłowy jest dostępny na licencji BSD." 160 | 161 | msgid "(translations welcome!)" 162 | msgstr "(tłumaczenia mile widziane!)" 163 | 164 | msgid "Please write your feedback" 165 | msgstr "Proszę wpisać komentarz" 166 | 167 | msgid "Sending failed, sorry! Please e-mail your message instead." 168 | msgstr "Nie udało się wysłać wiadomości! Proszę wyślij ją przez e-mail." 169 | 170 | msgid "The message has been sent, thank you!" 171 | msgstr "Wiadomość została wysłana, dzięki!" 172 | -------------------------------------------------------------------------------- /locale/pl/LC_MESSAGES/props.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "POT-Creation-Date: \n" 5 | "PO-Revision-Date: \n" 6 | "Last-Translator: Falka \n" 7 | "Language-Team: \n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | 12 | msgid "n" 13 | msgstr "Imię" 14 | 15 | msgid "name" 16 | msgstr "Nazwa wizytówki" 17 | 18 | msgid "fn" 19 | msgstr "Pisownia imienia" 20 | 21 | msgid "email" 22 | msgstr "E-mail" 23 | 24 | msgid "url" 25 | msgstr "URL" 26 | 27 | msgid "nickname" 28 | msgstr "Pseudonim" 29 | 30 | msgid "agent" 31 | msgstr "Agent" 32 | 33 | msgid "geo" 34 | msgstr "Pozycja geo." 35 | 36 | msgid "honorific-prefix" 37 | msgstr "Tytuł (przedrostek)" 38 | 39 | msgid "honorific-suffix" 40 | msgstr "Tytuł (przyrostek)" 41 | 42 | msgid "given-name" 43 | msgstr "Imię" 44 | 45 | msgid "additional-name" 46 | msgstr "Dodatkowe imię" 47 | 48 | msgid "title" 49 | msgstr "Tytuł" 50 | 51 | msgid "family-name" 52 | msgstr "Nazwisko" 53 | 54 | msgid "adr" 55 | msgstr "Adres" 56 | 57 | msgid "street-address" 58 | msgstr "Ulica" 59 | 60 | msgid "region" 61 | msgstr "Stan lub prowincja" 62 | 63 | msgid "locality" 64 | msgstr "Miasto" 65 | 66 | msgid "postal-code" 67 | msgstr "Kod pocztowy" 68 | 69 | msgid "country-name" 70 | msgstr "Państwo" 71 | 72 | msgid "org" 73 | msgstr "Organizacja" 74 | 75 | msgid "organization-name" 76 | msgstr "Nazwa organizacji" 77 | 78 | msgid "organization-unit" 79 | msgstr "Jednostka organizacji" 80 | 81 | msgid "tel" 82 | msgstr "Telefon" 83 | 84 | msgid "fax" 85 | msgstr "Fax" 86 | 87 | msgid "source" 88 | msgstr "Źródło wizytówki" 89 | 90 | msgid "photo" 91 | msgstr "URL zdjęcia" 92 | 93 | msgid "bday" 94 | msgstr "Data urodzenia" 95 | 96 | msgid "extended-address" 97 | msgstr "Rozszerzony adres" 98 | 99 | msgid "class" 100 | msgstr "Klasyfikacja" 101 | 102 | msgid "note" 103 | msgstr "Notatki" 104 | 105 | msgid "tz" 106 | msgstr "Strefa czasowa" 107 | 108 | msgid "sort-string" 109 | msgstr "Wzorzec sortowania" 110 | 111 | msgid "uid" 112 | msgstr "Unikalny ID" 113 | 114 | msgid "category" 115 | msgstr "Kategoria" 116 | 117 | msgid "rev" 118 | msgstr "Wersja wizytówki" 119 | 120 | msgid "role" 121 | msgstr "Zajęcie" 122 | 123 | msgid "label" 124 | msgstr "Etykieta adresowa" 125 | 126 | msgid "logo" 127 | msgstr "URL loga" 128 | 129 | msgid "sound" 130 | msgstr "URL dźwięku" 131 | 132 | msgid "mailer" 133 | msgstr "Program pocztowy" 134 | 135 | msgid "latitude" 136 | msgstr "szerokość" 137 | 138 | msgid "longitude" 139 | msgstr "długość" 140 | 141 | msgid "type" 142 | msgstr "typ" 143 | 144 | msgid "value" 145 | msgstr "wartość" 146 | 147 | msgid "post-office-box" 148 | msgstr "Skrytka pocztowa" 149 | -------------------------------------------------------------------------------- /referrer/index.php: -------------------------------------------------------------------------------- 1 | 10 | Validate by Referer 11 | 12 | 13 |

Validating…

14 |

Proceed. 15 | 20 | Validate by Referer 21 | 22 | 23 | 31 |

Validate by Referrer

32 |

Unable to validate — no referrer information received. 33 |

Proceed to the hCard Validator and enter the address manually.

34 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-attribs-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 31 | 32 | 35 | 36 | 40 | ]]> 41 | 42 | 45 | 46 | 50 | ]]> 51 | 52 | 55 | 56 | 60 | ]]> 61 | 62 | 63 | 64 | 72 | 73 | 74 | 75 | 83 | ]]> 84 | 85 | 86 | 87 | 88 | 91 | 92 | 96 | 97 | 101 | 102 | 107 | ]]> 108 | 109 | 110 | ]]> 111 | 114 | 117 | 118 | 119 | 120 | 121 | 123 | 124 | 125 | 126 | 127 | 133 | 134 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-charent-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 23 | 24 | 27 | %xhtml-lat1; 28 | 29 | 32 | %xhtml-symbol; 33 | 34 | 37 | %xhtml-special; 38 | 39 | 40 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-datatypes-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-events-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 32 | 38 | 39 | 51 | 52 | 65 | ]]> 66 | 67 | 69 | 73 | 74 | 76 | 80 | 81 | 83 | 87 | 88 | 90 | 96 | 97 | 99 | 104 | 105 | 107 | 113 | 114 | 116 | 120 | 121 | 123 | 127 | 128 | 130 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-framework-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 34 | 35 | 36 | 40 | %xhtml-arch.mod;]]> 41 | 42 | 43 | 47 | %xhtml-notations.mod;]]> 48 | 49 | 50 | 54 | %xhtml-datatypes.mod;]]> 55 | 56 | 57 | 58 | %xhtml-xlink.mod; 59 | 60 | 61 | 65 | %xhtml-qname.mod;]]> 66 | 67 | 68 | 72 | %xhtml-events.mod;]]> 73 | 74 | 75 | 79 | %xhtml-attribs.mod;]]> 80 | 81 | 82 | 83 | %xhtml-model.redecl; 84 | 85 | 86 | 89 | %xhtml-model.mod;]]> 90 | 91 | 92 | 96 | %xhtml-charent.mod;]]> 97 | 98 | 99 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-inlstyle-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-lat1.ent: -------------------------------------------------------------------------------- 1 | 6 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 25 | 26 | 27 | 29 | 31 | 33 | 35 | 37 | 38 | 40 | 42 | 44 | 46 | 47 | 49 | 51 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 69 | 71 | 73 | 75 | 77 | 80 | 83 | 85 | 87 | 89 | 91 | 93 | 95 | 97 | 99 | 101 | 102 | 104 | 106 | 108 | 110 | 112 | 114 | 115 | 118 | 120 | 122 | 124 | 126 | 128 | 130 | 132 | 135 | 137 | 139 | 141 | 143 | 146 | 148 | 150 | 152 | 154 | 156 | 158 | 160 | 162 | 164 | 166 | 167 | 169 | 171 | 173 | 175 | 177 | 179 | 180 | 183 | 185 | 187 | 189 | 191 | 193 | 195 | 197 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-qname-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 37 | 38 | 39 | 40 | 46 | 47 | 48 | 49 | 52 | 53 | 56 | 57 | 58 | 61 | 62 | 63 | 72 | 73 | 74 | 78 | 80 | ]]> 81 | 82 | 83 | 84 | 85 | %xhtml-qname-extra.mod; 86 | 87 | 93 | 94 | 95 | 96 | 97 | 102 | 105 | 110 | ]]> 111 | 114 | 115 | 118 | 119 | 120 | 121 | 122 | 125 | 127 | 128 | 130 | 131 | 132 | 138 | 140 | 141 | 142 | 143 | 146 | ]]> 147 | 148 | 149 | 150 | 151 | 152 | 156 | 162 | ]]> 163 | 169 | 170 | 171 | 172 | %xhtml-qname.redecl; 173 | 174 | 175 | 176 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-special.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 38 | 40 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 | 56 | 57 | 58 | 59 | 61 | 63 | 64 | 66 | 68 | 69 | 70 | 71 | 72 | 74 | 75 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml-symbol.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 15 | 16 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 33 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 53 | 54 | 56 | 58 | 59 | 61 | 63 | 64 | 66 | 67 | 69 | 71 | 73 | 74 | 75 | 77 | 78 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 90 | 92 | 93 | 95 | 96 | 97 | 98 | 100 | 102 | 104 | 105 | 106 | 107 | 109 | 110 | 112 | 113 | 115 | 117 | 118 | 119 | 120 | 122 | 124 | 126 | 127 | 129 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 140 | 141 | 144 | 145 | 147 | 150 | 151 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 161 | 162 | 163 | 164 | 166 | 168 | 169 | 171 | 172 | 173 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 186 | 188 | 189 | 191 | 192 | 193 | 194 | 196 | 197 | 198 | 199 | 200 | 202 | 204 | 206 | 208 | 209 | 210 | 211 | 212 | 214 | 215 | 217 | 218 | 220 | 222 | 224 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 235 | 237 | 238 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml11-model-1.mod: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 38 | 59 | 60 | 61 | 62 | 66 | 67 | 68 | 69 | 71 | 72 | 73 | 76 | 77 | 78 | 79 | 80 | 83 | 88 | 89 | 90 | 91 | 92 | 93 | 97 | 98 | 101 | 102 | 103 | 104 | 105 | 106 | 109 | 110 | 113 | 114 | 115 | 116 | 117 | 118 | 121 | 132 | 133 | 136 | 146 | 147 | 149 | 154 | 155 | 158 | 168 | 169 | 171 | 175 | 176 | 178 | 182 | 183 | 184 | 185 | 190 | 191 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 207 | 208 | 209 | 210 | 215 | 216 | 217 | 218 | 221 | 228 | 229 | 231 | 237 | 238 | 239 | 240 | 242 | 249 | 250 | 251 | -------------------------------------------------------------------------------- /xmlcatalog/xhtml11.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 28 | 34 | 35 | 36 | 49 | 50 | 51 | 52 | 55 | 56 | 57 | 59 | 60 | 61 | 62 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 98 | 99 | ]]> 102 | 103 | 104 | 105 | 106 | 107 | 111 | %xhtml-inlstyle.mod;]]> 112 | 113 | 115 | 118 | 119 | 120 | 121 | 125 | %xhtml-framework.mod;]]> 126 | 127 | 128 | 131 | 132 | ]]> 135 | 136 | 137 | 138 | 142 | %xhtml-text.mod;]]> 143 | 144 | 145 | 146 | 150 | %xhtml-hypertext.mod;]]> 151 | 152 | 153 | 154 | 158 | %xhtml-list.mod;]]> 159 | 160 | 161 | 162 | 163 | 164 | 168 | %xhtml-edit.mod;]]> 169 | 170 | 171 | 172 | 176 | %xhtml-bdo.mod;]]> 177 | 178 | 179 | 180 | 181 | 182 | 186 | %xhtml-ruby.mod;]]> 187 | 188 | 189 | 190 | 194 | %xhtml-pres.mod;]]> 195 | 196 | 197 | 198 | 202 | %xhtml-link.mod;]]> 203 | 204 | 205 | 206 | 210 | %xhtml-meta.mod;]]> 211 | 212 | 213 | 214 | 218 | %xhtml-base.mod;]]> 219 | 220 | 221 | 222 | 226 | %xhtml-script.mod;]]> 227 | 228 | 229 | 230 | 234 | %xhtml-style.mod;]]> 235 | 236 | 237 | 238 | 242 | %xhtml-image.mod;]]> 243 | 244 | 245 | 246 | 250 | %xhtml-csismap.mod;]]> 251 | 252 | 253 | 254 | 258 | %xhtml-ssismap.mod;]]> 259 | 260 | 261 | 262 | 266 | %xhtml-param.mod;]]> 267 | 268 | 269 | 270 | 274 | %xhtml-object.mod;]]> 275 | 276 | 277 | 278 | 282 | %xhtml-table.mod;]]> 283 | 284 | 285 | 286 | 290 | %xhtml-form.mod;]]> 291 | 292 | 293 | 294 | 298 | %xhtml-target.mod;]]> 299 | 300 | 301 | 302 | 306 | %xhtml-legacy.mod;]]> 307 | 308 | 309 | 310 | 314 | %xhtml-struct.mod;]]> 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /xslt/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2 | --------- 3 | Copyright (C) 1999-2007 Norman Walsh 4 | Copyright (C) 2003 Jiří Kosek 5 | Copyright (C) 2004-2007 Steve Ball 6 | Copyright (C) 2005-2007 The DocBook Project 7 | 8 | Permission is hereby granted, free of charge, to any person 9 | obtaining a copy of this software and associated documentation 10 | files (the ``Software''), to deal in the Software without 11 | restriction, including without limitation the rights to use, 12 | copy, modify, merge, publish, distribute, sublicense, and/or 13 | sell copies of the Software, and to permit persons to whom the 14 | Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | Except as contained in this notice, the names of individuals 21 | credited with contribution to this software shall not be used in 22 | advertising or otherwise to promote the sale, use or other 23 | dealings in this Software without prior written authorization 24 | from the individuals in question. 25 | 26 | Any stylesheet derived from this Software that is publically 27 | distributed will be identified with a different name and the 28 | version strings in any derived Software will be changed so that 29 | no possibility of confusion between the derived package and this 30 | Software will exist. 31 | 32 | Warranty 33 | -------- 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37 | NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER 38 | CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41 | OTHER DEALINGS IN THE SOFTWARE. 42 | 43 | Contacting the Author 44 | --------------------- 45 | The DocBook XSL stylesheets are maintained by Norman Walsh, 46 | , and members of the DocBook Project, 47 | 48 | -------------------------------------------------------------------------------- /xslt/html2xhtml.xslt: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | This file was created automatically by html2xhtml 14 | 15 | from the HTML stylesheets. Do not edit this file. 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | xml 37 | UTF-8 38 | -//W3C//DTD XHTML 1.0 Transitional//EN 39 | http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | /html/ 49 | /xhtml/ 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 'xhtml' 59 | 60 | 61 | 62 | 63 | 64 | 65 | 1 66 | 67 | 68 | 69 | 70 | 71 | 72 | 'xml' 73 | 74 | 75 | 76 | 77 | 78 | 79 | 'xml' 80 | 81 | 82 | 83 | 84 | 85 | 86 | 'UTF-8' 87 | 88 | 89 | 90 | 91 | 92 | 93 | '-//W3C//DTD XHTML 1.0 Transitional//EN' 94 | 95 | 96 | 97 | 98 | 99 | 100 | 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | id 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | http://www.w3.org/1999/xhtml 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | no apply-templates; make it empty 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /xslt/include.xslt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Found <div> inside < 11 | 12 | 13 | 14 | Include pattern used 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Hyperlink used for include must contain text 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Deeply nested includes 53 | 54 | 55 | 56 | Include must use same-document fragments only 57 | 58 | 59 | 60 | Include doesn't contain fragment identifier 61 | 62 | 63 | 64 | Include causes infinite loop 65 | 66 | 67 | 68 | 69 | Include not found 70 | 71 | 72 | 73 | included # 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | --------------------------------------------------------------------------------