diff --git a/README.md b/README.md index 08f1143..1bb4474 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,8 @@ Este dataset es parte del proyecto abierto y colaborativo CodeForSpain. Puedes o - [Twitter](https://twitter.com/codeforspain) - [www.codeforspain.org](www.codeforspain.org) -## Datos - -### Municipios +## Municipios - URL: [Relación de municipios y códigos por provincias](http://www.ine.es/daco/daco42/codmun/codmun16/16codmunmapa.htm) @@ -78,18 +76,93 @@ En JSON: En la carpeta [/data/historical](/data/historical) se almacena un histórico con los datos correspondientes a otros años. -### Comunidades Autonomas (PENDIENTE) + + +## Provincias -- URL: http://www.ine.es/daco/daco42/codmun/cod_ccaa.htm -- Tipo: HTML - -No ha sufrido modificaciones en los últimos años. - - - -### Provincias (PENDIENTE) - URL: http://www.ine.es/daco/daco42/codmun/cod_provincia.htm - Tipo: HTML +- Script: [/scripts/autonomias_provincias/](/scripts/autonomias_provincias/) +- Datos procesaods: [/data/provincias.json](data/provincias.json) | [/data/provincias.csv](data/provincias.csv) -Las modificaciones que se producen son en las denominaciones oficiales de las provincias. +Las modificaciones que se producen son solo en las denominaciones oficiales de las provincias. + +### Formato de los datos + + +Incluye los siguientes campos: + + codigo: Codigo INE de la provincia + nombre: Denominacion oficial + + +Ejemplo en CSV: + +| codigo | nombre | +|--------|------------------| +| 02 | Albacete | +| 03 | Alicante/Alacant | +| 04 | Almería | + + +En JSON: + + [ + { + "codigo": "02", + "nombre": "Albacete" + }, + { + "codigo": "03", + "nombre": "Alicante\/Alacant" + }, + { + "codigo": "04", + "nombre": "Almería" + }, + + +## Comunidades Autonomas + +- URL: http://www.ine.es/daco/daco42/codmun/cod_ccaa.htm +- Tipo: HTML +- Script: [/scripts/autonomias_provincias/](/scripts/autonomias_provincias/) +- Datos procesaods: [/data/autonomias.json](data/autonomias.json) | [/data/autonomias.csv](data/autonomias.csv) + +No ha sufrido modificaciones en los últimos años. + +### Formato de los datos + + +Incluye los siguientes campos: + + codigo: Codigo INE de la autonomia + nombre: Denominacion oficial + + + +Ejemplo en CSV: + +| codigo | nombre | +|--------|---------------------------| +| 01 | Andalucía | +| 02 | Aragón | +| 03 | "Asturias, Principado de" | + + +En JSON: + + [ + { + "codigo":"01", + "nombre":"Andalucía" + }, + { + "codigo":"02", + "nombre":"Aragón" + }, + { + "codigo":"03", + "nombre":"Asturias, Principado de" + }, diff --git a/archive/cod_ccaa.htm b/archive/cod_ccaa.htm new file mode 100644 index 0000000..4130dfd --- /dev/null +++ b/archive/cod_ccaa.htm @@ -0,0 +1,2128 @@ + + + + + + + + +INEbase/ Clasificaciones /Relación de municipios, provincias, comunidades y ciudades autónomas con sus códigos / Relacin de comunidades y ciudades autnomas con sus cdigos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Instituto Nacional de Estadística.

+ +
+ + + +Logotipo de INEbase

INEbase +/ Clasificaciones / Relación de municipios, provincias, comunidades y ciudades autónomas con sus códigos / Relacin de comunidades y ciudades autnomas con sus cdigos

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CODIGOLITERAL
01 Andaluca
02 Aragn
03 Asturias, Principado de
04 Balears, Illes
05 Canarias
06 Cantabria
07 Castilla y Len
08 Castilla - La Mancha
09 Catalua
10 Comunitat Valenciana
11 Extremadura
12 Galicia
13 Madrid, Comunidad de
14 Murcia, Regin de
15 Navarra, Comunidad Foral de
16 Pas Vasco
17 Rioja, La
18 Ceuta
19 Melilla
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + diff --git a/archive/cod_provincia.htm b/archive/cod_provincia.htm new file mode 100644 index 0000000..33e15dd --- /dev/null +++ b/archive/cod_provincia.htm @@ -0,0 +1,2282 @@ + + + + + + + + +INEbase/ Clasificaciones / Relación de municipios, provincias, comunidades y ciudades autónomas y sus códigos / Relación de provincias con sus códigos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Instituto Nacional de Estadística.

+ +
+ + + +Logotipo de INEbase

INEbase +/ Clasificaciones / Relación de municipios, provincias, comunidades y ciudades autónomas y sus códigos / Relación de provincias con sus códigos

+ +
+
+
+ + + + + + ++ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CódigoLiteral
02 Albacete
03Alicante/Alacant
04 Almería
01Araba/Álava
33Asturias
05Ávila
06Badajoz
07Balears, Illes
08Barcelona
48 Bizkaia
09 Burgos
10Cáceres
11 Cádiz
39Cantabria
12 Castellón/Castelló
13Ciudad Real
14 Córdoba
15Corua, A
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CódigoLiteral
16 Cuenca
20 Gipuzkoa
17Girona
18 Granada
19Guadalajara
21Huelva
22Huesca
23Jaén
24León
25Lleida
27 Lugo
28Madrid
29 Málaga
30Murcia
31 Navarra
32Ourense
34Palencia
35 Palmas, Las
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CódigoLiteral
36 Pontevedra
26Rioja, La
37 Salamanca
38Santa Cruz de Tenerife
40Segovia
41Sevilla
42Soria
43Tarragona
44 Teruel
45Toledo
46 Valencia/València
47Valladolid
49Zamora
50 Zaragoza
51Ceuta
52Melilla
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + diff --git a/archive/municipios-2016.csv b/archive/municipios-2016.csv deleted file mode 120000 index 0111a13..0000000 --- a/archive/municipios-2016.csv +++ /dev/null @@ -1 +0,0 @@ -/home/inigo/code/ds-organizacion-administrativa/data/municipios-2016.csv \ No newline at end of file diff --git a/archive/municipios-2016.json b/archive/municipios-2016.json deleted file mode 120000 index 5ef134d..0000000 --- a/archive/municipios-2016.json +++ /dev/null @@ -1 +0,0 @@ -/home/inigo/code/ds-organizacion-administrativa/data/municipios-2016.json \ No newline at end of file diff --git a/data/autonomias.csv b/data/autonomias.csv new file mode 100644 index 0000000..4669636 --- /dev/null +++ b/data/autonomias.csv @@ -0,0 +1,20 @@ +codigo,nombre +01,Andalucía +02,Aragón +03,"Asturias, Principado de" +04,"Balears, Illes" +05,Canarias +06,Cantabria +07,"Castilla y León" +08,"Castilla - La Mancha" +09,Cataluña +10,"Comunitat Valenciana" +11,Extremadura +12,Galicia +13,"Madrid, Comunidad de" +14,"Murcia, Región de" +15,"Navarra, Comunidad Foral de" +16,"País Vasco" +17,"Rioja, La" +18,Ceuta +19,Melilla diff --git a/data/autonomias.json b/data/autonomias.json new file mode 100644 index 0000000..4c23ad2 --- /dev/null +++ b/data/autonomias.json @@ -0,0 +1,78 @@ +[ + { + "codigo": "01", + "nombre": "Andalucía" + }, + { + "codigo": "02", + "nombre": "Aragón" + }, + { + "codigo": "03", + "nombre": "Asturias, Principado de" + }, + { + "codigo": "04", + "nombre": "Balears, Illes" + }, + { + "codigo": "05", + "nombre": "Canarias" + }, + { + "codigo": "06", + "nombre": "Cantabria" + }, + { + "codigo": "07", + "nombre": "Castilla y León" + }, + { + "codigo": "08", + "nombre": "Castilla - La Mancha" + }, + { + "codigo": "09", + "nombre": "Cataluña" + }, + { + "codigo": "10", + "nombre": "Comunitat Valenciana" + }, + { + "codigo": "11", + "nombre": "Extremadura" + }, + { + "codigo": "12", + "nombre": "Galicia" + }, + { + "codigo": "13", + "nombre": "Madrid, Comunidad de" + }, + { + "codigo": "14", + "nombre": "Murcia, Región de" + }, + { + "codigo": "15", + "nombre": "Navarra, Comunidad Foral de" + }, + { + "codigo": "16", + "nombre": "País Vasco" + }, + { + "codigo": "17", + "nombre": "Rioja, La" + }, + { + "codigo": "18", + "nombre": "Ceuta" + }, + { + "codigo": "19", + "nombre": "Melilla" + } +] \ No newline at end of file diff --git a/data/provincias.csv b/data/provincias.csv new file mode 100644 index 0000000..89005d5 --- /dev/null +++ b/data/provincias.csv @@ -0,0 +1,53 @@ +codigo,nombre +02,Albacete +03,Alicante/Alacant +04,Almería +01,Araba/Álava +33,Asturias +05,Ávila +06,Badajoz +07,"Balears, Illes" +08,Barcelona +48,Bizkaia +09,Burgos +10,Cáceres +11,Cádiz +39,Cantabria +12,Castellón/Castelló +13,"Ciudad Real" +14,Córdoba +15,"Coruña, A" +16,Cuenca +20,Gipuzkoa +17,Girona +18,Granada +19,Guadalajara +21,Huelva +22,Huesca +23,Jaén +24,León +25,Lleida +27,Lugo +28,Madrid +29,Málaga +30,Murcia +31,Navarra +32,Ourense +34,Palencia +35,"Palmas, Las" +36,Pontevedra +26,"Rioja, La" +37,Salamanca +38,"Santa Cruz de Tenerife" +40,Segovia +41,Sevilla +42,Soria +43,Tarragona +44,Teruel +45,Toledo +46,Valencia/València +47,Valladolid +49,Zamora +50,Zaragoza +51,Ceuta +52,Melilla diff --git a/data/provincias.json b/data/provincias.json new file mode 100644 index 0000000..6055d37 --- /dev/null +++ b/data/provincias.json @@ -0,0 +1,210 @@ +[ + { + "codigo": "02", + "nombre": "Albacete" + }, + { + "codigo": "03", + "nombre": "Alicante\/Alacant" + }, + { + "codigo": "04", + "nombre": "Almería" + }, + { + "codigo": "01", + "nombre": "Araba\/Álava" + }, + { + "codigo": "33", + "nombre": "Asturias" + }, + { + "codigo": "05", + "nombre": "Ávila" + }, + { + "codigo": "06", + "nombre": "Badajoz" + }, + { + "codigo": "07", + "nombre": "Balears, Illes" + }, + { + "codigo": "08", + "nombre": "Barcelona" + }, + { + "codigo": "48", + "nombre": "Bizkaia" + }, + { + "codigo": "09", + "nombre": "Burgos" + }, + { + "codigo": "10", + "nombre": "Cáceres" + }, + { + "codigo": "11", + "nombre": "Cádiz" + }, + { + "codigo": "39", + "nombre": "Cantabria" + }, + { + "codigo": "12", + "nombre": "Castellón\/Castelló" + }, + { + "codigo": "13", + "nombre": "Ciudad Real" + }, + { + "codigo": "14", + "nombre": "Córdoba" + }, + { + "codigo": "15", + "nombre": "Coruña, A" + }, + { + "codigo": "16", + "nombre": "Cuenca" + }, + { + "codigo": "20", + "nombre": "Gipuzkoa" + }, + { + "codigo": "17", + "nombre": "Girona" + }, + { + "codigo": "18", + "nombre": "Granada" + }, + { + "codigo": "19", + "nombre": "Guadalajara" + }, + { + "codigo": "21", + "nombre": "Huelva" + }, + { + "codigo": "22", + "nombre": "Huesca" + }, + { + "codigo": "23", + "nombre": "Jaén" + }, + { + "codigo": "24", + "nombre": "León" + }, + { + "codigo": "25", + "nombre": "Lleida" + }, + { + "codigo": "27", + "nombre": "Lugo" + }, + { + "codigo": "28", + "nombre": "Madrid" + }, + { + "codigo": "29", + "nombre": "Málaga" + }, + { + "codigo": "30", + "nombre": "Murcia" + }, + { + "codigo": "31", + "nombre": "Navarra" + }, + { + "codigo": "32", + "nombre": "Ourense" + }, + { + "codigo": "34", + "nombre": "Palencia" + }, + { + "codigo": "35", + "nombre": "Palmas, Las" + }, + { + "codigo": "36", + "nombre": "Pontevedra" + }, + { + "codigo": "26", + "nombre": "Rioja, La" + }, + { + "codigo": "37", + "nombre": "Salamanca" + }, + { + "codigo": "38", + "nombre": "Santa Cruz de Tenerife" + }, + { + "codigo": "40", + "nombre": "Segovia" + }, + { + "codigo": "41", + "nombre": "Sevilla" + }, + { + "codigo": "42", + "nombre": "Soria" + }, + { + "codigo": "43", + "nombre": "Tarragona" + }, + { + "codigo": "44", + "nombre": "Teruel" + }, + { + "codigo": "45", + "nombre": "Toledo" + }, + { + "codigo": "46", + "nombre": "Valencia\/València" + }, + { + "codigo": "47", + "nombre": "Valladolid" + }, + { + "codigo": "49", + "nombre": "Zamora" + }, + { + "codigo": "50", + "nombre": "Zaragoza" + }, + { + "codigo": "51", + "nombre": "Ceuta" + }, + { + "codigo": "52", + "nombre": "Melilla" + } +] \ No newline at end of file diff --git a/datapackage.json b/datapackage.json index c4c232d..8c21828 100644 --- a/datapackage.json +++ b/datapackage.json @@ -47,8 +47,44 @@ }, { "name": "NOMBRE", + "type": "string", + "description": "Denominación oficial del municipio" + } + ] + } + }, + { + "path": "data/provincias.csv", + "schema": { + "fields": [ + { + "name": "codigo", "type": "number", - "description": "Denominación Oficial del Municipios" + "description": "Código INE de la provincia", + "pattern": "[0-9]{2}" + }, + { + "name": "nombre", + "type": "string", + "description": "Denominación oficial de la provincia" + } + ] + } + }, + { + "path": "data/autonomias.csv", + "schema": { + "fields": [ + { + "name": "codigo", + "type": "number", + "description": "Código INE de la comunidad autónoma", + "pattern": "[0-9]{2}" + }, + { + "name": "nombre", + "type": "string", + "description": "Denominación oficial de la comunidad autónoma" } ] } diff --git a/scripts/autonomias_provincias/Readme.md b/scripts/autonomias_provincias/Readme.md new file mode 100644 index 0000000..8ea3e07 --- /dev/null +++ b/scripts/autonomias_provincias/Readme.md @@ -0,0 +1,24 @@ +# Autonomias y Provincias + +Procesa los archivos fuente de autonomias alojados en `../../archive`. + +Si no los encuentra, los descarga. + + +## Modo de Uso + + $ ./php process.php [-ephd] + + +### opciones + + + --help, -h Muestra ayuda y termina + --download, -d Fuerza la descarga de los ficheros fuente aunque ya existan + --pretty_print, -p Formatea la salida JSON, añadiendo indentación y CR/LF al final de las lineas. + --escaped_unicode, -e Codifica caracteres Unicode multibyte escapado como \\uXXXX. + + +## Requisitos + +PHP 5.4+ diff --git a/scripts/autonomias_provincias/composer.json b/scripts/autonomias_provincias/composer.json new file mode 100644 index 0000000..3c42984 --- /dev/null +++ b/scripts/autonomias_provincias/composer.json @@ -0,0 +1,6 @@ +{ + "require": + { + "sunra/php-simple-html-dom-parser": "v1.5.0" + } +} \ No newline at end of file diff --git a/scripts/autonomias_provincias/composer.lock b/scripts/autonomias_provincias/composer.lock new file mode 100644 index 0000000..a15ca62 --- /dev/null +++ b/scripts/autonomias_provincias/composer.lock @@ -0,0 +1,62 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "f672c6c6d39ce3a0c607baa5801020db", + "content-hash": "ac5c4db7568034b5ac942975529c6c71", + "packages": [ + { + "name": "sunra/php-simple-html-dom-parser", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/sunra/php-simple-html-dom-parser.git", + "reference": "a0b80ace086c7e09085669205e1b3c2c9c7a453c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sunra/php-simple-html-dom-parser/zipball/a0b80ace086c7e09085669205e1b3c2c9c7a453c", + "reference": "a0b80ace086c7e09085669205e1b3c2c9c7a453c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "Sunra\\PhpSimple\\HtmlDomParser": "Src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "sunra", + "email": "sunra@yandex.ru", + "homepage": "http://github.com/sunra" + } + ], + "description": "Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.", + "homepage": "https://github.com/sunra/php-simple-html-dom-parser", + "keywords": [ + "dom", + "html", + "parser" + ], + "time": "2013-05-04 14:32:03" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/scripts/autonomias_provincias/process.php b/scripts/autonomias_provincias/process.php new file mode 100644 index 0000000..35748e8 --- /dev/null +++ b/scripts/autonomias_provincias/process.php @@ -0,0 +1,152 @@ +find('table[summary$=quetacion]') as $table) { + foreach($table->find('tr[!valign]') as $row){ + $provincias[] = [ + 'codigo' => trim($row->children(0)->innertext), + 'nombre' => html_entity_decode(trim($row->children(1)->innertext)), + ]; + + + }; +}; + +// Grabamos JSON +$file = fopen("$dataFolder/$provinciasDestFile.json",'w+'); +fwrite($file, json_encode($provincias,$jsonOptions) ); +fclose($file); + +// Grabamos csv + +$file = fopen("$dataFolder/$provinciasDestFile.csv",'w+'); +fputcsv($file, array_keys($provincias[0])); + +foreach ($provincias as $provincia) { + fputcsv($file, $provincia); +} +fclose($file); + + + +// PROCESAMOS AUTONOMIAS + +$html=iconv("ISO-8859-15", "UTF-8", file_get_contents($urlAutonomias)); + +$dom = HtmlDomParser::str_get_html( $html ); + +$autonomias=[]; + +$table=$dom->find('table',0); + +$rows = array_slice($table->find('tr'),1); +foreach($rows as $row){ + $autonomias[] = [ + 'codigo' => trim($row->children(0)->innertext), + 'nombre' => html_entity_decode(trim($row->children(1)->innertext)), + ]; +}; + +// Grabamos JSON +$file = fopen("$dataFolder/$autonomiasDestFile.json",'w+'); +fwrite($file, json_encode($autonomias,$jsonOptions) ); +fclose($file); + +// Grabamos csv + +$file = fopen("$dataFolder/$autonomiasDestFile.csv",'w+'); +fputcsv($file, array_keys($autonomias[0])); + +foreach ($autonomias as $autonomia) { + fputcsv($file, $autonomia); +} +fclose($file); + + + + +function showHelp() { + echo "Uso: $ php " . basename(__FILE__) . " [-hvd]\n\n"; + echo "Procesa los archivos fuente de autonomias y provincias que publica el INE alojados en ../../archive.\n"; + echo "Si no los encuentra, los descarga.\n\n"; + echo "Opciones: + + -h muestra esta ayuda y termina + -d fuerza la descarga de los ficheros fuente aunque ya existan + --pretty_print, -p Formatea la salida JSON, añadiendo indentación y CR/LF al final de las lineas. + --escaped_unicode, -u Codifica caracteres Unicode multibyte escapado como \\uXXXX. + + "; + +} diff --git a/scripts/autonomias_provincias/vendor/autoload.php b/scripts/autonomias_provincias/vendor/autoload.php new file mode 100644 index 0000000..120572c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + + private $classMapAuthoritative = false; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-0 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative) { + return false; + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if ($file === null && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if ($file === null) { + // Remember that this class does not exist. + return $this->classMap[$class] = false; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/scripts/autonomias_provincias/vendor/composer/LICENSE b/scripts/autonomias_provincias/vendor/composer/LICENSE new file mode 100644 index 0000000..c8d57af --- /dev/null +++ b/scripts/autonomias_provincias/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) 2015 Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/scripts/autonomias_provincias/vendor/composer/autoload_classmap.php b/scripts/autonomias_provincias/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..7a91153 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($vendorDir . '/sunra/php-simple-html-dom-parser/Src'), +); diff --git a/scripts/autonomias_provincias/vendor/composer/autoload_psr4.php b/scripts/autonomias_provincias/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..b265c64 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/composer/autoload_psr4.php @@ -0,0 +1,9 @@ + $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + + $loader->register(true); + + return $loader; + } +} diff --git a/scripts/autonomias_provincias/vendor/composer/installed.json b/scripts/autonomias_provincias/vendor/composer/installed.json new file mode 100644 index 0000000..ab14d59 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/composer/installed.json @@ -0,0 +1,47 @@ +[ + { + "name": "sunra/php-simple-html-dom-parser", + "version": "v1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sunra/php-simple-html-dom-parser.git", + "reference": "a0b80ace086c7e09085669205e1b3c2c9c7a453c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sunra/php-simple-html-dom-parser/zipball/a0b80ace086c7e09085669205e1b3c2c9c7a453c", + "reference": "a0b80ace086c7e09085669205e1b3c2c9c7a453c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "time": "2013-05-04 14:32:03", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Sunra\\PhpSimple\\HtmlDomParser": "Src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "sunra", + "email": "sunra@yandex.ru", + "homepage": "http://github.com/sunra" + } + ], + "description": "Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.", + "homepage": "https://github.com/sunra/php-simple-html-dom-parser", + "keywords": [ + "dom", + "html", + "parser" + ] + } +] diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/README.md b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/README.md new file mode 100644 index 0000000..4bb1f8f --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/README.md @@ -0,0 +1,38 @@ +php-simple-html-dom-parser +========================== + +Version 1.5 + +Adaptation for Composer and PSR-0 of: + +A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! +Require PHP 5+. +Supports invalid HTML. +Find tags on an HTML page with selectors just like jQuery. +Extract contents from HTML in a single line. + +http://simplehtmldom.sourceforge.net/ + + +Install +------- + + composer.phar require + - package name: "sunra/php-simple-html-dom-parser": "dev-master" + + +Usage +----- + +```php +use Sunra\PhpSimple\HtmlDomParser; + +... +$dom = HtmlDomParser::str_get_html( $str ); +or +$dom = HtmlDomParser::file_get_html( $file_name ); + +$elems = $dom->find($elem_name); +... + +``` diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/HtmlDomParser.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/HtmlDomParser.php new file mode 100644 index 0000000..4df4314 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/HtmlDomParser.php @@ -0,0 +1,20 @@ + + + + + FootballScoresLive - Previous Results + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + FootballScoresLive logo + + + + + +
+ + For FREE goals to your mobile + Click Here + + + + + +
+ + + +   +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Add this page to your favourites + +
Season Ticket Goal Alerts - coming soon
Mobile Goal Alerts
+ English Leagues
English National Team - coming soon
+ + Scottish Leagues
+ + Spanish Leagues
+ + Italian Leagues
Live Scores
Football Supermarket - coming soon
Previous Results
Future Fixtures
League Tables - coming soon
Sponsored Links - coming soon
 
Personalise
+ +
+ +
+
+ + + +
+ + + + + + + + + +
+
+ + + + +
+ +
+
+
+ + + + + + + +
+ + English Leagues goal alerts by SMS + + Scottish Leagues goal alerts by SMS + + Spanish Leagues goal alerts by SMS + + Italian Leagues goal alerts by SMS
+
+
+
+
+
+
+ + +
+ +

Historical Football Archive - Updated Daily!

+
+

Missed the details of your football club's latest performance? + Whether you support Manchester United or Cambridge United, Premiership club or Conference club, + you will find it all here, with our fantastic soccer library of results over the last two weeks. + These pages contain the history & detailed results package for every football game from around the world + from the last 14 match days, including not only every goal scored, but, game results, names of goal scorer, + match results, red cards and plenty more! This service is automatically updated every 24 hours, + simply select a date from the drop down menu :- +

+ + +

+ + + + + + + + + +
+  SCOTLAND - DIVISION 2
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 19:45 + Pst - +   + +   + +   + STRANRAER00PETERHEAD +   + +   + +   + +   + +   +
+
+ +
+ +
+ + + + + + + + + + +
+  ENGLAND - FA TROPHY - FIRST ROUND
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 19:45 + FT - +   + +   + +   + SWINDON SUPERMARINE10EASTBOURNE BOROUGH +   + +   + +   + + + + 74goalEDENBOROUGH +
+
+ +
+ +
+ + + + + + + + + + +
+  EUROPE (UEFA) - UEFA CUP - GROUP STAGE
+
+ + + + + + + + + + + + + + + + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 19:45 + FT - +   + +   + +   + AC MILAN22VfL WOLFSBURG +   + +   + +   + +   + + 81goalSAGLIK +
+ 19:45 + FT - +   + + 1 + +   + AJAX22SLAVIA PRAHA +   + +   + +   + +   + + 90penaltySUAREZ +
+ 19:45 + FT - +   + +   + +   + CLUB BRUGGE01FC COPENHAGEN +   + +   + +   + +   + + 58goalSANTIN +
+ 19:45 + FT - +   + +   + +   + DEP. LA CORUNA10NANCY +   + +   + +   + +   + + 74goalBODIPO +
+ 19:45 + FT - +   + +   + +   + FEYENOORD01LECH POZNAN +   + +   + +   + +   + + 26goalDJURDJEVIC +
+ 19:45 + FT - +   + +   + +   + HAMBURGER SV31ASTON VILLA + 1 + +   + +   + +   + + 84red cardSIDWELL +
+ 19:45 + FT - +   + +   + +   + PORTSMOUTH30HEERENVEEN +   + +   + +   + +   + + 90goalHREIDARSSON +
+ 19:45 + FT - +   + +   + +   + ST ETIENNE22VALENCIA +   + +   + +   + +   + + 72goalZIGIC +
+
+ +
+ +
+ + + + + + + + + + +
+  INTERNATIONAL TOURNAMENTS - OMAN FOUR NATIONS TOUR
+
+ + + + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 14:00 + FT - +   + +   + +   + OMAN31CHINA +   + +   + +   + + + + 84goalSALEH +
+ 16:30 + FT - +   + +   + +   + ECUADOR10IRAN + 1 + +   + +   + + + + 90red cardNEJAD +
+
+ +
+ +
+ + + + + + + + + + +
+  ITALY - FA CUP - ROUND 16
+
+ + + + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 16:00 + FT - +   + +   + +   + FIORENTINA01TORINO +   + +   + +   + + + + 19goalBIANCHI +
+ 20:00 + FT - +   + +   + +   + ROMA20BOLOGNA +   + +   + +   + + + + 86goalVUCINIC +
+
+ +
+ +
+ + + + + + + + + + +
+  ITALY - SERIE C1A
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 13:30 + FT - +   + +   + +   + PRO SESTO00LECCO +   + +   + +   + +   + +   +
+
+ +
+ +
+ + + + + + + + + + +
+  ITALY - SERIE C2A
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 13:30 + FT - +   + +   + +   + MEZZOCORONA13SAMBONIFACESE +   + +   + +   + +   + + 74goal  +
+
+ +
+ +
+ + + + + + + + + + +
+  SCOTLAND - FA CUP - THIRD ROUND
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 13:30 + FT - +   + +   + +   + LOCHEE UTD11AYR UTD +   + +   + +   + + + + 86goalHAGAN +
+
+ +
+ +
+ + + + + + + + + + +
+  WORLD (FIFA) - FIFA CLUB WORLD CHAMPIONSHIP - SEMI
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 10:30 + FT - +   + +   + +   + PACHUCA (MEX)02LIGA D.U. QUITO(ECU) +   + +   + +   + + + + 26goalBOLANOS +
+
+ +
+ +
+ + + + +
+ + + + +
+ View complete archive of FootballScoresLive.com Match Results +
+ +
+ + + + + + + +
+ + + +
+  |  + Disclaimer |  + Privacy |  + About Us |  + News Archive |  +
+ +
+ + + + + +
+ + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/.svn/text-base/index.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/.svn/text-base/index.php.svn-base new file mode 100644 index 0000000..189aa5a --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/.svn/text-base/index.php.svn-base @@ -0,0 +1,144 @@ +find('html', 0); +if ($l!==null) + $lang = $l->lang; +if ($lang!='') + $lang = 'lang="'.$lang.'"'; + +$charset = $html->find('meta[http-equiv*=content-type]', 0); +$target = array(); +$query = ''; + +if (isset($_REQUEST['query'])) { + $query = $_REQUEST['query']; + $target = $html->find($query); +} + +function stat_dom($dom) { + $count_text = 0; + $count_comm = 0; + $count_elem = 0; + $count_tag_end = 0; + $count_unknown = 0; + + foreach($dom->nodes as $n) { + if ($n->nodetype==HDOM_TYPE_TEXT) + ++$count_text; + if ($n->nodetype==HDOM_TYPE_COMMENT) + ++$count_comm; + if ($n->nodetype==HDOM_TYPE_ELEMENT) + ++$count_elem; + if ($n->nodetype==HDOM_TYPE_ENDTAG) + ++$count_tag_end; + if ($n->nodetype==HDOM_TYPE_UNKNOWN) + ++$count_unknown; + } + + echo 'Total: '. count($dom->nodes). + ', Text: '.$count_text. + ', Commnet: '.$count_comm. + ', Tag: '.$count_elem. + ', End Tag: '.$count_tag_end. + ', Unknown: '.$count_unknown; +} + +function dump_my_html_tree($node, $show_attr=true, $deep=0, $last=true) { + $count = count($node->nodes); + if ($count>0) { + if($last) + echo '\n"; +} +?> + + +> + + '; + else if ($charset) + echo $charset; + else + echo ''; + ?> + Simple HTML DOM Query Test + + + + + + + + +
+

Simple HTML DOM Test

+
+ find: + +
+
+ HTML STAT ()
+
+
+
    + +
+
+ + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/google.htm b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/google.htm new file mode 100644 index 0000000..c705a5e --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/google.htm @@ -0,0 +1,891 @@ + + + + + + + FootballScoresLive - Previous Results + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + FootballScoresLive logo + + + + + +
+ + For FREE goals to your mobile + Click Here + + + + + +
+ + + +   +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Add this page to your favourites + +
Season Ticket Goal Alerts - coming soon
Mobile Goal Alerts
+ English Leagues
English National Team - coming soon
+ + Scottish Leagues
+ + Spanish Leagues
+ + Italian Leagues
Live Scores
Football Supermarket - coming soon
Previous Results
Future Fixtures
League Tables - coming soon
Sponsored Links - coming soon
 
Personalise
+ +
+ +
+
+ + + +
+ + + + + + + + + +
+
+ + + + +
+ +
+
+
+ + + + + + + +
+ + English Leagues goal alerts by SMS + + Scottish Leagues goal alerts by SMS + + Spanish Leagues goal alerts by SMS + + Italian Leagues goal alerts by SMS
+
+
+
+
+
+
+ + +
+ +

Historical Football Archive - Updated Daily!

+
+

Missed the details of your football club's latest performance? + Whether you support Manchester United or Cambridge United, Premiership club or Conference club, + you will find it all here, with our fantastic soccer library of results over the last two weeks. + These pages contain the history & detailed results package for every football game from around the world + from the last 14 match days, including not only every goal scored, but, game results, names of goal scorer, + match results, red cards and plenty more! This service is automatically updated every 24 hours, + simply select a date from the drop down menu :- +

+ + +

+ + + + + + + + + +
+  SCOTLAND - DIVISION 2
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 19:45 + Pst - +   + +   + +   + STRANRAER00PETERHEAD +   + +   + +   + +   + +   +
+
+ +
+ +
+ + + + + + + + + + +
+  ENGLAND - FA TROPHY - FIRST ROUND
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 19:45 + FT - +   + +   + +   + SWINDON SUPERMARINE10EASTBOURNE BOROUGH +   + +   + +   + + + + 74goalEDENBOROUGH +
+
+ +
+ +
+ + + + + + + + + + +
+  EUROPE (UEFA) - UEFA CUP - GROUP STAGE
+
+ + + + + + + + + + + + + + + + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 19:45 + FT - +   + +   + +   + AC MILAN22VfL WOLFSBURG +   + +   + +   + +   + + 81goalSAGLIK +
+ 19:45 + FT - +   + + 1 + +   + AJAX22SLAVIA PRAHA +   + +   + +   + +   + + 90penaltySUAREZ +
+ 19:45 + FT - +   + +   + +   + CLUB BRUGGE01FC COPENHAGEN +   + +   + +   + +   + + 58goalSANTIN +
+ 19:45 + FT - +   + +   + +   + DEP. LA CORUNA10NANCY +   + +   + +   + +   + + 74goalBODIPO +
+ 19:45 + FT - +   + +   + +   + FEYENOORD01LECH POZNAN +   + +   + +   + +   + + 26goalDJURDJEVIC +
+ 19:45 + FT - +   + +   + +   + HAMBURGER SV31ASTON VILLA + 1 + +   + +   + +   + + 84red cardSIDWELL +
+ 19:45 + FT - +   + +   + +   + PORTSMOUTH30HEERENVEEN +   + +   + +   + +   + + 90goalHREIDARSSON +
+ 19:45 + FT - +   + +   + +   + ST ETIENNE22VALENCIA +   + +   + +   + +   + + 72goalZIGIC +
+
+ +
+ +
+ + + + + + + + + + +
+  INTERNATIONAL TOURNAMENTS - OMAN FOUR NATIONS TOUR
+
+ + + + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 14:00 + FT - +   + +   + +   + OMAN31CHINA +   + +   + +   + + + + 84goalSALEH +
+ 16:30 + FT - +   + +   + +   + ECUADOR10IRAN + 1 + +   + +   + + + + 90red cardNEJAD +
+
+ +
+ +
+ + + + + + + + + + +
+  ITALY - FA CUP - ROUND 16
+
+ + + + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 16:00 + FT - +   + +   + +   + FIORENTINA01TORINO +   + +   + +   + + + + 19goalBIANCHI +
+ 20:00 + FT - +   + +   + +   + ROMA20BOLOGNA +   + +   + +   + + + + 86goalVUCINIC +
+
+ +
+ +
+ + + + + + + + + + +
+  ITALY - SERIE C1A
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 13:30 + FT - +   + +   + +   + PRO SESTO00LECCO +   + +   + +   + +   + +   +
+
+ +
+ +
+ + + + + + + + + + +
+  ITALY - SERIE C2A
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 13:30 + FT - +   + +   + +   + MEZZOCORONA13SAMBONIFACESE +   + +   + +   + +   + + 74goal  +
+
+ +
+ +
+ + + + + + + + + + +
+  SCOTLAND - FA CUP - THIRD ROUND
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 13:30 + FT - +   + +   + +   + LOCHEE UTD11AYR UTD +   + +   + +   + + + + 86goalHAGAN +
+
+ +
+ +
+ + + + + + + + + + +
+  WORLD (FIFA) - FIFA CLUB WORLD CHAMPIONSHIP - SEMI
+
+ + + + + + +
StartStatMinRPOHome AwayRPOLatest
+ 10:30 + FT - +   + +   + +   + PACHUCA (MEX)02LIGA D.U. QUITO(ECU) +   + +   + +   + + + + 26goalBOLANOS +
+
+ +
+ +
+ + + + +
+ + + + +
+ View complete archive of FootballScoresLive.com Match Results +
+ +
+ + + + + + + +
+ + + +
+  |  + Disclaimer |  + Privacy |  + About Us |  + News Archive |  +
+ +
+ + + + + +
+ + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php new file mode 100644 index 0000000..189aa5a --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php @@ -0,0 +1,144 @@ +find('html', 0); +if ($l!==null) + $lang = $l->lang; +if ($lang!='') + $lang = 'lang="'.$lang.'"'; + +$charset = $html->find('meta[http-equiv*=content-type]', 0); +$target = array(); +$query = ''; + +if (isset($_REQUEST['query'])) { + $query = $_REQUEST['query']; + $target = $html->find($query); +} + +function stat_dom($dom) { + $count_text = 0; + $count_comm = 0; + $count_elem = 0; + $count_tag_end = 0; + $count_unknown = 0; + + foreach($dom->nodes as $n) { + if ($n->nodetype==HDOM_TYPE_TEXT) + ++$count_text; + if ($n->nodetype==HDOM_TYPE_COMMENT) + ++$count_comm; + if ($n->nodetype==HDOM_TYPE_ELEMENT) + ++$count_elem; + if ($n->nodetype==HDOM_TYPE_ENDTAG) + ++$count_tag_end; + if ($n->nodetype==HDOM_TYPE_UNKNOWN) + ++$count_unknown; + } + + echo 'Total: '. count($dom->nodes). + ', Text: '.$count_text. + ', Commnet: '.$count_comm. + ', Tag: '.$count_elem. + ', End Tag: '.$count_tag_end. + ', Unknown: '.$count_unknown; +} + +function dump_my_html_tree($node, $show_attr=true, $deep=0, $last=true) { + $count = count($node->nodes); + if ($count>0) { + if($last) + echo '\n"; +} +?> + + +> + + '; + else if ($charset) + echo $charset; + else + echo ''; + ?> + Simple HTML DOM Query Test + + + + + + + + +
+

Simple HTML DOM Test

+
+ find: + +
+
+ HTML STAT ()
+
+
+
    + +
+
+ + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/all-wcprops b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/all-wcprops new file mode 100644 index 0000000..6c49534 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/all-wcprops @@ -0,0 +1,29 @@ +K 25 +svn:wc:ra_dav:version-url +V 48 +/svnroot/simplehtmldom/!svn/ver/176/trunk/app/js +END +jquery.treeview.css +K 25 +svn:wc:ra_dav:version-url +V 68 +/svnroot/simplehtmldom/!svn/ver/176/trunk/app/js/jquery.treeview.css +END +jquery.treeview.js +K 25 +svn:wc:ra_dav:version-url +V 67 +/svnroot/simplehtmldom/!svn/ver/176/trunk/app/js/jquery.treeview.js +END +screen.css +K 25 +svn:wc:ra_dav:version-url +V 59 +/svnroot/simplehtmldom/!svn/ver/176/trunk/app/js/screen.css +END +jquery.js +K 25 +svn:wc:ra_dav:version-url +V 58 +/svnroot/simplehtmldom/!svn/ver/176/trunk/app/js/jquery.js +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/entries b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/entries new file mode 100644 index 0000000..579d7b7 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/entries @@ -0,0 +1,167 @@ +10 + +dir +182 +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom/trunk/app/js +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom + + + +2008-12-14T19:02:48.351607Z +176 +me578022 + + + + + + + + + + + + + + +d0e60b4b-9046-0410-940c-b97530268c78 + +jquery.treeview.css +file + + + + +2010-08-17T19:13:52.459235Z +339ab1bbbaefa62f58c1fbf4459a7d0e +2008-12-14T19:02:48.351607Z +176 +me578022 + + + + + + + + + + + + + + + + + + + + + +2589 + +jquery.treeview.js +file + + + + +2010-08-17T19:13:52.460235Z +3f81db67b7a973c8835ef5213e3b93c6 +2008-12-14T19:02:48.351607Z +176 +me578022 + + + + + + + + + + + + + + + + + + + + + +7839 + +images +dir + +screen.css +file + + + + +2010-08-17T19:13:52.463235Z +b8e74072c3d1b740bce61509ce86fe68 +2008-12-14T19:02:48.351607Z +176 +me578022 + + + + + + + + + + + + + + + + + + + + + +623 + +jquery.js +file + + + + +2010-08-17T19:13:52.465235Z +957620aeffb2e5b562591b7a19928ea4 +2008-12-14T19:02:48.351607Z +176 +me578022 + + + + + + + + + + + + + + + + + + + + + +94443 + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/text-base/jquery.js.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/text-base/jquery.js.svn-base new file mode 100644 index 0000000..b660baa --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/js/.svn/text-base/jquery.js.svn-base @@ -0,0 +1,3363 @@ +(function(){ +/* + * jQuery 1.2.2b2 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-12-20 14:36:56 +0100 (Don, 20 Dez 2007) $ + * $Rev: 4251 $ + */ + +// Map over jQuery in case of overwrite +if ( window.jQuery ) + var _jQuery = window.jQuery; + +var jQuery = window.jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.prototype.init( selector, context ); +}; + +// Map over the $ in case of overwrite +if ( window.$ ) + var _$ = window.$; + +// Map the jQuery namespace to the '$' one +window.$ = jQuery; + +// A simple way to check for HTML strings or ID strings +// (both of which we optimize for) +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; + +// Is it a simple selector +var isSimple = /^.[^:#\[\.]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + return this; + + // Handle HTML strings + } else if ( typeof selector == "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Make sure an element was located + if ( elem ) + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + else { + this[0] = elem; + this.length = 1; + return this; + } + + else + selector = []; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return new jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return new jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); + + return this.setArray( + // HANDLE: $(array) + selector.constructor == Array && selector || + + // HANDLE: $(arraylike) + // Watch for when an array-like object, contains DOM nodes, is passed in as the selector + (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) || + + // HANDLE: $(*) + [ selector ] ); + }, + + // The current version of jQuery being used + jquery: "@VERSION", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // The number of elements contained in the matched element set + length: 0, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + var ret = -1; + + // Locate the position of the desired element + this.each(function(i){ + if ( this == elem ) + ret = i; + }); + + return ret; + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( name.constructor == String ) + if ( value == undefined ) + return this.length && jQuery[ type || "attr" ]( this[0], name ) || undefined; + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text != "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) + // The elements to wrap the target around + jQuery( html, this[0].ownerDocument ) + .clone() + .insertBefore( this[0] ) + .map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }) + .append(this); + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, false, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, true, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + find: function( selector ) { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + jQuery.unique( elems ) : + elems ); + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"), + container2 = document.createElement("div"); + container.appendChild(clone); + container2.innerHTML = container.innerHTML; + return container2.firstChild; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] != undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, this ) ); + }, + + not: function( selector ) { + if ( selector.constructor == String ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ) ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return !selector ? this : this.pushStack( jQuery.merge( + this.get(), + selector.constructor == String ? + jQuery( selector ).get() : + selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ? + selector : [selector] ) ); + }, + + is: function( selector ) { + return selector ? + jQuery.multiFilter( selector, this ).length > 0 : + false; + }, + + hasClass: function( selector ) { + return this.is( "." + selector ); + }, + + val: function( value ) { + if ( value == undefined ) { + + if ( this.length ) { + var elem = this[0]; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + + // Everything else, we just grab the value + } else + return (this[0].value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = value.constructor == Array ? + value : + [ value ]; + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value == undefined ? + (this.length ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, reverse, callback ) { + var clone = this.length > 1, elems; + + return this.each(function(){ + if ( !elems ) { + elems = jQuery.clean( args, this.ownerDocument ); + + if ( reverse ) + elems.reverse(); + } + + var obj = this; + + if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); + + var scripts = jQuery( [] ); + + jQuery.each(elems, function(){ + var elem = clone ? + jQuery( this ).clone( true )[0] : + this; + + // execute all scripts after the elements have been injected + if ( jQuery.nodeName( elem, "script" ) ) { + scripts = scripts.add( elem ); + } else { + // Remove any inner scripts for later evaluation + if ( elem.nodeType == 1 ) + scripts = scripts.add( jQuery( "script", elem ).remove() ); + + // Inject the elements into the document + callback.call( obj, elem ); + } + }); + + scripts.each( evalScript ); + }); + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.prototype.init.prototype = jQuery.prototype; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( target.constructor == Boolean ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target != "object" && typeof target != "function" ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == 1 ) { + target = this; + i = 0; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + // Prevent never-ending loop + if ( target === options[ name ] ) + continue; + + // Recurse if we're merging object values + if ( deep && options[ name ] && typeof options[ name ] == "object" && target[ name ] && !options[ name ].nodeType ) + target[ name ] = jQuery.extend( target[ name ], options[ name ] ); + + // Don't bring in undefined values + else if ( options[ name ] != undefined ) + target[ name ] = options[ name ]; + + } + + // Return the modified object + return target; +}; + +var expando = "jQuery" + (new Date()).getTime(), uuid = 0, windowData = {}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // This may seem like some crazy code, but trust me when I say that this + // is the only cross-browser way to do this. --John + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && !fn.nodeName && + fn.constructor != Array && /function/i.test( fn + "" ); + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.browser.msie ) + script.text = data; + else + script.appendChild( document.createTextNode( data ) ); + + head.appendChild( script ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + cache: {}, + + data: function( elem, name, data ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // Compute a unique ID for the element + if ( !id ) + id = elem[ expando ] = ++uuid; + + // Only generate the data cache if we're + // trying to access or manipulate it + if ( name && !jQuery.cache[ id ] ) + jQuery.cache[ id ] = {}; + + // Prevent overriding the named cache with undefined values + if ( data != undefined ) + jQuery.cache[ id ][ name ] = data; + + // Return the named cache data, or the ID for the element + return name ? + jQuery.cache[ id ][ name ] : + id; + }, + + removeData: function( elem, name ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( jQuery.cache[ id ] ) { + // Remove the section of cache data + delete jQuery.cache[ id ][ name ]; + + // If we've removed all the data, remove the element's cache + name = ""; + + for ( name in jQuery.cache[ id ] ) + break; + + if ( !name ) + jQuery.removeData( elem ); + } + + // Otherwise, we want to remove all of the element's data + } else { + // Clean up the element expando + try { + delete elem[ expando ]; + } catch(e){ + // IE has trouble directly removing the expando + // but it's ok with using removeAttribute + if ( elem.removeAttribute ) + elem.removeAttribute( expando ); + } + + // Completely remove the data cache + delete jQuery.cache[ id ]; + } + }, + + // args is for internal usage only + each: function( object, callback, args ) { + if ( args ) { + if ( object.length == undefined ) + for ( var name in object ) + callback.apply( object[ name ], args ); + else + for ( var i = 0, length = object.length; i < length; i++ ) + if ( callback.apply( object[ i ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( object.length == undefined ) + for ( var name in object ) + callback.call( object[ name ], name, object[ name ] ); + else + for ( var i = 0, length = object.length, value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames != undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use is(".class") + has: function( elem, className ) { + return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret; + + // A helper method for determining if an element's values are broken + function color( elem ) { + if ( !jQuery.browser.safari ) + return false; + + var ret = document.defaultView.getComputedStyle( elem, null ); + return !ret || ret.getPropertyValue("color") == ""; + } + + // We need to handle opacity special in IE + if ( name == "opacity" && jQuery.browser.msie ) { + ret = jQuery.attr( elem.style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = elem.style.display; + elem.style.display = "block"; + elem.style.display = save; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && elem.style[ name ] ) + ret = elem.style[ name ]; + + else if ( document.defaultView && document.defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var getComputedStyle = document.defaultView.getComputedStyle( elem, null ); + + if ( getComputedStyle && !color( elem ) ) + ret = getComputedStyle.getPropertyValue( name ); + + // If the element isn't reporting its values properly in Safari + // then some display: none elements are involved + else { + var swap = [], stack = []; + + // Locate all of the parent display: none elements + for ( var a = elem; a && color(a); a = a.parentNode ) + stack.unshift(a); + + // Go through and make them visible, but in reverse + // (It would be better if we knew the exact display type that they had) + for ( var i = 0; i < stack.length; i++ ) + if ( color( stack[ i ] ) ) { + swap[ i ] = stack[ i ].style.display; + stack[ i ].style.display = "block"; + } + + // Since we flip the display style, we have to handle that + // one special, otherwise get the value + ret = name == "display" && swap[ stack.length - 1 ] != null ? + "none" : + ( getComputedStyle && getComputedStyle.getPropertyValue( name ) ) || ""; + + // Finally, revert the display styles back + for ( var i = 0; i < swap.length; i++ ) + if ( swap[ i ] != null ) + stack[ i ].style.display = swap[ i ]; + } + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var style = elem.style.left, runtimeStyle = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + elem.style.left = ret || 0; + ret = elem.style.pixelLeft + "px"; + + // Revert the changed values + elem.style.left = style; + elem.runtimeStyle.left = runtimeStyle; + } + } + + return ret; + }, + + clean: function( elems, context ) { + var ret = []; + context = context || document; + // !context.createElement fails in IE with an error but returns typeof 'object' + if (typeof context.createElement == 'undefined') + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + jQuery.each(elems, function(i, elem){ + if ( !elem ) + return; + + if ( elem.constructor == Number ) + elem = elem.toString(); + + // Convert html string into DOM nodes + if ( typeof elem == "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
" ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + + + + +

PHP Simple HTML DOM Parser Manual

+
+

Index

+ + + +

Quick Start

+ Top +
+ +
+
+ // Create DOM from URL or file
+ $html = file_get_html('http://www.google.com/');
+
+ // Find all images
+ foreach($html->find('img') as $element)
+       echo $element->src . '<br>';
+
+// Find all links
+foreach($html->find('a') as $element)
+       echo $element->href . '<br>';
+
+
+
+ // Create DOM from string
+ $html = str_get_html('<div id="hello">Hello</div><div id="world">World</div>');
+
+
+ +$html->find('div', 1)->class = 'bar';
+
+$html->find('div[id=hello]', 0)->innertext = 'foo';
+
+ echo $html; // Output: <div id="hello">foo</div><div id="world" class="bar">World</div>
+
+
+

+ // Dump contents (without tags) from HTML
+ echo file_get_html('http://www.google.com/')->plaintext; +
+
+
+
+
+
+ // Create DOM from URL
+ $html = file_get_html('http://slashdot.org/');
+
+ // Find all article blocks
+ foreach($html->find('div.article') as $article) {
+    $item['title']     = $article->find('div.title', 0)->plaintext;
+    $item['intro']    = $article->find('div.intro', 0)->plaintext;
+    $item['details'] = $article->find('div.details', 0)->plaintext;
+    $articles[] = $item;
+ }
+
+ print_r($articles); +
+
+
+ + +

How to create HTML DOM object?

+ Top +
+ +
+
// Create a DOM object from a string
+ $html = str_get_html('<html><body>Hello!</body></html>');
+
+ // Create a DOM object from a URL
+ $html = file_get_html('http://www.google.com/');
+
+ // Create a DOM object from a HTML file
+ $html = file_get_html('test.htm');
+
+
+
+
// Create a DOM object
+ $html = new simple_html_dom();
+
+ // Load HTML from a string
+ $html->load('<html><body>Hello!</body></html>');
+
+ // Load HTML from a URL
+ $html->load_file('http://www.google.com/');
+
+ // Load HTML from a HTML file
+ $html->load_file('test.htm');
+
+
+ +

How to find HTML elements?

+ Top +
+ +
+
// Find all anchors, returns a array of element objects
+ $ret = $html->find('a');
+
+ // Find (N)th anchor, returns element object or null if not found (zero based)
+ $ret = $html->find('a', 0);
+
+ // Find lastest anchor, returns element object or null if not found (zero based)
+$ret = $html->find('a', -1);
+
+ // Find all <div> with the id attribute
+$ret = $html->find('div[id]');
+
+ // Find all <div> which attribute id=foo
+$ret = $html->find('div[id=foo]');
+
+
+
+
// Find all element which id=foo
+ $ret = $html->find('#foo');
+
+ // Find all element which class=foo
+ $ret = $html->find('.foo');
+
+ // Find all element has attribute id
+$ret = $html->find('*[id]');
+
+ // Find all anchors and images
+$ret = $html->find('a, img');
+
+ // Find all anchors and images with the "title" attribute
+ $ret = $html->find('a[title], img[title]');
+
+
+
+
+ Supports these operators in attribute selectors:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilterDescription
[attribute]Matches elements that have the specified attribute.
[!attribute]Matches elements that don't have the specified attribute.
[attribute=value]Matches elements that have the specified attribute with a certain value.
[attribute!=value]Matches elements that don't have the specified attribute with a certain value.
[attribute^=value]Matches elements that have the specified attribute and it starts with a certain value.
[attribute$=value]Matches elements that have the specified attribute and it ends with a certain value.
[attribute*=value]Matches elements that have the specified attribute and it contains a certain value.
+
+
+
+
// Find all <li> in <ul>
+ $es = $html->find('ul li');
+
+ // Find Nested <div> tags
+ $es = $html->find('div div div');
+
+ // Find all <td> in <table> which class=hello
+ $es = $html->find('table.hello td');
+
+ // Find all td tags with attribite align=center in table tags
+ $es = $html->find(''table td[align=center]');
+
+
+
+
// Find all text blocks
+ $es = $html->find('text');
+
+ // Find all comment (<!--...-->) blocks
+ $es = $html->find('comment');
+
+
+
+
// Find all <li> in <ul>
+ foreach($html->find('ul') as $ul)
+ {
+       foreach($ul->find('li') as $li)
+       {
+             // do something...
+       }
+ }
+
+ // Find first <li> in first <ul>
+ $e = $html->find('ul', 0)->find('li', 0);
+
+
+
+ +

How to access the HTML element's attributes?

+ Top +
+ +
+
+ // Get a attribute ( If the attribute is non-value attribute (eg. checked, selected...), it will returns true or false)
+ $value = $e->href;
+
+ // Set a attribute(If the attribute is non-value attribute (eg. checked, selected...), set it's value as true or false)
+ $e->href = 'my link';
+
+ // Remove a attribute, set it's value as null!
+ $e->href = null;
+
+ // Determine whether a attribute exist?
+if(isset($e->href))
+        echo 'href exist!';
+
+
+
+
// Example
+ $html = str_get_html("<div>foo <b>bar</b></div>");
+ $e = $html->find("div", 0);
+
+ echo $e->tag; // Returns: " div"
+ echo $e->outertext; // Returns: " <div>foo <b>bar</b></div>"
+ echo $e->innertext; // Returns: " foo <b>bar</b>"
+ echo $e->plaintext; // Returns: " foo bar"
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Attribute NameUsage
$e->tagRead or write the tag name of element.
$e->outertextRead or write the outer HTML text of element.
$e->innertextRead or write the inner HTML text of element.
$e->plaintextRead or write the plain text of element.
+
+
+
+
// Extract contents from HTML
+echo $html->plaintext;
+
+ + // Wrap a element
+ $e->outertext = '<div class="wrap">' . $e->outertext . '<div>';
+
+ // Remove a element, set it's outertext as an empty string
+ $e->outertext = '';
+
+ // Append a element
+$e->outertext = $e->outertext . '<div>foo<div>';
+
+// Insert a element
+$e->outertext = '<div>foo<div>' . $e->outertext;
+
+
+
+ +

How to traverse the DOM tree?

+ Top +
+ +
+
// If you are not so familiar with HTML DOM, check this link to learn more...
+
+ // Example
+ echo $html->find("#div1", 0)->children(1)->children(1)->children(2)->id;
+ // or
+ echo $html->getElementById("div1")->childNodes(1)->childNodes(1)->childNodes(2)->getAttribute('id');
+
+
+
You can also call methods with Camel naming convertions.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Description
+
mixed
$e->children ( [int $index] )
Returns the Nth child object if index is set, otherwise return an array of children.
+
element
$e->parent ()
Returns the parent of element.
+
element
$e->first_child ()
Returns the first child of element, or null if not found.
+
element
$e->last_child ()
Returns the last child of element, or null if not found.
+
element
$e->next_sibling ()
Returns the next sibling of element, or null if not found.
+
element
$e->prev_sibling ()
Returns the previous sibling of element, or null if not found.
+
+
+ +
+ +

How to dump contents of DOM object?

+ Top +
+ +
+
// Dumps the internal DOM tree back into string
+ $str = $html->save();
+
+ // Dumps the internal DOM tree back into a file
+ $html->save('result.htm');
+
+
+
// Dumps the internal DOM tree back into string
+ $str = $html;
+
+ // Print it!
+ echo $html;
+
+
+
+ +

How to customize the parsing behavior?

+ Top +
+ +
+
// Write a function with parameter "$element"
+ function my_callback($element) {
+         // Hide all <b> tags
+        if ($element->tag=='b')
+                 $element->outertext = '';
+ }
+
+ // Register the callback function with it's function name
+ $html->set_callback('my_callback');
+
+ // Callback function will be invoked while dumping
+ echo $html; +
+
+
+ +

+ Author: S.C. Chen (me578022@gmail.com)
+Original idea is from Jose Solorzano's HTML Parser for PHP 4.
+Contributions by: Contributions by: Yousuke Kumakura, Vadim Voituk, Antcs
+
+
+ + + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/.svn/text-base/manual_api.htm.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/.svn/text-base/manual_api.htm.svn-base new file mode 100644 index 0000000..da793c0 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/.svn/text-base/manual_api.htm.svn-base @@ -0,0 +1,320 @@ + + + + +PHP Simple HTML DOM Parser: API Reference + + + +

PHP Simple HTML DOM Parser Manual

+
+

Index

+ + +

API Reference

+ Top +
Helper functions + + + + + + + + + + + + + +
NameDescription
object str_get_html ( string $content )Creates a DOM object from a string.
object file_get_html ( string $filename )Creates a DOM object from a file or a URL.
+
+ DOM methods & properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name Description
+
void
+ __construct ( [string $filename] )
Constructor, set the filename parameter will automatically load the contents, either text or file/url.
+
string
+ plaintext
Returns the contents extracted from HTML.
+
void
+ clear ()
Clean up memory.
+
void
+ load ( string $content )
Load contents from a string.
+
string
+ save ( [string $filename] )
Dumps the internal DOM tree back into a string. If the $filename is set, result string will save to file.
+
void
+ load_file ( string $filename )
Load contents from a from a file or a URL.
+
void
+ set_callback ( string $function_name )
Set a callback function.
+
mixed
+ find ( string $selector [, int $index] )
Find elements by the CSS selector. Returns the Nth element object if index is set, otherwise return an array of object.
+
+ Element methods & properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+
string
+ [attribute]
Read or write element's attribure value.
+
string
+ tag
Read or write the tag name of element.
+
string
+ outertext
Read or write the outer HTML text of element.
+
string
+ innertext
Read or write the inner HTML text of element.
+
string
+ plaintext
Read or write the plain text of element.
+
mixed
+ find ( string $selector [, int $index] )
Find children by the CSS selector. Returns the Nth element object if index is set, otherwise, return an array of object.
+
+ DOM
traversing
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+
mixed
+ $e->children ( [int $index] )
Returns the Nth child object if index is set, otherwise return an array of children.
+
element
+ $e->parent ()
Returns the parent of element.
+
element
+ $e->first_child ()
Returns the first child of element, or null if not found.
+
element
+ $e->last_child ()
Returns the last child of element, or null if not found.
+
element
+ $e->next_sibling ()
Returns the next sibling of element, or null if not found.
+
element
+ $e->prev_sibling ()
Returns the previous sibling of element, or null if not found.
+
+ +

Camel naming convertions

+ Top +
You can also call methods with W3C STANDARD camel naming convertions.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodMapping
+
array
+ $e->getAllAttributes ()
+
array
+ $e->attr
+
string
+ $e->getAttribute ( $name )
+
string
+ $e->attribute
+
void
+ $e->setAttribute ( $name, $value )
+
void
+ $value = $e->attribute
+
bool
+ $e->hasAttribute ( $name )
+
bool
+ isset($e->attribute)
+
void
+ $e->removeAttribute ( $name )
+
void
+ $e->attribute = null
+
element
+ $e->getElementById ( $id )
+
mixed
+ $e->find ( "#$id", 0 )
+
mixed
+ $e->getElementsById ( $id [,$index] )
+
mixed
+ $e->find ( "#$id" [, int $index] )
+
element
+ $e->getElementByTagName ($name )
+
mixed
+ $e->find ( $name, 0 )
+
mixed
+ $e->getElementsByTagName ( $name [, $index] )
+
mixed
+ $e->find ( $name [, int $index] )
+
element
+ $e->parentNode ()
+
element
+ $e->parent ()
+
mixed
+ $e->childNodes ( [$index] )
+
mixed
+ $e->children ( [int $index] )
+
element
+ $e->firstChild ()
+
element
+ $e->first_child ()
+
element
+ $e->lastChild ()
+
element
+ $e->last_child ()
+
element
+ $e->nextSibling ()
+
element
+ $e->next_sibling ()
+
element
+ $e->previousSibling ()
+
element
+ $e->prev_sibling ()
+
+

+ Author: S.C. Chen (me578022@gmail.com)
+Original idea is from Jose Solorzano's HTML Parser for PHP 4.
+Contributions by: Contributions by: Yousuke Kumakura, Vadim Voituk, Antcs
+
+
+ + + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/.svn/text-base/manual_faq.htm.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/.svn/text-base/manual_faq.htm.svn-base new file mode 100644 index 0000000..4013156 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/.svn/text-base/manual_faq.htm.svn-base @@ -0,0 +1,91 @@ + + + + +PHP Simple HTML DOM Parser: FAQ + + + +

PHP Simple HTML DOM Parser Manual

+
+

FAQ

+ +
+ +

Problem with finding

+ Top +
Q: Element not found in such case:
+ $html->find('div[style=padding: 0px 2px;] span[class=rf]');
+
+ A: If there is blank in selectors, quote it!  
+ $html->find('div[style="padding: 0px 2px;"] span[class=rf]');
+ +

Problem with hosting

+ Top +
Q: On my local server everything works fine, but when I put it on my esternal server it doesn't work. 
+
+ A: The "file_get_dom" function is a wrapper of "file_get_contents" function,  you must set "allow_url_fopen" as TRUE in "php.ini" to allow accessing files via HTTP or FTP. However, some hosting venders disabled PHP's "allow_url_fopen" flag for security issues... PHP provides excellent support for "curl" library to do the same job, Use curl to get the page, then call "str_get_dom" to create DOM object. 
+
+ Example: 
+  
+ $curl = curl_init(); 
+ curl_setopt($curl, CURLOPT_URL, 'http://????????');  
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);  
+ curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);  
+ $str = curl_exec($curl);  
+ curl_close($curl);  
+  
+ $html= str_get_html($str); 
+ ... 
+ +
+

Behind a proxy

+ Top +
Q: My server is behind a Proxy and i can't use file_get_contents b/c it returns a unauthorized error.
+
+ A: Thanks for Shaggy to provide the solution: 
+  
+ // Define a context for HTTP. 
+ $context = array
+ ( 
+       'http' => array
+       ( 
+              'proxy' => 'addresseproxy:portproxy', // This needs to be the server and the port of the NTLM Authentication Proxy Server. 
+              'request_fulluri' => true, 
+       ), 
+ ); 
+
+ $context = stream_context_create($context); 
+  
+ $html= file_get_html('http://www.php.net', false, $context); 
+ ...
+
+
+ +

Memory leak!

+ Top +
Q: This script is leaking memory seriously... After it finished running, it's not cleaning up dom object properly from memory.. 
+
+ A: Due to php5 circular references memory leak, after creating DOM object, you must call $dom->clear() to free memory if call file_get_dom() more then once. 
+
+ Example: 
+
+ $html = file_get_html(...); 
+ // do something... 
+ $html->clear(); 
+ unset($html);
+
+ Author: S.C. Chen (me578022@gmail.com)
+Original idea is from Jose Solorzano's HTML Parser for PHP 4.
+Contributions by: Yousuke Kumakura, Vadim Voituk, Antcs
+
+
+ + + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/all-wcprops b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/all-wcprops new file mode 100644 index 0000000..86b0d7c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 52 +/svnroot/simplehtmldom/!svn/ver/120/trunk/manual/css +END +default.css +K 25 +svn:wc:ra_dav:version-url +V 64 +/svnroot/simplehtmldom/!svn/ver/120/trunk/manual/css/default.css +END +ui.tabs.css +K 25 +svn:wc:ra_dav:version-url +V 63 +/svnroot/simplehtmldom/!svn/ver/29/trunk/manual/css/ui.tabs.css +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/entries b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/entries new file mode 100644 index 0000000..8a12338 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +182 +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom/trunk/manual/css +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom + + + +2008-06-24T22:59:40.092528Z +120 +me578022 + + + + + + + + + + + + + + +d0e60b4b-9046-0410-940c-b97530268c78 + +default.css +file + + + + +2010-08-17T19:13:53.530296Z +2f01e1ff8a4fa8fe63c8be8e17800ab0 +2008-06-24T22:59:40.092528Z +120 +me578022 + + + + + + + + + + + + + + + + + + + + + +2069 + +ui.tabs.css +file + + + + +2010-08-17T19:13:53.531296Z +995c002d1908567d7542ec9c2adfdc65 +2008-03-14T14:58:12.908404Z +29 +me578022 + + + + + + + + + + + + + + + + + + + + + +3833 + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/text-base/default.css.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/text-base/default.css.svn-base new file mode 100644 index 0000000..2ccfc2f --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/text-base/default.css.svn-base @@ -0,0 +1,113 @@ +/*$Rev: 46 $*/ + +body { +margin: 0; +padding: 0; +font-family: verdana,arial,helvetica,sans-serif; +font-size: 11px; +color: #4F5155; +} + +#content { +margin: 0 20px 0 20px; +line-height: 16px; +padding: 0; +} + +h1 { +font-size: 18px; +margin: 0; +padding: 0 0 2px 0; +background-color: #D0D0D0; +text-align: center; +} + +h2 { +background-color: #727EA3; +border-right: 1px solid #D0D0D0; +border-bottom: 1px solid #D0D0D0; +color: #FFFFFF; +font-size: 14px; +font-weight: bold; +margin: 14px 0 4px 0; +padding: 1px 10px 1px 10px; +} + +ul { +margin-top: 0; +margin-bottom: 0; +line-height:1.5em; +list-style-image:url(bullet.gif); +list-style-type:square; +} + +.top { +font-size: 11px; +float: right; +} + +.code { +font-size: 11px; +font-family: Monaco, Verdana, Sans-serif; +line-height: 14px; +background-color: #f6f6f6; +border-bottom: 1px solid #D0D0D0; +border-top: 1px solid #A0A0A0; +border-left: 1px solid #A0A0A0; +border-right: 1px solid #D0D0D0; +color: #002166; +display: block; +margin: 2px 0 2px 0; +padding: 2px 10px 2px 10px; +} + +.code A:link {color: #002166; text-decoration: none; font-weight: bold;} +.code A:visited {color: #002166; text-decoration: none; font-weight: bold;} +.code A:active {color: #002166; text-decoration: none; font-weight: bold;} +.code A:hover {color: #0000ff; text-decoration: underline; font-weight: bold;} + +.code .keyword { +color: #007700; +} + +.code .comment { +font-size: 10px; +color: #888; +} + +.code .var { +color: #770000; +} + +th { +font-family: Lucida Grande, Verdana, Geneva, Sans-serif; +color: #000000; +background-color: #CFD4E6; +margin: 2px 2px 2px 2px; +padding: 2px 2px 2px 2px; +font-size: 13px; +font-weight: normal; +font-style: normal; +} + +td { +background-color: #dddddd; +} + +.description { +font-family: Lucida Grande, Verdana, Geneva, Sans-serif; +font-size: 11px; +color: #333; +text-ident: 30px; +font-style: normal; +} + +.returns { +font-family: Monaco, Verdana, Sans-serif; +font-size: 10px; +color: #888; +float: left; +text-align: right; +margin: 0 4px 0 0; +width: 48px; +} \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/text-base/ui.tabs.css.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/text-base/ui.tabs.css.svn-base new file mode 100644 index 0000000..a9dc199 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/.svn/text-base/ui.tabs.css.svn-base @@ -0,0 +1,116 @@ +/* Caution! Ensure accessibility in print and other media types... */ +@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ + .ui-tabs-hide { + display: none; + } +} + +/* Hide useless elements in print layouts... */ +@media print { + .ui-tabs-nav { + display: none; + } +} + +/* Skin */ +.ui-tabs-nav, .ui-tabs-panel { + font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; + font-size: 12px; +} +.ui-tabs-nav { + list-style: none; + margin: 0; + padding: 0 0 0 4px; +} +.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ + display: block; + clear: both; + content: " "; +} +.ui-tabs-nav li { + float: left; + margin: 0 0 0 1px; + min-width: 84px; /* be nice to Opera */ +} +.ui-tabs-nav a, .ui-tabs-nav a span { + display: block; + padding: 0 10px; + background: url(../img/tab.png) no-repeat; +} +.ui-tabs-nav a { + margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ + padding-left: 0; + color: #27537a; + font-weight: bold; + line-height: 1.2; + text-align: center; + text-decoration: none; + white-space: nowrap; /* required in IE 6 */ + outline: 0; /* prevent dotted border in Firefox */ +} +.ui-tabs-nav .ui-tabs-selected a { + position: relative; + top: 1px; + z-index: 2; + margin-top: 0; + color: #000; +} +.ui-tabs-nav a span { + width: 64px; /* IE 6 treats width as min-width */ + min-width: 64px; + height: 18px; /* IE 6 treats height as min-height */ + min-height: 18px; + padding-top: 6px; + padding-right: 0; +} +*>.ui-tabs-nav a span { /* hide from IE 6 */ + width: auto; + height: auto; +} +.ui-tabs-nav .ui-tabs-selected a span { + padding-bottom: 1px; +} +.ui-tabs-nav .ui-tabs-selected a, .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active { + background-position: 100% -150px; +} +.ui-tabs-nav a, .ui-tabs-nav .ui-tabs-disabled a:hover, .ui-tabs-nav .ui-tabs-disabled a:focus, .ui-tabs-nav .ui-tabs-disabled a:active { + background-position: 100% -100px; +} +.ui-tabs-nav .ui-tabs-selected a span, .ui-tabs-nav a:hover span, .ui-tabs-nav a:focus span, .ui-tabs-nav a:active span { + background-position: 0 -50px; +} +.ui-tabs-nav a span, .ui-tabs-nav .ui-tabs-disabled a:hover span, .ui-tabs-nav .ui-tabs-disabled a:focus span, .ui-tabs-nav .ui-tabs-disabled a:active span { + background-position: 0 0; +} +.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, .ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */ + cursor: text; +} +.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, +.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */ + cursor: pointer; +} +.ui-tabs-disabled { + opacity: .4; + filter: alpha(opacity=40); +} +.ui-tabs-panel { + border-top: 1px solid #97a5b0; + padding: 2px 4px 2px 4px; + background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */ + border: 1px solid #D0D0D0; + border-bottom: 1px solid #A0A0A0; + border-right: 1px solid #A0A0A0; +} +.ui-tabs-loading em { + padding: 0 0 0 20px; + background: url(loading.gif) no-repeat 0 50%; +} + +/* Additional IE specific bug fixes... */ +* html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ + display: inline-block; +} +*:first-child+html .ui-tabs-nav { /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ + display: inline-block; +} + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/default.css b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/default.css new file mode 100644 index 0000000..2ccfc2f --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/default.css @@ -0,0 +1,113 @@ +/*$Rev: 46 $*/ + +body { +margin: 0; +padding: 0; +font-family: verdana,arial,helvetica,sans-serif; +font-size: 11px; +color: #4F5155; +} + +#content { +margin: 0 20px 0 20px; +line-height: 16px; +padding: 0; +} + +h1 { +font-size: 18px; +margin: 0; +padding: 0 0 2px 0; +background-color: #D0D0D0; +text-align: center; +} + +h2 { +background-color: #727EA3; +border-right: 1px solid #D0D0D0; +border-bottom: 1px solid #D0D0D0; +color: #FFFFFF; +font-size: 14px; +font-weight: bold; +margin: 14px 0 4px 0; +padding: 1px 10px 1px 10px; +} + +ul { +margin-top: 0; +margin-bottom: 0; +line-height:1.5em; +list-style-image:url(bullet.gif); +list-style-type:square; +} + +.top { +font-size: 11px; +float: right; +} + +.code { +font-size: 11px; +font-family: Monaco, Verdana, Sans-serif; +line-height: 14px; +background-color: #f6f6f6; +border-bottom: 1px solid #D0D0D0; +border-top: 1px solid #A0A0A0; +border-left: 1px solid #A0A0A0; +border-right: 1px solid #D0D0D0; +color: #002166; +display: block; +margin: 2px 0 2px 0; +padding: 2px 10px 2px 10px; +} + +.code A:link {color: #002166; text-decoration: none; font-weight: bold;} +.code A:visited {color: #002166; text-decoration: none; font-weight: bold;} +.code A:active {color: #002166; text-decoration: none; font-weight: bold;} +.code A:hover {color: #0000ff; text-decoration: underline; font-weight: bold;} + +.code .keyword { +color: #007700; +} + +.code .comment { +font-size: 10px; +color: #888; +} + +.code .var { +color: #770000; +} + +th { +font-family: Lucida Grande, Verdana, Geneva, Sans-serif; +color: #000000; +background-color: #CFD4E6; +margin: 2px 2px 2px 2px; +padding: 2px 2px 2px 2px; +font-size: 13px; +font-weight: normal; +font-style: normal; +} + +td { +background-color: #dddddd; +} + +.description { +font-family: Lucida Grande, Verdana, Geneva, Sans-serif; +font-size: 11px; +color: #333; +text-ident: 30px; +font-style: normal; +} + +.returns { +font-family: Monaco, Verdana, Sans-serif; +font-size: 10px; +color: #888; +float: left; +text-align: right; +margin: 0 4px 0 0; +width: 48px; +} \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/ui.tabs.css b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/ui.tabs.css new file mode 100644 index 0000000..a9dc199 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/css/ui.tabs.css @@ -0,0 +1,116 @@ +/* Caution! Ensure accessibility in print and other media types... */ +@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ + .ui-tabs-hide { + display: none; + } +} + +/* Hide useless elements in print layouts... */ +@media print { + .ui-tabs-nav { + display: none; + } +} + +/* Skin */ +.ui-tabs-nav, .ui-tabs-panel { + font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; + font-size: 12px; +} +.ui-tabs-nav { + list-style: none; + margin: 0; + padding: 0 0 0 4px; +} +.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ + display: block; + clear: both; + content: " "; +} +.ui-tabs-nav li { + float: left; + margin: 0 0 0 1px; + min-width: 84px; /* be nice to Opera */ +} +.ui-tabs-nav a, .ui-tabs-nav a span { + display: block; + padding: 0 10px; + background: url(../img/tab.png) no-repeat; +} +.ui-tabs-nav a { + margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ + padding-left: 0; + color: #27537a; + font-weight: bold; + line-height: 1.2; + text-align: center; + text-decoration: none; + white-space: nowrap; /* required in IE 6 */ + outline: 0; /* prevent dotted border in Firefox */ +} +.ui-tabs-nav .ui-tabs-selected a { + position: relative; + top: 1px; + z-index: 2; + margin-top: 0; + color: #000; +} +.ui-tabs-nav a span { + width: 64px; /* IE 6 treats width as min-width */ + min-width: 64px; + height: 18px; /* IE 6 treats height as min-height */ + min-height: 18px; + padding-top: 6px; + padding-right: 0; +} +*>.ui-tabs-nav a span { /* hide from IE 6 */ + width: auto; + height: auto; +} +.ui-tabs-nav .ui-tabs-selected a span { + padding-bottom: 1px; +} +.ui-tabs-nav .ui-tabs-selected a, .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active { + background-position: 100% -150px; +} +.ui-tabs-nav a, .ui-tabs-nav .ui-tabs-disabled a:hover, .ui-tabs-nav .ui-tabs-disabled a:focus, .ui-tabs-nav .ui-tabs-disabled a:active { + background-position: 100% -100px; +} +.ui-tabs-nav .ui-tabs-selected a span, .ui-tabs-nav a:hover span, .ui-tabs-nav a:focus span, .ui-tabs-nav a:active span { + background-position: 0 -50px; +} +.ui-tabs-nav a span, .ui-tabs-nav .ui-tabs-disabled a:hover span, .ui-tabs-nav .ui-tabs-disabled a:focus span, .ui-tabs-nav .ui-tabs-disabled a:active span { + background-position: 0 0; +} +.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, .ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */ + cursor: text; +} +.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, +.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */ + cursor: pointer; +} +.ui-tabs-disabled { + opacity: .4; + filter: alpha(opacity=40); +} +.ui-tabs-panel { + border-top: 1px solid #97a5b0; + padding: 2px 4px 2px 4px; + background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */ + border: 1px solid #D0D0D0; + border-bottom: 1px solid #A0A0A0; + border-right: 1px solid #A0A0A0; +} +.ui-tabs-loading em { + padding: 0 0 0 20px; + background: url(loading.gif) no-repeat 0 50%; +} + +/* Additional IE specific bug fixes... */ +* html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ + display: inline-block; +} +*:first-child+html .ui-tabs-nav { /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ + display: inline-block; +} + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/all-wcprops b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/all-wcprops new file mode 100644 index 0000000..ddb4fc2 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 51 +/svnroot/simplehtmldom/!svn/ver/29/trunk/manual/img +END +tab.png +K 25 +svn:wc:ra_dav:version-url +V 59 +/svnroot/simplehtmldom/!svn/ver/29/trunk/manual/img/tab.png +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/entries b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/entries new file mode 100644 index 0000000..3d692dc --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +182 +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom/trunk/manual/img +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom + + + +2008-03-14T14:58:12.908404Z +29 +me578022 + + + + + + + + + + + + + + +d0e60b4b-9046-0410-940c-b97530268c78 + +tab.png +file + + + + +2010-08-17T19:13:53.595300Z +83a79d462146a7d0d1ea4dd969101885 +2008-03-14T14:58:12.908404Z +29 +me578022 +has-props + + + + + + + + + + + + + + + + + + + + +734 + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/prop-base/tab.png.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/prop-base/tab.png.svn-base new file mode 100644 index 0000000..5e9587e --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/prop-base/tab.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/text-base/tab.png.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/text-base/tab.png.svn-base new file mode 100644 index 0000000..3d5f156 Binary files /dev/null and b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/.svn/text-base/tab.png.svn-base differ diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/tab.png b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/tab.png new file mode 100644 index 0000000..3d5f156 Binary files /dev/null and b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/img/tab.png differ diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/all-wcprops b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/all-wcprops new file mode 100644 index 0000000..f1c7dcb --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 50 +/svnroot/simplehtmldom/!svn/ver/29/trunk/manual/js +END +jquery-1.2.3.pack.js +K 25 +svn:wc:ra_dav:version-url +V 71 +/svnroot/simplehtmldom/!svn/ver/29/trunk/manual/js/jquery-1.2.3.pack.js +END +ui.tabs.pack.js +K 25 +svn:wc:ra_dav:version-url +V 66 +/svnroot/simplehtmldom/!svn/ver/29/trunk/manual/js/ui.tabs.pack.js +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/entries b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/entries new file mode 100644 index 0000000..c174c37 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +182 +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom/trunk/manual/js +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom + + + +2008-03-14T14:58:12.908404Z +29 +me578022 + + + + + + + + + + + + + + +d0e60b4b-9046-0410-940c-b97530268c78 + +jquery-1.2.3.pack.js +file + + + + +2010-08-17T19:13:53.654303Z +fb49bb7a70d7be19cc6a145146ca7d44 +2008-03-14T14:58:12.908404Z +29 +me578022 + + + + + + + + + + + + + + + + + + + + + +29846 + +ui.tabs.pack.js +file + + + + +2010-08-17T19:13:53.655303Z +14b07b37095bc686e405e7d043fee344 +2008-03-14T14:58:12.908404Z +29 +me578022 + + + + + + + + + + + + + + + + + + + + + +6417 + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/text-base/jquery-1.2.3.pack.js.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/text-base/jquery-1.2.3.pack.js.svn-base new file mode 100644 index 0000000..74cdfee --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/text-base/jquery-1.2.3.pack.js.svn-base @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.3 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ + * $Rev: 4663 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>",""]||!f.1f("<9M")&&[1,"<73>",""]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>",""]||!f.1f("<4v")&&[2,"<1O><1U>",""]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>",""]||!f.1f("<7e")&&[2,"<1O><1U><6V>",""]||E.14.1d&&[1,"1x<1x>",""]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K im[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{})) \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/text-base/ui.tabs.pack.js.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/text-base/ui.tabs.pack.js.svn-base new file mode 100644 index 0000000..cfc226a --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/.svn/text-base/ui.tabs.pack.js.svn-base @@ -0,0 +1,10 @@ +/* + * Tabs 3 - New Wave Tabs + * + * Copyright (c) 2007 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.4=$.4||{};$.2o.3=6(){7 b=1K 1q[0]==\'1X\'&&1q[0];7 c=b&&1P.1N.2g.2c(1q,1)||1q;l b==\'C\'?$.m(2[0],\'4-3\').$3.C:2.I(6(){5(b){7 a=$.m(2,\'4-3\');a[b].2n(a,c)}D 2l $.4.3(2,c[0]||{})})};$.4.3=6(e,f){7 d=2;2.q=e;2.8=$.1H({p:0,S:f.p===L,12:\'1A\',t:[],G:L,1l:\'2Bx;\',K:y,1R:\'4-3-\',1j:{},X:L,1Q:\'<1h>#{1g}\',1v:\'<1L>\',1f:\'4-3-2f\',w:\'4-3-p\',1t:\'4-3-S\',Q:\'4-3-t\',U:\'4-3-1e\',M:\'4-3-Y\',1s:\'4-3-2Y\'},f);5(f.p===L)2.8.p=L;2.8.12+=\'.4-3\';2.8.G=$.G&&$.G.28==2V&&2.8.G;$(e).1b(\'2T.4-3\',6(b,c,a){5((/^p/).27(c))d.1o(a);D{d.8[c]=a;d.11()}}).1b(\'2Q.4-3\',6(a,b){l d.8[b]});$.m(e,\'4-3\',2);2.11(1a)};$.1H($.4.3.1N,{1z:6(a){l a.22&&a.22.V(/\\s/g,\'1Z\').V(/[^A-2A-2y-9\\-1Z:\\.]/g,\'\')||2.8.1R+$.m(a)},4:6(a,b){l{2w:2,8:2.8,2v:a,1e:b}},11:6(f){2.$u=$(\'E:2s(a[x])\',2.q);2.$3=2.$u.1i(6(){l $(\'a\',2)[0]});2.$k=$([]);7 e=2,o=2.8;2.$3.I(6(i,a){5(a.H&&a.H.V(\'#\',\'\'))e.$k=e.$k.17(a.H);D 5($(a).W(\'x\')!=\'#\'){$.m(a,\'x.4-3\',a.x);$.m(a,\'z.4-3\',a.x);7 b=e.1z(a);a.x=\'#\'+b;7 c=$(\'#\'+b);5(!c.C){c=$(o.1v).W(\'16\',b).v(o.U).2m(e.$k[i-1]||e.q);c.m(\'15.4-3\',1a)}e.$k=e.$k.17(c)}D o.t.1O(i+1)});5(f){$(2.q).J(o.1f)||$(2.q).v(o.1f);2.$k.I(6(){7 a=$(2);a.J(o.U)||a.v(o.U)});2.$3.I(6(i,a){5(1w.H){5(a.H==1w.H){o.p=i;5($.O.14||$.O.2k){7 b=$(1w.H),1M=b.W(\'16\');b.W(\'16\',\'\');1u(6(){b.W(\'16\',1M)},2j)}2i(0,0);l y}}D 5(o.G){7 c=2h($.G(\'4-3\'+$.m(e.q)),10);5(c&&e.$3[c]){o.p=c;l y}}D 5(e.$u.F(i).J(o.w)){o.p=i;l y}});2.$k.v(o.M);2.$u.B(o.w);5(!o.S){2.$k.F(o.p).N().B(o.M);2.$u.F(o.p).v(o.w)}7 h=!o.S&&$.m(2.$3[o.p],\'z.4-3\');5(h)2.z(o.p);o.t=$.2e(o.t.2d($.1i(2.$u.T(\'.\'+o.Q),6(n,i){l e.$u.Z(n)}))).1J();$(2b).1b(\'2a\',6(){e.$3.1d(\'.4-3\');e.$u=e.$3=e.$k=L})}29(7 i=0,E;E=2.$u[i];i++)$(E)[$.1I(i,o.t)!=-1&&!$(E).J(o.w)?\'v\':\'B\'](o.Q);5(o.K===y)2.$3.1r(\'K.4-3\');7 j,R,1c={\'2X-2W\':0,1G:1},1F=\'2U\';5(o.X&&o.X.28==1P)j=o.X[0]||1c,R=o.X[1]||1c;D j=R=o.X||1c;7 g={1p:\'\',2S:\'\',2R:\'\'};5(!$.O.14)g.1E=\'\';6 1D(b,c,a){c.26(j,j.1G||1F,6(){c.v(o.M).13(g);5($.O.14&&j.1E)c[0].24.T=\'\';5(a)1C(b,a,c)})}6 1C(b,a,c){5(R===1c)a.13(\'1p\',\'1B\');a.26(R,R.1G||1F,6(){a.B(o.M).13(g);5($.O.14&&R.1E)a[0].24.T=\'\';$(e.q).P(\'N.4-3\',[e.4(b,a[0])])})}6 23(c,a,d,b){a.v(o.w).2P().B(o.w);1D(c,d,b)}2.$3.1d(\'.4-3\').1b(o.12,6(){7 b=$(2).2O(\'E:F(0)\'),$Y=e.$k.T(\':2N\'),$N=$(2.H);5((b.J(o.w)&&!o.S)||b.J(o.Q)||$(e.q).P(\'1o.4-3\',[e.4(2,$N[0])])===y){2.1k();l y}e.8.p=e.$3.Z(2);5(o.S){5(b.J(o.w)){e.8.p=L;b.B(o.w);e.$k.1y();1D(2,$Y);2.1k();l y}D 5(!$Y.C){e.$k.1y();7 a=2;e.z(e.$3.Z(2),6(){b.v(o.w).v(o.1t);1C(a,$N)});2.1k();l y}}5(o.G)$.G(\'4-3\'+$.m(e.q),e.8.p,o.G);e.$k.1y();5($N.C){7 a=2;e.z(e.$3.Z(2),6(){23(a,b,$Y,$N)})}D 2M\'21 2K 2J: 2H 2G 2F.\';5($.O.14)2.1k();l y});5(!(/^1A/).27(o.12))2.$3.1b(\'1A.4-3\',6(){l y})},17:6(d,e,f){5(f==1Y)f=2.$3.C;7 o=2.8;7 a=$(o.1Q.V(/#\\{x\\}/,d).V(/#\\{1g\\}/,e));a.m(\'15.4-3\',1a);7 b=d.2D(\'#\')==0?d.V(\'#\',\'\'):2.1z($(\'a:2C-2z\',a)[0]);7 c=$(\'#\'+b);5(!c.C){c=$(o.1v).W(\'16\',b).v(o.U).v(o.M);c.m(\'15.4-3\',1a)}5(f>=2.$u.C){a.1W(2.q);c.1W(2.q.2E)}D{a.1V(2.$u[f]);c.1V(2.$k[f])}o.t=$.1i(o.t,6(n,i){l n>=f?++n:n});2.11();5(2.$3.C==1){a.v(o.w);c.B(o.M);7 g=$.m(2.$3[0],\'z.4-3\');5(g)2.z(f,g)}$(2.q).P(\'17.4-3\',[2.4(2.$3[f],2.$k[f])])},19:6(a){7 o=2.8,$E=2.$u.F(a).19(),$1e=2.$k.F(a).19();5($E.J(o.w)&&2.$3.C>1)2.1o(a+(a+1<2.$3.C?1:-1));o.t=$.1i($.1U(o.t,6(n,i){l n!=a}),6(n,i){l n>=a?--n:n});2.11();$(2.q).P(\'19.4-3\',[2.4($E.2I(\'a\')[0],$1e[0])])},25:6(a){7 o=2.8;5($.1I(a,o.t)==-1)l;7 b=2.$u.F(a).B(o.Q);5($.O.2u){b.13(\'1p\',\'2L-1B\');1u(6(){b.13(\'1p\',\'1B\')},0)}o.t=$.1U(o.t,6(n,i){l n!=a});$(2.q).P(\'25.4-3\',[2.4(2.$3[a],2.$k[a])])},20:6(a){7 b=2,o=2.8;5(a!=o.p){2.$u.F(a).v(o.Q);o.t.1O(a);o.t.1J();$(2.q).P(\'20.4-3\',[2.4(2.$3[a],2.$k[a])])}},1o:6(a){5(1K a==\'1X\')a=2.$3.Z(2.$3.T(\'[x$=\'+a+\']\')[0]);2.$3.F(a).2t(2.8.12)},z:6(d,b){7 e=2,o=2.8,$a=2.$3.F(d),a=$a[0],1T=b==1Y|| b===y,18=$a.m(\'z.4-3\');b=b|| 6(){};5(!18|| ($.m(a,\'K.4-3\')&&!1T)){b();l}5(o.1l){7 g=$(\'1h\',a),1g=g.1n();g.1n(\'<1S>\'+o.1l+\'\')}7 c=6(){e.$3.T(\'.\'+o.1s).I(6(){$(2).B(o.1s);5(o.1l)$(\'1h\',2).1n(1g)});e.1m=L};7 f=$.1H({},o.1j,{18:18,1x:6(r,s){$(a.H).1n(r);c();b();5(o.K)$.m(a,\'K.4-3\',1a);$(e.q).P(\'z.4-3\',[e.4(e.$3[d],e.$k[d])]);o.1j.1x&&o.1j.1x(r,s)}});5(2.1m){2.1m.2r();c()}$a.v(o.1s);1u(6(){e.1m=$.2q(f)},0)},18:6(a,b){2.$3.F(a).1r(\'K.4-3\').m(\'z.4-3\',b)},15:6(){7 o=2.8;$(2.q).1d(\'.4-3\').B(o.1f).1r(\'4-3\');2.$3.I(6(){7 b=$.m(2,\'x.4-3\');5(b)2.x=b;7 c=$(2).1d(\'.4-3\');$.I([\'x\',\'z\',\'K\'],6(i,a){c.1r(a+\'.4-3\')})});2.$u.17(2.$k).I(6(){5($.m(2,\'15.4-3\'))$(2).19();D $(2).B([o.w,o.1t,o.Q,o.U,o.M].2p(\' \'))})}})})(21);',62,185,'||this|tabs|ui|if|function|var|options||||||||||||panels|return|data|||selected|element|||disabled|lis|addClass|selectedClass|href|false|load||removeClass|length|else|li|eq|cookie|hash|each|hasClass|cache|null|hideClass|show|browser|triggerHandler|disabledClass|showFx|unselect|filter|panelClass|replace|attr|fx|hide|index||tabify|event|css|msie|destroy|id|add|url|remove|true|bind|baseFx|unbind|panel|navClass|label|span|map|ajaxOptions|blur|spinner|xhr|html|select|display|arguments|removeData|loadingClass|unselectClass|setTimeout|panelTemplate|location|success|stop|tabId|click|block|showTab|hideTab|opacity|baseDuration|duration|extend|inArray|sort|typeof|div|toShowId|prototype|push|Array|tabTemplate|idPrefix|em|bypassCache|grep|insertBefore|appendTo|string|undefined|_|disable|jQuery|title|switchTab|style|enable|animate|test|constructor|for|unload|window|call|concat|unique|nav|slice|parseInt|scrollTo|500|opera|new|insertAfter|apply|fn|join|ajax|abort|has|trigger|safari|tab|instance|8230|z0|child|Za|Loading|first|indexOf|parentNode|identifier|fragment|Mismatching|find|Tabs|UI|inline|throw|visible|parents|siblings|getData|height|overflow|setData|normal|Function|width|min|loading'.split('|'),0,{})) \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/jquery-1.2.3.pack.js b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/jquery-1.2.3.pack.js new file mode 100644 index 0000000..74cdfee --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/jquery-1.2.3.pack.js @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.3 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ + * $Rev: 4663 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>",""]||!f.1f("<9M")&&[1,"<73>",""]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>",""]||!f.1f("<4v")&&[2,"<1O><1U>",""]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>",""]||!f.1f("<7e")&&[2,"<1O><1U><6V>",""]||E.14.1d&&[1,"1x<1x>",""]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K im[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{})) \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/ui.tabs.pack.js b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/ui.tabs.pack.js new file mode 100644 index 0000000..cfc226a --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/js/ui.tabs.pack.js @@ -0,0 +1,10 @@ +/* + * Tabs 3 - New Wave Tabs + * + * Copyright (c) 2007 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.4=$.4||{};$.2o.3=6(){7 b=1K 1q[0]==\'1X\'&&1q[0];7 c=b&&1P.1N.2g.2c(1q,1)||1q;l b==\'C\'?$.m(2[0],\'4-3\').$3.C:2.I(6(){5(b){7 a=$.m(2,\'4-3\');a[b].2n(a,c)}D 2l $.4.3(2,c[0]||{})})};$.4.3=6(e,f){7 d=2;2.q=e;2.8=$.1H({p:0,S:f.p===L,12:\'1A\',t:[],G:L,1l:\'2Bx;\',K:y,1R:\'4-3-\',1j:{},X:L,1Q:\'<1h>#{1g}\',1v:\'<1L>\',1f:\'4-3-2f\',w:\'4-3-p\',1t:\'4-3-S\',Q:\'4-3-t\',U:\'4-3-1e\',M:\'4-3-Y\',1s:\'4-3-2Y\'},f);5(f.p===L)2.8.p=L;2.8.12+=\'.4-3\';2.8.G=$.G&&$.G.28==2V&&2.8.G;$(e).1b(\'2T.4-3\',6(b,c,a){5((/^p/).27(c))d.1o(a);D{d.8[c]=a;d.11()}}).1b(\'2Q.4-3\',6(a,b){l d.8[b]});$.m(e,\'4-3\',2);2.11(1a)};$.1H($.4.3.1N,{1z:6(a){l a.22&&a.22.V(/\\s/g,\'1Z\').V(/[^A-2A-2y-9\\-1Z:\\.]/g,\'\')||2.8.1R+$.m(a)},4:6(a,b){l{2w:2,8:2.8,2v:a,1e:b}},11:6(f){2.$u=$(\'E:2s(a[x])\',2.q);2.$3=2.$u.1i(6(){l $(\'a\',2)[0]});2.$k=$([]);7 e=2,o=2.8;2.$3.I(6(i,a){5(a.H&&a.H.V(\'#\',\'\'))e.$k=e.$k.17(a.H);D 5($(a).W(\'x\')!=\'#\'){$.m(a,\'x.4-3\',a.x);$.m(a,\'z.4-3\',a.x);7 b=e.1z(a);a.x=\'#\'+b;7 c=$(\'#\'+b);5(!c.C){c=$(o.1v).W(\'16\',b).v(o.U).2m(e.$k[i-1]||e.q);c.m(\'15.4-3\',1a)}e.$k=e.$k.17(c)}D o.t.1O(i+1)});5(f){$(2.q).J(o.1f)||$(2.q).v(o.1f);2.$k.I(6(){7 a=$(2);a.J(o.U)||a.v(o.U)});2.$3.I(6(i,a){5(1w.H){5(a.H==1w.H){o.p=i;5($.O.14||$.O.2k){7 b=$(1w.H),1M=b.W(\'16\');b.W(\'16\',\'\');1u(6(){b.W(\'16\',1M)},2j)}2i(0,0);l y}}D 5(o.G){7 c=2h($.G(\'4-3\'+$.m(e.q)),10);5(c&&e.$3[c]){o.p=c;l y}}D 5(e.$u.F(i).J(o.w)){o.p=i;l y}});2.$k.v(o.M);2.$u.B(o.w);5(!o.S){2.$k.F(o.p).N().B(o.M);2.$u.F(o.p).v(o.w)}7 h=!o.S&&$.m(2.$3[o.p],\'z.4-3\');5(h)2.z(o.p);o.t=$.2e(o.t.2d($.1i(2.$u.T(\'.\'+o.Q),6(n,i){l e.$u.Z(n)}))).1J();$(2b).1b(\'2a\',6(){e.$3.1d(\'.4-3\');e.$u=e.$3=e.$k=L})}29(7 i=0,E;E=2.$u[i];i++)$(E)[$.1I(i,o.t)!=-1&&!$(E).J(o.w)?\'v\':\'B\'](o.Q);5(o.K===y)2.$3.1r(\'K.4-3\');7 j,R,1c={\'2X-2W\':0,1G:1},1F=\'2U\';5(o.X&&o.X.28==1P)j=o.X[0]||1c,R=o.X[1]||1c;D j=R=o.X||1c;7 g={1p:\'\',2S:\'\',2R:\'\'};5(!$.O.14)g.1E=\'\';6 1D(b,c,a){c.26(j,j.1G||1F,6(){c.v(o.M).13(g);5($.O.14&&j.1E)c[0].24.T=\'\';5(a)1C(b,a,c)})}6 1C(b,a,c){5(R===1c)a.13(\'1p\',\'1B\');a.26(R,R.1G||1F,6(){a.B(o.M).13(g);5($.O.14&&R.1E)a[0].24.T=\'\';$(e.q).P(\'N.4-3\',[e.4(b,a[0])])})}6 23(c,a,d,b){a.v(o.w).2P().B(o.w);1D(c,d,b)}2.$3.1d(\'.4-3\').1b(o.12,6(){7 b=$(2).2O(\'E:F(0)\'),$Y=e.$k.T(\':2N\'),$N=$(2.H);5((b.J(o.w)&&!o.S)||b.J(o.Q)||$(e.q).P(\'1o.4-3\',[e.4(2,$N[0])])===y){2.1k();l y}e.8.p=e.$3.Z(2);5(o.S){5(b.J(o.w)){e.8.p=L;b.B(o.w);e.$k.1y();1D(2,$Y);2.1k();l y}D 5(!$Y.C){e.$k.1y();7 a=2;e.z(e.$3.Z(2),6(){b.v(o.w).v(o.1t);1C(a,$N)});2.1k();l y}}5(o.G)$.G(\'4-3\'+$.m(e.q),e.8.p,o.G);e.$k.1y();5($N.C){7 a=2;e.z(e.$3.Z(2),6(){23(a,b,$Y,$N)})}D 2M\'21 2K 2J: 2H 2G 2F.\';5($.O.14)2.1k();l y});5(!(/^1A/).27(o.12))2.$3.1b(\'1A.4-3\',6(){l y})},17:6(d,e,f){5(f==1Y)f=2.$3.C;7 o=2.8;7 a=$(o.1Q.V(/#\\{x\\}/,d).V(/#\\{1g\\}/,e));a.m(\'15.4-3\',1a);7 b=d.2D(\'#\')==0?d.V(\'#\',\'\'):2.1z($(\'a:2C-2z\',a)[0]);7 c=$(\'#\'+b);5(!c.C){c=$(o.1v).W(\'16\',b).v(o.U).v(o.M);c.m(\'15.4-3\',1a)}5(f>=2.$u.C){a.1W(2.q);c.1W(2.q.2E)}D{a.1V(2.$u[f]);c.1V(2.$k[f])}o.t=$.1i(o.t,6(n,i){l n>=f?++n:n});2.11();5(2.$3.C==1){a.v(o.w);c.B(o.M);7 g=$.m(2.$3[0],\'z.4-3\');5(g)2.z(f,g)}$(2.q).P(\'17.4-3\',[2.4(2.$3[f],2.$k[f])])},19:6(a){7 o=2.8,$E=2.$u.F(a).19(),$1e=2.$k.F(a).19();5($E.J(o.w)&&2.$3.C>1)2.1o(a+(a+1<2.$3.C?1:-1));o.t=$.1i($.1U(o.t,6(n,i){l n!=a}),6(n,i){l n>=a?--n:n});2.11();$(2.q).P(\'19.4-3\',[2.4($E.2I(\'a\')[0],$1e[0])])},25:6(a){7 o=2.8;5($.1I(a,o.t)==-1)l;7 b=2.$u.F(a).B(o.Q);5($.O.2u){b.13(\'1p\',\'2L-1B\');1u(6(){b.13(\'1p\',\'1B\')},0)}o.t=$.1U(o.t,6(n,i){l n!=a});$(2.q).P(\'25.4-3\',[2.4(2.$3[a],2.$k[a])])},20:6(a){7 b=2,o=2.8;5(a!=o.p){2.$u.F(a).v(o.Q);o.t.1O(a);o.t.1J();$(2.q).P(\'20.4-3\',[2.4(2.$3[a],2.$k[a])])}},1o:6(a){5(1K a==\'1X\')a=2.$3.Z(2.$3.T(\'[x$=\'+a+\']\')[0]);2.$3.F(a).2t(2.8.12)},z:6(d,b){7 e=2,o=2.8,$a=2.$3.F(d),a=$a[0],1T=b==1Y|| b===y,18=$a.m(\'z.4-3\');b=b|| 6(){};5(!18|| ($.m(a,\'K.4-3\')&&!1T)){b();l}5(o.1l){7 g=$(\'1h\',a),1g=g.1n();g.1n(\'<1S>\'+o.1l+\'\')}7 c=6(){e.$3.T(\'.\'+o.1s).I(6(){$(2).B(o.1s);5(o.1l)$(\'1h\',2).1n(1g)});e.1m=L};7 f=$.1H({},o.1j,{18:18,1x:6(r,s){$(a.H).1n(r);c();b();5(o.K)$.m(a,\'K.4-3\',1a);$(e.q).P(\'z.4-3\',[e.4(e.$3[d],e.$k[d])]);o.1j.1x&&o.1j.1x(r,s)}});5(2.1m){2.1m.2r();c()}$a.v(o.1s);1u(6(){e.1m=$.2q(f)},0)},18:6(a,b){2.$3.F(a).1r(\'K.4-3\').m(\'z.4-3\',b)},15:6(){7 o=2.8;$(2.q).1d(\'.4-3\').B(o.1f).1r(\'4-3\');2.$3.I(6(){7 b=$.m(2,\'x.4-3\');5(b)2.x=b;7 c=$(2).1d(\'.4-3\');$.I([\'x\',\'z\',\'K\'],6(i,a){c.1r(a+\'.4-3\')})});2.$u.17(2.$k).I(6(){5($.m(2,\'15.4-3\'))$(2).19();D $(2).B([o.w,o.1t,o.Q,o.U,o.M].2p(\' \'))})}})})(21);',62,185,'||this|tabs|ui|if|function|var|options||||||||||||panels|return|data|||selected|element|||disabled|lis|addClass|selectedClass|href|false|load||removeClass|length|else|li|eq|cookie|hash|each|hasClass|cache|null|hideClass|show|browser|triggerHandler|disabledClass|showFx|unselect|filter|panelClass|replace|attr|fx|hide|index||tabify|event|css|msie|destroy|id|add|url|remove|true|bind|baseFx|unbind|panel|navClass|label|span|map|ajaxOptions|blur|spinner|xhr|html|select|display|arguments|removeData|loadingClass|unselectClass|setTimeout|panelTemplate|location|success|stop|tabId|click|block|showTab|hideTab|opacity|baseDuration|duration|extend|inArray|sort|typeof|div|toShowId|prototype|push|Array|tabTemplate|idPrefix|em|bypassCache|grep|insertBefore|appendTo|string|undefined|_|disable|jQuery|title|switchTab|style|enable|animate|test|constructor|for|unload|window|call|concat|unique|nav|slice|parseInt|scrollTo|500|opera|new|insertAfter|apply|fn|join|ajax|abort|has|trigger|safari|tab|instance|8230|z0|child|Za|Loading|first|indexOf|parentNode|identifier|fragment|Mismatching|find|Tabs|UI|inline|throw|visible|parents|siblings|getData|height|overflow|setData|normal|Function|width|min|loading'.split('|'),0,{})) \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual.htm b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual.htm new file mode 100644 index 0000000..ed796e3 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual.htm @@ -0,0 +1,448 @@ + + + + +PHP Simple HTML DOM Parser: Manual + + + + + + + +

PHP Simple HTML DOM Parser Manual

+
+

Index

+ + + +

Quick Start

+ Top +
+ +
+
+ // Create DOM from URL or file
+ $html = file_get_html('http://www.google.com/');
+
+ // Find all images
+ foreach($html->find('img') as $element)
+       echo $element->src . '<br>';
+
+// Find all links
+foreach($html->find('a') as $element)
+       echo $element->href . '<br>';
+
+
+
+ // Create DOM from string
+ $html = str_get_html('<div id="hello">Hello</div><div id="world">World</div>');
+
+
+ +$html->find('div', 1)->class = 'bar';
+
+$html->find('div[id=hello]', 0)->innertext = 'foo';
+
+ echo $html; // Output: <div id="hello">foo</div><div id="world" class="bar">World</div>
+
+
+

+ // Dump contents (without tags) from HTML
+ echo file_get_html('http://www.google.com/')->plaintext; +
+
+
+
+
+
+ // Create DOM from URL
+ $html = file_get_html('http://slashdot.org/');
+
+ // Find all article blocks
+ foreach($html->find('div.article') as $article) {
+    $item['title']     = $article->find('div.title', 0)->plaintext;
+    $item['intro']    = $article->find('div.intro', 0)->plaintext;
+    $item['details'] = $article->find('div.details', 0)->plaintext;
+    $articles[] = $item;
+ }
+
+ print_r($articles); +
+
+
+ + +

How to create HTML DOM object?

+ Top +
+ +
+
// Create a DOM object from a string
+ $html = str_get_html('<html><body>Hello!</body></html>');
+
+ // Create a DOM object from a URL
+ $html = file_get_html('http://www.google.com/');
+
+ // Create a DOM object from a HTML file
+ $html = file_get_html('test.htm');
+
+
+
+
// Create a DOM object
+ $html = new simple_html_dom();
+
+ // Load HTML from a string
+ $html->load('<html><body>Hello!</body></html>');
+
+ // Load HTML from a URL
+ $html->load_file('http://www.google.com/');
+
+ // Load HTML from a HTML file
+ $html->load_file('test.htm');
+
+
+ +

How to find HTML elements?

+ Top +
+ +
+
// Find all anchors, returns a array of element objects
+ $ret = $html->find('a');
+
+ // Find (N)th anchor, returns element object or null if not found (zero based)
+ $ret = $html->find('a', 0);
+
+ // Find lastest anchor, returns element object or null if not found (zero based)
+$ret = $html->find('a', -1);
+
+ // Find all <div> with the id attribute
+$ret = $html->find('div[id]');
+
+ // Find all <div> which attribute id=foo
+$ret = $html->find('div[id=foo]');
+
+
+
+
// Find all element which id=foo
+ $ret = $html->find('#foo');
+
+ // Find all element which class=foo
+ $ret = $html->find('.foo');
+
+ // Find all element has attribute id
+$ret = $html->find('*[id]');
+
+ // Find all anchors and images
+$ret = $html->find('a, img');
+
+ // Find all anchors and images with the "title" attribute
+ $ret = $html->find('a[title], img[title]');
+
+
+
+
+ Supports these operators in attribute selectors:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FilterDescription
[attribute]Matches elements that have the specified attribute.
[!attribute]Matches elements that don't have the specified attribute.
[attribute=value]Matches elements that have the specified attribute with a certain value.
[attribute!=value]Matches elements that don't have the specified attribute with a certain value.
[attribute^=value]Matches elements that have the specified attribute and it starts with a certain value.
[attribute$=value]Matches elements that have the specified attribute and it ends with a certain value.
[attribute*=value]Matches elements that have the specified attribute and it contains a certain value.
+
+
+
+
// Find all <li> in <ul>
+ $es = $html->find('ul li');
+
+ // Find Nested <div> tags
+ $es = $html->find('div div div');
+
+ // Find all <td> in <table> which class=hello
+ $es = $html->find('table.hello td');
+
+ // Find all td tags with attribite align=center in table tags
+ $es = $html->find(''table td[align=center]');
+
+
+
+
// Find all text blocks
+ $es = $html->find('text');
+
+ // Find all comment (<!--...-->) blocks
+ $es = $html->find('comment');
+
+
+
+
// Find all <li> in <ul>
+ foreach($html->find('ul') as $ul)
+ {
+       foreach($ul->find('li') as $li)
+       {
+             // do something...
+       }
+ }
+
+ // Find first <li> in first <ul>
+ $e = $html->find('ul', 0)->find('li', 0);
+
+
+
+ +

How to access the HTML element's attributes?

+ Top +
+ +
+
+ // Get a attribute ( If the attribute is non-value attribute (eg. checked, selected...), it will returns true or false)
+ $value = $e->href;
+
+ // Set a attribute(If the attribute is non-value attribute (eg. checked, selected...), set it's value as true or false)
+ $e->href = 'my link';
+
+ // Remove a attribute, set it's value as null!
+ $e->href = null;
+
+ // Determine whether a attribute exist?
+if(isset($e->href))
+        echo 'href exist!';
+
+
+
+
// Example
+ $html = str_get_html("<div>foo <b>bar</b></div>");
+ $e = $html->find("div", 0);
+
+ echo $e->tag; // Returns: " div"
+ echo $e->outertext; // Returns: " <div>foo <b>bar</b></div>"
+ echo $e->innertext; // Returns: " foo <b>bar</b>"
+ echo $e->plaintext; // Returns: " foo bar"
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Attribute NameUsage
$e->tagRead or write the tag name of element.
$e->outertextRead or write the outer HTML text of element.
$e->innertextRead or write the inner HTML text of element.
$e->plaintextRead or write the plain text of element.
+
+
+
+
// Extract contents from HTML
+echo $html->plaintext;
+
+ + // Wrap a element
+ $e->outertext = '<div class="wrap">' . $e->outertext . '<div>';
+
+ // Remove a element, set it's outertext as an empty string
+ $e->outertext = '';
+
+ // Append a element
+$e->outertext = $e->outertext . '<div>foo<div>';
+
+// Insert a element
+$e->outertext = '<div>foo<div>' . $e->outertext;
+
+
+
+ +

How to traverse the DOM tree?

+ Top +
+ +
+
// If you are not so familiar with HTML DOM, check this link to learn more...
+
+ // Example
+ echo $html->find("#div1", 0)->children(1)->children(1)->children(2)->id;
+ // or
+ echo $html->getElementById("div1")->childNodes(1)->childNodes(1)->childNodes(2)->getAttribute('id');
+
+
+
You can also call methods with Camel naming convertions.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Description
+
mixed
$e->children ( [int $index] )
Returns the Nth child object if index is set, otherwise return an array of children.
+
element
$e->parent ()
Returns the parent of element.
+
element
$e->first_child ()
Returns the first child of element, or null if not found.
+
element
$e->last_child ()
Returns the last child of element, or null if not found.
+
element
$e->next_sibling ()
Returns the next sibling of element, or null if not found.
+
element
$e->prev_sibling ()
Returns the previous sibling of element, or null if not found.
+
+
+ +
+ +

How to dump contents of DOM object?

+ Top +
+ +
+
// Dumps the internal DOM tree back into string
+ $str = $html->save();
+
+ // Dumps the internal DOM tree back into a file
+ $html->save('result.htm');
+
+
+
// Dumps the internal DOM tree back into string
+ $str = $html;
+
+ // Print it!
+ echo $html;
+
+
+
+ +

How to customize the parsing behavior?

+ Top +
+ +
+
// Write a function with parameter "$element"
+ function my_callback($element) {
+         // Hide all <b> tags
+        if ($element->tag=='b')
+                 $element->outertext = '';
+ }
+
+ // Register the callback function with it's function name
+ $html->set_callback('my_callback');
+
+ // Callback function will be invoked while dumping
+ echo $html; +
+
+
+ +

+ Author: S.C. Chen (me578022@gmail.com)
+Original idea is from Jose Solorzano's HTML Parser for PHP 4.
+Contributions by: Contributions by: Yousuke Kumakura, Vadim Voituk, Antcs
+
+
+ + + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual_api.htm b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual_api.htm new file mode 100644 index 0000000..365870f --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual_api.htm @@ -0,0 +1,320 @@ + + + + +PHP Simple HTML DOM Parser: API Reference + + + +

PHP Simple HTML DOM Parser Manual

+
+

Index

+ + +

API Reference

+ Top +
Helper functions + + + + + + + + + + + + + +
NameDescription
object str_get_html ( string $content )Creates a DOM object from a string.
object file_get_html ( string $filename )Creates a DOM object from a file or a URL.
+
+ DOM methods & properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name Description
+
void
+ __construct ( [string $filename] )
Constructor, set the filename parameter will automatically load the contents, either text or file/url.
+
string
+ plaintext
Returns the contents extracted from HTML.
+
void
+ clear ()
Clean up memory.
+
void
+ load ( string $content )
Load contents from a string.
+
string
+ save ( [string $filename] )
Dumps the internal DOM tree back into a string. If the $filename is set, result string will save to file.
+
void
+ load_file ( string $filename )
Load contents from a from a file or a URL.
+
void
+ set_callback ( string $function_name )
Set a callback function.
+
mixed
+ find ( string $selector [, int $index] )
Find elements by the CSS selector. Returns the Nth element object if index is set, otherwise return an array of object.
+
+ Element methods & properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+
string
+ [attribute]
Read or write element's attribure value.
+
string
+ tag
Read or write the tag name of element.
+
string
+ outertext
Read or write the outer HTML text of element.
+
string
+ innertext
Read or write the inner HTML text of element.
+
string
+ plaintext
Read or write the plain text of element.
+
mixed
+ find ( string $selector [, int $index] )
Find children by the CSS selector. Returns the Nth element object if index is set, otherwise, return an array of object.
+
+ DOM
traversing
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+
mixed
+ $e->children ( [int $index] )
Returns the Nth child object if index is set, otherwise return an array of children.
+
element
+ $e->parent ()
Returns the parent of element.
+
element
+ $e->first_child ()
Returns the first child of element, or null if not found.
+
element
+ $e->last_child ()
Returns the last child of element, or null if not found.
+
element
+ $e->next_sibling ()
Returns the next sibling of element, or null if not found.
+
element
+ $e->prev_sibling ()
Returns the previous sibling of element, or null if not found.
+
+ +

Camel naming convertions

+ Top +
You can also call methods with W3C STANDARD camel naming convertions.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodMapping
+
array
+ $e->getAllAttributes ()
+
array
+ $e->attr
+
string
+ $e->getAttribute ( $name )
+
string
+ $e->attribute
+
void
+ $e->setAttribute ( $name, $value )
+
void
+ $value = $e->attribute
+
bool
+ $e->hasAttribute ( $name )
+
bool
+ isset($e->attribute)
+
void
+ $e->removeAttribute ( $name )
+
void
+ $e->attribute = null
+
element
+ $e->getElementById ( $id )
+
mixed
+ $e->find ( "#$id", 0 )
+
mixed
+ $e->getElementsById ( $id [,$index] )
+
mixed
+ $e->find ( "#$id" [, int $index] )
+
element
+ $e->getElementByTagName ($name )
+
mixed
+ $e->find ( $name, 0 )
+
mixed
+ $e->getElementsByTagName ( $name [, $index] )
+
mixed
+ $e->find ( $name [, int $index] )
+
element
+ $e->parentNode ()
+
element
+ $e->parent ()
+
mixed
+ $e->childNodes ( [$index] )
+
mixed
+ $e->children ( [int $index] )
+
element
+ $e->firstChild ()
+
element
+ $e->first_child ()
+
element
+ $e->lastChild ()
+
element
+ $e->last_child ()
+
element
+ $e->nextSibling ()
+
element
+ $e->next_sibling ()
+
element
+ $e->previousSibling ()
+
element
+ $e->prev_sibling ()
+
+

+ Author: S.C. Chen (me578022@gmail.com)
+Original idea is from Jose Solorzano's HTML Parser for PHP 4.
+Contributions by: Contributions by: Yousuke Kumakura, Vadim Voituk, Antcs
+
+
+ + + \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual_faq.htm b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual_faq.htm new file mode 100644 index 0000000..3763eaa --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/manual/manual_faq.htm @@ -0,0 +1,91 @@ + + + + +PHP Simple HTML DOM Parser: FAQ + + + +

PHP Simple HTML DOM Parser Manual

+
+

FAQ

+ +
+ +

Problem with finding

+ Top +
Q: Element not found in such case:
+ $html->find('div[style=padding: 0px 2px;] span[class=rf]');
+
+ A: If there is blank in selectors, quote it!  
+ $html->find('div[style="padding: 0px 2px;"] span[class=rf]');
+ +

Problem with hosting

+ Top +
Q: On my local server everything works fine, but when I put it on my esternal server it doesn't work. 
+
+ A: The "file_get_dom" function is a wrapper of "file_get_contents" function,  you must set "allow_url_fopen" as TRUE in "php.ini" to allow accessing files via HTTP or FTP. However, some hosting venders disabled PHP's "allow_url_fopen" flag for security issues... PHP provides excellent support for "curl" library to do the same job, Use curl to get the page, then call "str_get_dom" to create DOM object. 
+
+ Example: 
+  
+ $curl = curl_init(); 
+ curl_setopt($curl, CURLOPT_URL, 'http://????????');  
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);  
+ curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);  
+ $str = curl_exec($curl);  
+ curl_close($curl);  
+  
+ $html= str_get_html($str); 
+ ... 
+ +
+

Behind a proxy

+ Top +
Q: My server is behind a Proxy and i can't use file_get_contents b/c it returns a unauthorized error.
+
+ A: Thanks for Shaggy to provide the solution: 
+  
+ // Define a context for HTTP. 
+ $context = array
+ ( 
+       'http' => array
+       ( 
+              'proxy' => 'addresseproxy:portproxy', // This needs to be the server and the port of the NTLM Authentication Proxy Server. 
+              'request_fulluri' => true, 
+       ), 
+ ); 
+
+ $context = stream_context_create($context); 
+  
+ $html= file_get_html('http://www.php.net', false, $context); 
+ ...
+
+
+ +

Memory leak!

+ Top +
Q: This script is leaking memory seriously... After it finished running, it's not cleaning up dom object properly from memory.. 
+
+ A: Due to php5 circular references memory leak, after creating DOM object, you must call $dom->clear() to free memory if call file_get_dom() more then once. 
+
+ Example: 
+
+ $html = file_get_html(...); 
+ // do something... 
+ $html->clear(); 
+ unset($html);
+
+ Author: S.C. Chen (me578022@gmail.com)
+Original idea is from Jose Solorzano's HTML Parser for PHP 4.
+Contributions by: Yousuke Kumakura, Vadim Voituk, Antcs
+
+
+ + + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php new file mode 100644 index 0000000..9a7b2f6 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php @@ -0,0 +1,1721 @@ +size is the "real" number of bytes the dom was created from. + * but for most purposes, it's a really good estimation. + * Paperg - Added the forceTagsClosed to the dom constructor. Forcing tags closed is great for malformed html, but it CAN lead to parsing errors. + * Allow the user to tell us how much they trust the html. + * Paperg add the text and plaintext to the selectors for the find syntax. plaintext implies text in the innertext of a node. text implies that the tag is a text node. + * This allows for us to find tags based on the text they contain. + * Create find_ancestor_tag to see if a tag is - at any level - inside of another specific tag. + * Paperg: added parse_charset so that we know about the character set of the source document. + * NOTE: If the user's system has a routine called get_last_retrieve_url_contents_content_type availalbe, we will assume it's returning the content-type header from the + * last transfer or curl_exec, and we will parse that and use it in preference to any other method of charset detection. + * + * Found infinite loop in the case of broken html in restore_noise. Rewrote to protect from that. + * PaperG (John Schlick) Added get_display_size for "IMG" tags. + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @author S.C. Chen + * @author John Schlick + * @author Rus Carroll + * @version 1.5 ($Rev: 196 $) + * @package PlaceLocalInclude + * @subpackage simple_html_dom + */ + +/** + * All of the Defines for the classes below. + * @author S.C. Chen + */ +define('HDOM_TYPE_ELEMENT', 1); +define('HDOM_TYPE_COMMENT', 2); +define('HDOM_TYPE_TEXT', 3); +define('HDOM_TYPE_ENDTAG', 4); +define('HDOM_TYPE_ROOT', 5); +define('HDOM_TYPE_UNKNOWN', 6); +define('HDOM_QUOTE_DOUBLE', 0); +define('HDOM_QUOTE_SINGLE', 1); +define('HDOM_QUOTE_NO', 3); +define('HDOM_INFO_BEGIN', 0); +define('HDOM_INFO_END', 1); +define('HDOM_INFO_QUOTE', 2); +define('HDOM_INFO_SPACE', 3); +define('HDOM_INFO_TEXT', 4); +define('HDOM_INFO_INNER', 5); +define('HDOM_INFO_OUTER', 6); +define('HDOM_INFO_ENDSPACE',7); +define('DEFAULT_TARGET_CHARSET', 'UTF-8'); +define('DEFAULT_BR_TEXT', "\r\n"); +define('DEFAULT_SPAN_TEXT', " "); +define('MAX_FILE_SIZE', 600000); +// helper functions +// ----------------------------------------------------------------------------- +// get html dom from file +// $maxlen is defined in the code as PHP_STREAM_COPY_ALL which is defined as -1. +function file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) +{ + // We DO force the tags to be terminated. + $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); + // For sourceforge users: uncomment the next line and comment the retreive_url_contents line 2 lines down if it is not already done. + $contents = file_get_contents($url, $use_include_path, $context, $offset); + // Paperg - use our own mechanism for getting the contents as we want to control the timeout. + //$contents = retrieve_url_contents($url); + if (empty($contents) || strlen($contents) > MAX_FILE_SIZE) + { + return false; + } + // The second parameter can force the selectors to all be lowercase. + $dom->load($contents, $lowercase, $stripRN); + return $dom; +} + +// get html dom from string +function str_get_html($str, $lowercase=true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) +{ + $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); + if (empty($str) || strlen($str) > MAX_FILE_SIZE) + { + $dom->clear(); + return false; + } + $dom->load($str, $lowercase, $stripRN); + return $dom; +} + +// dump html dom tree +function dump_html_tree($node, $show_attr=true, $deep=0) +{ + $node->dump($node); +} + + +/** + * simple html dom node + * PaperG - added ability for "find" routine to lowercase the value of the selector. + * PaperG - added $tag_start to track the start position of the tag in the total byte index + * + * @package PlaceLocalInclude + */ +class simple_html_dom_node +{ + public $nodetype = HDOM_TYPE_TEXT; + public $tag = 'text'; + public $attr = array(); + public $children = array(); + public $nodes = array(); + public $parent = null; + // The "info" array - see HDOM_INFO_... for what each element contains. + public $_ = array(); + public $tag_start = 0; + private $dom = null; + + function __construct($dom) + { + $this->dom = $dom; + $dom->nodes[] = $this; + } + + function __destruct() + { + $this->clear(); + } + + function __toString() + { + return $this->outertext(); + } + + // clean up memory due to php5 circular references memory leak... + function clear() + { + $this->dom = null; + $this->nodes = null; + $this->parent = null; + $this->children = null; + } + + // dump node's tree + function dump($show_attr=true, $deep=0) + { + $lead = str_repeat(' ', $deep); + + echo $lead.$this->tag; + if ($show_attr && count($this->attr)>0) + { + echo '('; + foreach ($this->attr as $k=>$v) + echo "[$k]=>\"".$this->$k.'", '; + echo ')'; + } + echo "\n"; + + if ($this->nodes) + { + foreach ($this->nodes as $c) + { + $c->dump($show_attr, $deep+1); + } + } + } + + + // Debugging function to dump a single dom node with a bunch of information about it. + function dump_node($echo=true) + { + + $string = $this->tag; + if (count($this->attr)>0) + { + $string .= '('; + foreach ($this->attr as $k=>$v) + { + $string .= "[$k]=>\"".$this->$k.'", '; + } + $string .= ')'; + } + if (count($this->_)>0) + { + $string .= ' $_ ('; + foreach ($this->_ as $k=>$v) + { + if (is_array($v)) + { + $string .= "[$k]=>("; + foreach ($v as $k2=>$v2) + { + $string .= "[$k2]=>\"".$v2.'", '; + } + $string .= ")"; + } else { + $string .= "[$k]=>\"".$v.'", '; + } + } + $string .= ")"; + } + + if (isset($this->text)) + { + $string .= " text: (" . $this->text . ")"; + } + + $string .= " HDOM_INNER_INFO: '"; + if (isset($node->_[HDOM_INFO_INNER])) + { + $string .= $node->_[HDOM_INFO_INNER] . "'"; + } + else + { + $string .= ' NULL '; + } + + $string .= " children: " . count($this->children); + $string .= " nodes: " . count($this->nodes); + $string .= " tag_start: " . $this->tag_start; + $string .= "\n"; + + if ($echo) + { + echo $string; + return; + } + else + { + return $string; + } + } + + // returns the parent of node + // If a node is passed in, it will reset the parent of the current node to that one. + function parent($parent=null) + { + // I am SURE that this doesn't work properly. + // It fails to unset the current node from it's current parents nodes or children list first. + if ($parent !== null) + { + $this->parent = $parent; + $this->parent->nodes[] = $this; + $this->parent->children[] = $this; + } + + return $this->parent; + } + + // verify that node has children + function has_child() + { + return !empty($this->children); + } + + // returns children of node + function children($idx=-1) + { + if ($idx===-1) + { + return $this->children; + } + if (isset($this->children[$idx])) return $this->children[$idx]; + return null; + } + + // returns the first child of node + function first_child() + { + if (count($this->children)>0) + { + return $this->children[0]; + } + return null; + } + + // returns the last child of node + function last_child() + { + if (($count=count($this->children))>0) + { + return $this->children[$count-1]; + } + return null; + } + + // returns the next sibling of node + function next_sibling() + { + if ($this->parent===null) + { + return null; + } + + $idx = 0; + $count = count($this->parent->children); + while ($idx<$count && $this!==$this->parent->children[$idx]) + { + ++$idx; + } + if (++$idx>=$count) + { + return null; + } + return $this->parent->children[$idx]; + } + + // returns the previous sibling of node + function prev_sibling() + { + if ($this->parent===null) return null; + $idx = 0; + $count = count($this->parent->children); + while ($idx<$count && $this!==$this->parent->children[$idx]) + ++$idx; + if (--$idx<0) return null; + return $this->parent->children[$idx]; + } + + // function to locate a specific ancestor tag in the path to the root. + function find_ancestor_tag($tag) + { + global $debugObject; + if (is_object($debugObject)) { $debugObject->debugLogEntry(1); } + + // Start by including ourselves in the comparison. + $returnDom = $this; + + while (!is_null($returnDom)) + { + if (is_object($debugObject)) { $debugObject->debugLog(2, "Current tag is: " . $returnDom->tag); } + + if ($returnDom->tag == $tag) + { + break; + } + $returnDom = $returnDom->parent; + } + return $returnDom; + } + + // get dom node's inner html + function innertext() + { + if (isset($this->_[HDOM_INFO_INNER])) return $this->_[HDOM_INFO_INNER]; + if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + + $ret = ''; + foreach ($this->nodes as $n) + $ret .= $n->outertext(); + return $ret; + } + + // get dom node's outer text (with tag) + function outertext() + { + global $debugObject; + if (is_object($debugObject)) + { + $text = ''; + if ($this->tag == 'text') + { + if (!empty($this->text)) + { + $text = " with text: " . $this->text; + } + } + $debugObject->debugLog(1, 'Innertext of tag: ' . $this->tag . $text); + } + + if ($this->tag==='root') return $this->innertext(); + + // trigger callback + if ($this->dom && $this->dom->callback!==null) + { + call_user_func_array($this->dom->callback, array($this)); + } + + if (isset($this->_[HDOM_INFO_OUTER])) return $this->_[HDOM_INFO_OUTER]; + if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + + // render begin tag + if ($this->dom && $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]) + { + $ret = $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]->makeup(); + } else { + $ret = ""; + } + + // render inner text + if (isset($this->_[HDOM_INFO_INNER])) + { + // If it's a br tag... don't return the HDOM_INNER_INFO that we may or may not have added. + if ($this->tag != "br") + { + $ret .= $this->_[HDOM_INFO_INNER]; + } + } else { + if ($this->nodes) + { + foreach ($this->nodes as $n) + { + $ret .= $this->convert_text($n->outertext()); + } + } + } + + // render end tag + if (isset($this->_[HDOM_INFO_END]) && $this->_[HDOM_INFO_END]!=0) + $ret .= 'tag.'>'; + return $ret; + } + + // get dom node's plain text + function text() + { + if (isset($this->_[HDOM_INFO_INNER])) return $this->_[HDOM_INFO_INNER]; + switch ($this->nodetype) + { + case HDOM_TYPE_TEXT: return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + case HDOM_TYPE_COMMENT: return ''; + case HDOM_TYPE_UNKNOWN: return ''; + } + if (strcasecmp($this->tag, 'script')===0) return ''; + if (strcasecmp($this->tag, 'style')===0) return ''; + + $ret = ''; + // In rare cases, (always node type 1 or HDOM_TYPE_ELEMENT - observed for some span tags, and some p tags) $this->nodes is set to NULL. + // NOTE: This indicates that there is a problem where it's set to NULL without a clear happening. + // WHY is this happening? + if (!is_null($this->nodes)) + { + foreach ($this->nodes as $n) + { + $ret .= $this->convert_text($n->text()); + } + + // If this node is a span... add a space at the end of it so multiple spans don't run into each other. This is plaintext after all. + if ($this->tag == "span") + { + $ret .= $this->dom->default_span_text; + } + + + } + return $ret; + } + + function xmltext() + { + $ret = $this->innertext(); + $ret = str_ireplace('', '', $ret); + return $ret; + } + + // build node's text with tag + function makeup() + { + // text, comment, unknown + if (isset($this->_[HDOM_INFO_TEXT])) return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]); + + $ret = '<'.$this->tag; + $i = -1; + + foreach ($this->attr as $key=>$val) + { + ++$i; + + // skip removed attribute + if ($val===null || $val===false) + continue; + + $ret .= $this->_[HDOM_INFO_SPACE][$i][0]; + //no value attr: nowrap, checked selected... + if ($val===true) + $ret .= $key; + else { + switch ($this->_[HDOM_INFO_QUOTE][$i]) + { + case HDOM_QUOTE_DOUBLE: $quote = '"'; break; + case HDOM_QUOTE_SINGLE: $quote = '\''; break; + default: $quote = ''; + } + $ret .= $key.$this->_[HDOM_INFO_SPACE][$i][1].'='.$this->_[HDOM_INFO_SPACE][$i][2].$quote.$val.$quote; + } + } + $ret = $this->dom->restore_noise($ret); + return $ret . $this->_[HDOM_INFO_ENDSPACE] . '>'; + } + + // find elements by css selector + //PaperG - added ability for find to lowercase the value of the selector. + function find($selector, $idx=null, $lowercase=false) + { + $selectors = $this->parse_selector($selector); + if (($count=count($selectors))===0) return array(); + $found_keys = array(); + + // find each selector + for ($c=0; $c<$count; ++$c) + { + // The change on the below line was documented on the sourceforge code tracker id 2788009 + // used to be: if (($levle=count($selectors[0]))===0) return array(); + if (($levle=count($selectors[$c]))===0) return array(); + if (!isset($this->_[HDOM_INFO_BEGIN])) return array(); + + $head = array($this->_[HDOM_INFO_BEGIN]=>1); + + // handle descendant selectors, no recursive! + for ($l=0; $l<$levle; ++$l) + { + $ret = array(); + foreach ($head as $k=>$v) + { + $n = ($k===-1) ? $this->dom->root : $this->dom->nodes[$k]; + //PaperG - Pass this optional parameter on to the seek function. + $n->seek($selectors[$c][$l], $ret, $lowercase); + } + $head = $ret; + } + + foreach ($head as $k=>$v) + { + if (!isset($found_keys[$k])) + $found_keys[$k] = 1; + } + } + + // sort keys + ksort($found_keys); + + $found = array(); + foreach ($found_keys as $k=>$v) + $found[] = $this->dom->nodes[$k]; + + // return nth-element or array + if (is_null($idx)) return $found; + else if ($idx<0) $idx = count($found) + $idx; + return (isset($found[$idx])) ? $found[$idx] : null; + } + + // seek for given conditions + // PaperG - added parameter to allow for case insensitive testing of the value of a selector. + protected function seek($selector, &$ret, $lowercase=false) + { + global $debugObject; + if (is_object($debugObject)) { $debugObject->debugLogEntry(1); } + + list($tag, $key, $val, $exp, $no_key) = $selector; + + // xpath index + if ($tag && $key && is_numeric($key)) + { + $count = 0; + foreach ($this->children as $c) + { + if ($tag==='*' || $tag===$c->tag) { + if (++$count==$key) { + $ret[$c->_[HDOM_INFO_BEGIN]] = 1; + return; + } + } + } + return; + } + + $end = (!empty($this->_[HDOM_INFO_END])) ? $this->_[HDOM_INFO_END] : 0; + if ($end==0) { + $parent = $this->parent; + while (!isset($parent->_[HDOM_INFO_END]) && $parent!==null) { + $end -= 1; + $parent = $parent->parent; + } + $end += $parent->_[HDOM_INFO_END]; + } + + for ($i=$this->_[HDOM_INFO_BEGIN]+1; $i<$end; ++$i) { + $node = $this->dom->nodes[$i]; + + $pass = true; + + if ($tag==='*' && !$key) { + if (in_array($node, $this->children, true)) + $ret[$i] = 1; + continue; + } + + // compare tag + if ($tag && $tag!=$node->tag && $tag!=='*') {$pass=false;} + // compare key + if ($pass && $key) { + if ($no_key) { + if (isset($node->attr[$key])) $pass=false; + } else { + if (($key != "plaintext") && !isset($node->attr[$key])) $pass=false; + } + } + // compare value + if ($pass && $key && $val && $val!=='*') { + // If they have told us that this is a "plaintext" search then we want the plaintext of the node - right? + if ($key == "plaintext") { + // $node->plaintext actually returns $node->text(); + $nodeKeyValue = $node->text(); + } else { + // this is a normal search, we want the value of that attribute of the tag. + $nodeKeyValue = $node->attr[$key]; + } + if (is_object($debugObject)) {$debugObject->debugLog(2, "testing node: " . $node->tag . " for attribute: " . $key . $exp . $val . " where nodes value is: " . $nodeKeyValue);} + + //PaperG - If lowercase is set, do a case insensitive test of the value of the selector. + if ($lowercase) { + $check = $this->match($exp, strtolower($val), strtolower($nodeKeyValue)); + } else { + $check = $this->match($exp, $val, $nodeKeyValue); + } + if (is_object($debugObject)) {$debugObject->debugLog(2, "after match: " . ($check ? "true" : "false"));} + + // handle multiple class + if (!$check && strcasecmp($key, 'class')===0) { + foreach (explode(' ',$node->attr[$key]) as $k) { + // Without this, there were cases where leading, trailing, or double spaces lead to our comparing blanks - bad form. + if (!empty($k)) { + if ($lowercase) { + $check = $this->match($exp, strtolower($val), strtolower($k)); + } else { + $check = $this->match($exp, $val, $k); + } + if ($check) break; + } + } + } + if (!$check) $pass = false; + } + if ($pass) $ret[$i] = 1; + unset($node); + } + // It's passed by reference so this is actually what this function returns. + if (is_object($debugObject)) {$debugObject->debugLog(1, "EXIT - ret: ", $ret);} + } + + protected function match($exp, $pattern, $value) { + global $debugObject; + if (is_object($debugObject)) {$debugObject->debugLogEntry(1);} + + switch ($exp) { + case '=': + return ($value===$pattern); + case '!=': + return ($value!==$pattern); + case '^=': + return preg_match("/^".preg_quote($pattern,'/')."/", $value); + case '$=': + return preg_match("/".preg_quote($pattern,'/')."$/", $value); + case '*=': + if ($pattern[0]=='/') { + return preg_match($pattern, $value); + } + return preg_match("/".$pattern."/i", $value); + } + return false; + } + + protected function parse_selector($selector_string) { + global $debugObject; + if (is_object($debugObject)) {$debugObject->debugLogEntry(1);} + + // pattern of CSS selectors, modified from mootools + // Paperg: Add the colon to the attrbute, so that it properly finds like google does. + // Note: if you try to look at this attribute, yo MUST use getAttribute since $dom->x:y will fail the php syntax check. +// Notice the \[ starting the attbute? and the @? following? This implies that an attribute can begin with an @ sign that is not captured. +// This implies that an html attribute specifier may start with an @ sign that is NOT captured by the expression. +// farther study is required to determine of this should be documented or removed. +// $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; + $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; + preg_match_all($pattern, trim($selector_string).' ', $matches, PREG_SET_ORDER); + if (is_object($debugObject)) {$debugObject->debugLog(2, "Matches Array: ", $matches);} + + $selectors = array(); + $result = array(); + //print_r($matches); + + foreach ($matches as $m) { + $m[0] = trim($m[0]); + if ($m[0]==='' || $m[0]==='/' || $m[0]==='//') continue; + // for browser generated xpath + if ($m[1]==='tbody') continue; + + list($tag, $key, $val, $exp, $no_key) = array($m[1], null, null, '=', false); + if (!empty($m[2])) {$key='id'; $val=$m[2];} + if (!empty($m[3])) {$key='class'; $val=$m[3];} + if (!empty($m[4])) {$key=$m[4];} + if (!empty($m[5])) {$exp=$m[5];} + if (!empty($m[6])) {$val=$m[6];} + + // convert to lowercase + if ($this->dom->lowercase) {$tag=strtolower($tag); $key=strtolower($key);} + //elements that do NOT have the specified attribute + if (isset($key[0]) && $key[0]==='!') {$key=substr($key, 1); $no_key=true;} + + $result[] = array($tag, $key, $val, $exp, $no_key); + if (trim($m[7])===',') { + $selectors[] = $result; + $result = array(); + } + } + if (count($result)>0) + $selectors[] = $result; + return $selectors; + } + + function __get($name) { + if (isset($this->attr[$name])) + { + return $this->convert_text($this->attr[$name]); + } + switch ($name) { + case 'outertext': return $this->outertext(); + case 'innertext': return $this->innertext(); + case 'plaintext': return $this->text(); + case 'xmltext': return $this->xmltext(); + default: return array_key_exists($name, $this->attr); + } + } + + function __set($name, $value) { + switch ($name) { + case 'outertext': return $this->_[HDOM_INFO_OUTER] = $value; + case 'innertext': + if (isset($this->_[HDOM_INFO_TEXT])) return $this->_[HDOM_INFO_TEXT] = $value; + return $this->_[HDOM_INFO_INNER] = $value; + } + if (!isset($this->attr[$name])) { + $this->_[HDOM_INFO_SPACE][] = array(' ', '', ''); + $this->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE; + } + $this->attr[$name] = $value; + } + + function __isset($name) { + switch ($name) { + case 'outertext': return true; + case 'innertext': return true; + case 'plaintext': return true; + } + //no value attr: nowrap, checked selected... + return (array_key_exists($name, $this->attr)) ? true : isset($this->attr[$name]); + } + + function __unset($name) { + if (isset($this->attr[$name])) + unset($this->attr[$name]); + } + + // PaperG - Function to convert the text from one character set to another if the two sets are not the same. + function convert_text($text) + { + global $debugObject; + if (is_object($debugObject)) {$debugObject->debugLogEntry(1);} + + $converted_text = $text; + + $sourceCharset = ""; + $targetCharset = ""; + + if ($this->dom) + { + $sourceCharset = strtoupper($this->dom->_charset); + $targetCharset = strtoupper($this->dom->_target_charset); + } + if (is_object($debugObject)) {$debugObject->debugLog(3, "source charset: " . $sourceCharset . " target charaset: " . $targetCharset);} + + if (!empty($sourceCharset) && !empty($targetCharset) && (strcasecmp($sourceCharset, $targetCharset) != 0)) + { + // Check if the reported encoding could have been incorrect and the text is actually already UTF-8 + if ((strcasecmp($targetCharset, 'UTF-8') == 0) && ($this->is_utf8($text))) + { + $converted_text = $text; + } + else + { + $converted_text = iconv($sourceCharset, $targetCharset, $text); + } + } + + // Lets make sure that we don't have that silly BOM issue with any of the utf-8 text we output. + if ($targetCharset == 'UTF-8') + { + if (substr($converted_text, 0, 3) == "\xef\xbb\xbf") + { + $converted_text = substr($converted_text, 3); + } + if (substr($converted_text, -3) == "\xef\xbb\xbf") + { + $converted_text = substr($converted_text, 0, -3); + } + } + + return $converted_text; + } + + /** + * Returns true if $string is valid UTF-8 and false otherwise. + * + * @param mixed $str String to be tested + * @return boolean + */ + static function is_utf8($str) + { + $c=0; $b=0; + $bits=0; + $len=strlen($str); + for($i=0; $i<$len; $i++) + { + $c=ord($str[$i]); + if($c > 128) + { + if(($c >= 254)) return false; + elseif($c >= 252) $bits=6; + elseif($c >= 248) $bits=5; + elseif($c >= 240) $bits=4; + elseif($c >= 224) $bits=3; + elseif($c >= 192) $bits=2; + else return false; + if(($i+$bits) > $len) return false; + while($bits > 1) + { + $i++; + $b=ord($str[$i]); + if($b < 128 || $b > 191) return false; + $bits--; + } + } + } + return true; + } + /* + function is_utf8($string) + { + //this is buggy + return (utf8_encode(utf8_decode($string)) == $string); + } + */ + + /** + * Function to try a few tricks to determine the displayed size of an img on the page. + * NOTE: This will ONLY work on an IMG tag. Returns FALSE on all other tag types. + * + * @author John Schlick + * @version April 19 2012 + * @return array an array containing the 'height' and 'width' of the image on the page or -1 if we can't figure it out. + */ + function get_display_size() + { + global $debugObject; + + $width = -1; + $height = -1; + + if ($this->tag !== 'img') + { + return false; + } + + // See if there is aheight or width attribute in the tag itself. + if (isset($this->attr['width'])) + { + $width = $this->attr['width']; + } + + if (isset($this->attr['height'])) + { + $height = $this->attr['height']; + } + + // Now look for an inline style. + if (isset($this->attr['style'])) + { + // Thanks to user gnarf from stackoverflow for this regular expression. + $attributes = array(); + preg_match_all("/([\w-]+)\s*:\s*([^;]+)\s*;?/", $this->attr['style'], $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $attributes[$match[1]] = $match[2]; + } + + // If there is a width in the style attributes: + if (isset($attributes['width']) && $width == -1) + { + // check that the last two characters are px (pixels) + if (strtolower(substr($attributes['width'], -2)) == 'px') + { + $proposed_width = substr($attributes['width'], 0, -2); + // Now make sure that it's an integer and not something stupid. + if (filter_var($proposed_width, FILTER_VALIDATE_INT)) + { + $width = $proposed_width; + } + } + } + + // If there is a width in the style attributes: + if (isset($attributes['height']) && $height == -1) + { + // check that the last two characters are px (pixels) + if (strtolower(substr($attributes['height'], -2)) == 'px') + { + $proposed_height = substr($attributes['height'], 0, -2); + // Now make sure that it's an integer and not something stupid. + if (filter_var($proposed_height, FILTER_VALIDATE_INT)) + { + $height = $proposed_height; + } + } + } + + } + + // Future enhancement: + // Look in the tag to see if there is a class or id specified that has a height or width attribute to it. + + // Far future enhancement + // Look at all the parent tags of this image to see if they specify a class or id that has an img selector that specifies a height or width + // Note that in this case, the class or id will have the img subselector for it to apply to the image. + + // ridiculously far future development + // If the class or id is specified in a SEPARATE css file thats not on the page, go get it and do what we were just doing for the ones on the page. + + $result = array('height' => $height, + 'width' => $width); + return $result; + } + + // camel naming conventions + function getAllAttributes() {return $this->attr;} + function getAttribute($name) {return $this->__get($name);} + function setAttribute($name, $value) {$this->__set($name, $value);} + function hasAttribute($name) {return $this->__isset($name);} + function removeAttribute($name) {$this->__set($name, null);} + function getElementById($id) {return $this->find("#$id", 0);} + function getElementsById($id, $idx=null) {return $this->find("#$id", $idx);} + function getElementByTagName($name) {return $this->find($name, 0);} + function getElementsByTagName($name, $idx=null) {return $this->find($name, $idx);} + function parentNode() {return $this->parent();} + function childNodes($idx=-1) {return $this->children($idx);} + function firstChild() {return $this->first_child();} + function lastChild() {return $this->last_child();} + function nextSibling() {return $this->next_sibling();} + function previousSibling() {return $this->prev_sibling();} + function hasChildNodes() {return $this->has_child();} + function nodeName() {return $this->tag;} + function appendChild($node) {$node->parent($this); return $node;} + +} + +/** + * simple html dom parser + * Paperg - in the find routine: allow us to specify that we want case insensitive testing of the value of the selector. + * Paperg - change $size from protected to public so we can easily access it + * Paperg - added ForceTagsClosed in the constructor which tells us whether we trust the html or not. Default is to NOT trust it. + * + * @package PlaceLocalInclude + */ +class simple_html_dom +{ + public $root = null; + public $nodes = array(); + public $callback = null; + public $lowercase = false; + // Used to keep track of how large the text was when we started. + public $original_size; + public $size; + protected $pos; + protected $doc; + protected $char; + protected $cursor; + protected $parent; + protected $noise = array(); + protected $token_blank = " \t\r\n"; + protected $token_equal = ' =/>'; + protected $token_slash = " />\r\n\t"; + protected $token_attr = ' >'; + // Note that this is referenced by a child node, and so it needs to be public for that node to see this information. + public $_charset = ''; + public $_target_charset = ''; + protected $default_br_text = ""; + public $default_span_text = ""; + + // use isset instead of in_array, performance boost about 30%... + protected $self_closing_tags = array('img'=>1, 'br'=>1, 'input'=>1, 'meta'=>1, 'link'=>1, 'hr'=>1, 'base'=>1, 'embed'=>1, 'spacer'=>1); + protected $block_tags = array('root'=>1, 'body'=>1, 'form'=>1, 'div'=>1, 'span'=>1, 'table'=>1); + // Known sourceforge issue #2977341 + // B tags that are not closed cause us to return everything to the end of the document. + protected $optional_closing_tags = array( + 'tr'=>array('tr'=>1, 'td'=>1, 'th'=>1), + 'th'=>array('th'=>1), + 'td'=>array('td'=>1), + 'li'=>array('li'=>1), + 'dt'=>array('dt'=>1, 'dd'=>1), + 'dd'=>array('dd'=>1, 'dt'=>1), + 'dl'=>array('dd'=>1, 'dt'=>1), + 'p'=>array('p'=>1), + 'nobr'=>array('nobr'=>1), + 'b'=>array('b'=>1), + 'option'=>array('option'=>1), + ); + + function __construct($str=null, $lowercase=true, $forceTagsClosed=true, $target_charset=DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) + { + if ($str) + { + if (preg_match("/^http:\/\//i",$str) || is_file($str)) + { + $this->load_file($str); + } + else + { + $this->load($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText); + } + } + // Forcing tags to be closed implies that we don't trust the html, but it can lead to parsing errors if we SHOULD trust the html. + if (!$forceTagsClosed) { + $this->optional_closing_array=array(); + } + $this->_target_charset = $target_charset; + } + + function __destruct() + { + $this->clear(); + } + + // load html from string + function load($str, $lowercase=true, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT) + { + global $debugObject; + + // prepare + $this->prepare($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText); + // strip out comments + $this->remove_noise("''is"); + // strip out cdata + $this->remove_noise("''is", true); + // Per sourceforge http://sourceforge.net/tracker/?func=detail&aid=2949097&group_id=218559&atid=1044037 + // Script tags removal now preceeds style tag removal. + // strip out + + + +
+

W3C + +

Selectors

+ +

W3C Working Draft 15 December 2005

+ +
+ +
This version: + +
+ http://www.w3.org/TR/2005/WD-css3-selectors-20051215 + +
Latest version: + +
+ http://www.w3.org/TR/css3-selectors + +
Previous version: + +
+ http://www.w3.org/TR/2001/CR-css3-selectors-20011113 + +
Editors: + +
Daniel Glazman (Invited Expert)
+ +
Tantek Çelik (Invited Expert) + +
Ian Hickson (Google) + +
Peter Linss (former editor, Netscape/AOL) + +
John Williams (former editor, Quark, Inc.) + +
+ +
+ +
+ +

Abstract

+ +

Selectors are patterns that match against elements in a + tree. Selectors have been optimized for use with HTML and XML, and + are designed to be usable in performance-critical code.

+ +

CSS (Cascading + Style Sheets) is a language for describing the rendering of HTML and XML documents on + screen, on paper, in speech, etc. CSS uses Selectors for binding + style properties to elements in the document. This document + describes extensions to the selectors defined in CSS level 2. These + extended selectors will be used by CSS level 3. + +

Selectors define the following function:

+ +
expression ∗ element → boolean
+ +

That is, given an element and a selector, this specification + defines whether that element matches the selector.

+ +

These expressions can also be used, for instance, to select a set + of elements, or a single element from a set of elements, by + evaluating the expression across all the elements in a + subtree. STTS (Simple Tree Transformation Sheets), a + language for transforming XML trees, uses this mechanism. [STTS]

+ +

Status of this document

+ +

This section describes the status of this document at the + time of its publication. Other documents may supersede this + document. A list of current W3C publications and the latest revision + of this technical report can be found in the W3C technical reports index at + http://www.w3.org/TR/.

+ +

This document describes the selectors that already exist in CSS1 and CSS2, and + also proposes new selectors for CSS3 and other languages that may need them.

+ +

The CSS Working Group doesn't expect that all implementations of + CSS3 will have to implement all selectors. Instead, there will + probably be a small number of variants of CSS3, called profiles. For + example, it may be that only a profile for interactive user agents + will include all of the selectors.

+ +

This specification is a last call working draft for the the CSS Working Group + (Style Activity). This + document is a revision of the Candidate + Recommendation dated 2001 November 13, and has incorporated + implementation feedback received in the past few years. It is + expected that this last call will proceed straight to Proposed + Recommendation stage since it is believed that interoperability will + be demonstrable.

+ +

All persons are encouraged to review and implement this + specification and return comments to the (archived) + public mailing list www-style + (see instructions). W3C + Members can also send comments directly to the CSS Working + Group. + The deadline for comments is 14 January 2006.

+ +

This is still a draft document and may be updated, replaced, or + obsoleted by other documents at any time. It is inappropriate to + cite a W3C Working Draft as other than "work in progress". + +

This document may be available in translation. + The English version of this specification is the only normative + version. + +

+ +

Table of contents

+ + + +
+ +

1. Introduction

+ +

1.1. Dependencies

+ +

Some features of this specification are specific to CSS, or have + particular limitations or rules specific to CSS. In this + specification, these have been described in terms of CSS2.1. [CSS21]

+ +

1.2. Terminology

+ +

All of the text of this specification is normative except + examples, notes, and sections explicitly marked as + non-normative.

+ +

1.3. Changes from CSS2

+ +

This section is non-normative.

+ +

The main differences between the selectors in CSS2 and those in + Selectors are: + +

    + +
  • the list of basic definitions (selector, group of selectors, + simple selector, etc.) has been changed; in particular, what was + referred to in CSS2 as a simple selector is now called a sequence + of simple selectors, and the term "simple selector" is now used for + the components of this sequence
  • + +
  • an optional namespace component is now allowed in type element + selectors, the universal selector and attribute selectors
  • + +
  • a new combinator has been introduced
  • + +
  • new simple selectors including substring matching attribute + selectors, and new pseudo-classes
  • + +
  • new pseudo-elements, and introduction of the "::" convention + for pseudo-elements
  • + +
  • the grammar has been rewritten
  • + +
  • profiles to be added to specifications integrating Selectors + and defining the set of selectors which is actually supported by + each specification
  • + +
  • Selectors are now a CSS3 Module and an independent + specification; other specifications can now refer to this document + independently of CSS
  • + +
  • the specification now has its own test suite
  • + +
+ +

2. Selectors

+ +

This section is non-normative, as it merely summarizes the +following sections.

+ +

A Selector represents a structure. This structure can be used as a +condition (e.g. in a CSS rule) that determines which elements a +selector matches in the document tree, or as a flat description of the +HTML or XML fragment corresponding to that structure.

+ +

Selectors may range from simple element names to rich contextual +representations.

+ +

The following table summarizes the Selector syntax:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PatternMeaningDescribed in sectionFirst defined in CSS level
*any elementUniversal + selector2
Ean element of type EType selector1
E[foo]an E element with a "foo" attributeAttribute + selectors2
E[foo="bar"]an E element whose "foo" attribute value is exactly + equal to "bar"Attribute + selectors2
E[foo~="bar"]an E element whose "foo" attribute value is a list of + space-separated values, one of which is exactly equal to "bar"Attribute + selectors2
E[foo^="bar"]an E element whose "foo" attribute value begins exactly + with the string "bar"Attribute + selectors3
E[foo$="bar"]an E element whose "foo" attribute value ends exactly + with the string "bar"Attribute + selectors3
E[foo*="bar"]an E element whose "foo" attribute value contains the + substring "bar"Attribute + selectors3
E[hreflang|="en"]an E element whose "hreflang" attribute has a hyphen-separated + list of values beginning (from the left) with "en"Attribute + selectors2
E:rootan E element, root of the documentStructural + pseudo-classes3
E:nth-child(n)an E element, the n-th child of its parentStructural + pseudo-classes3
E:nth-last-child(n)an E element, the n-th child of its parent, counting + from the last oneStructural + pseudo-classes3
E:nth-of-type(n)an E element, the n-th sibling of its typeStructural + pseudo-classes3
E:nth-last-of-type(n)an E element, the n-th sibling of its type, counting + from the last oneStructural + pseudo-classes3
E:first-childan E element, first child of its parentStructural + pseudo-classes2
E:last-childan E element, last child of its parentStructural + pseudo-classes3
E:first-of-typean E element, first sibling of its typeStructural + pseudo-classes3
E:last-of-typean E element, last sibling of its typeStructural + pseudo-classes3
E:only-childan E element, only child of its parentStructural + pseudo-classes3
E:only-of-typean E element, only sibling of its typeStructural + pseudo-classes3
E:emptyan E element that has no children (including text + nodes)Structural + pseudo-classes3
E:link
E:visited
an E element being the source anchor of a hyperlink of + which the target is not yet visited (:link) or already visited + (:visited)The link + pseudo-classes1
E:active
E:hover
E:focus
an E element during certain user actionsThe user + action pseudo-classes1 and 2
E:targetan E element being the target of the referring URIThe target + pseudo-class3
E:lang(fr)an element of type E in language "fr" (the document + language specifies how language is determined)The :lang() + pseudo-class2
E:enabled
E:disabled
a user interface element E which is enabled or + disabledThe UI element states + pseudo-classes3
E:checkeda user interface element E which is checked (for instance a radio-button or checkbox)The UI element states + pseudo-classes3
E::first-linethe first formatted line of an E elementThe ::first-line + pseudo-element1
E::first-letterthe first formatted letter of an E elementThe ::first-letter + pseudo-element1
E::selectionthe portion of an E element that is currently + selected/highlighted by the userThe UI element + fragments pseudo-elements3
E::beforegenerated content before an E elementThe ::before + pseudo-element2
E::aftergenerated content after an E elementThe ::after + pseudo-element2
E.warningan E element whose class is +"warning" (the document language specifies how class is determined).Class + selectors1
E#myidan E element with ID equal to "myid".ID + selectors1
E:not(s)an E element that does not match simple selector sNegation + pseudo-class3
E Fan F element descendant of an E elementDescendant + combinator1
E > Fan F element child of an E elementChild + combinator2
E + Fan F element immediately preceded by an E elementAdjacent sibling combinator2
E ~ Fan F element preceded by an E elementGeneral sibling combinator3
+ +

The meaning of each selector is derived from the table above by +prepending "matches" to the contents of each cell in the "Meaning" +column.

+ +

3. Case sensitivity

+ +

The case sensitivity of document language element names, attribute +names, and attribute values in selectors depends on the document +language. For example, in HTML, element names are case-insensitive, +but in XML, they are case-sensitive.

+ +

4. Selector syntax

+ +

A selector is a chain of one +or more sequences of simple selectors +separated by combinators.

+ +

A sequence of simple selectors +is a chain of simple selectors +that are not separated by a combinator. It +always begins with a type selector or a +universal selector. No other type +selector or universal selector is allowed in the sequence.

+ +

A simple selector is either a type selector, universal selector, attribute selector, class selector, ID selector, content selector, or pseudo-class. One pseudo-element may be appended to the last +sequence of simple selectors.

+ +

Combinators are: white space, "greater-than +sign" (U+003E, >), "plus sign" (U+002B, ++) and "tilde" (U+007E, ~). White +space may appear between a combinator and the simple selectors around +it. Only the characters "space" (U+0020), "tab" +(U+0009), "line feed" (U+000A), "carriage return" (U+000D), and "form +feed" (U+000C) can occur in white space. Other space-like characters, +such as "em-space" (U+2003) and "ideographic space" (U+3000), are +never part of white space.

+ +

The elements of a document tree that are represented by a selector +are the subjects of the selector. A +selector consisting of a single sequence of simple selectors +represents any element satisfying its requirements. Prepending another +sequence of simple selectors and a combinator to a sequence imposes +additional matching constraints, so the subjects of a selector are +always a subset of the elements represented by the last sequence of +simple selectors.

+ +

An empty selector, containing no sequence of simple selectors and +no pseudo-element, is an invalid +selector.

+ +

5. Groups of selectors

+ +

When several selectors share the same declarations, they may be +grouped into a comma-separated list. (A comma is U+002C.)

+ +
+

CSS examples:

+

In this example, we condense three rules with identical +declarations into one. Thus,

+
h1 { font-family: sans-serif }
+h2 { font-family: sans-serif }
+h3 { font-family: sans-serif }
+

is equivalent to:

+
h1, h2, h3 { font-family: sans-serif }
+
+ +

Warning: the equivalence is true in this example +because all the selectors are valid selectors. If just one of these +selectors were invalid, the entire group of selectors would be +invalid. This would invalidate the rule for all three heading +elements, whereas in the former case only one of the three individual +heading rules would be invalidated.

+ + +

6. Simple selectors

+ +

6.1. Type selector

+ +

A type selector is the name of a document language +element type. A type selector represents an instance of the element +type in the document tree.

+ +
+

Example:

+

The following selector represents an h1 element in the document tree:

+
h1
+
+ + +

6.1.1. Type selectors and namespaces

+ +

Type selectors allow an optional namespace ([XMLNAMES]) component. A namespace prefix +that has been previously declared may be prepended to the element name +separated by the namespace separator "vertical bar" +(U+007C, |).

+ +

The namespace component may be left empty to indicate that the +selector is only to represent elements with no declared namespace.

+ +

An asterisk may be used for the namespace prefix, indicating that +the selector represents elements in any namespace (including elements +with no namespace).

+ +

Element type selectors that have no namespace component (no +namespace separator), represent elements without regard to the +element's namespace (equivalent to "*|") unless a default +namespace has been declared. If a default namespace has been declared, +the selector will represent only elements in the default +namespace.

+ +

A type selector containing a namespace prefix that has not been +previously declared is an invalid selector. +The mechanism for declaring a namespace prefix is left up to the +language implementing Selectors. In CSS, such a mechanism is defined +in the General Syntax module.

+ +

In a namespace-aware client, element type selectors will only match +against the local part +of the element's qualified +name. See below for notes about matching +behaviors in down-level clients.

+ +

In summary:

+ +
+
ns|E
+
elements with name E in namespace ns
+
*|E
+
elements with name E in any namespace, including those without any + declared namespace
+
|E
+
elements with name E without any declared namespace
+
E
+
if no default namespace has been specified, this is equivalent to *|E. + Otherwise it is equivalent to ns|E where ns is the default namespace.
+
+ +
+

CSS examples:

+ +
@namespace foo url(http://www.example.com);
+ foo|h1 { color: blue }
+ foo|* { color: yellow }
+ |h1 { color: red }
+ *|h1 { color: green }
+ h1 { color: green }
+ +

The first rule will match only h1 elements in the + "http://www.example.com" namespace.

+ +

The second rule will match all elements in the + "http://www.example.com" namespace.

+ +

The third rule will match only h1 elements without + any declared namespace.

+ +

The fourth rule will match h1 elements in any + namespace (including those without any declared namespace).

+ +

The last rule is equivalent to the fourth rule because no default + namespace has been defined.

+ +
+ +

6.2. Universal selector

+ +

The universal selector, written "asterisk" +(*), represents the qualified name of any element +type. It represents any single element in the document tree in any +namespace (including those without any declared namespace) if no +default namespace has been specified. If a default namespace has been +specified, see Universal selector and +Namespaces below.

+ +

If the universal selector is not the only component of a sequence +of simple selectors, the * may be omitted.

+ +
+

Examples:

+
    +
  • *[hreflang|=en] and [hreflang|=en] are equivalent,
  • +
  • *.warning and .warning are equivalent,
  • +
  • *#myid and #myid are equivalent.
  • +
+
+ +

Note: it is recommended that the +*, representing the universal selector, not be +omitted.

+ +

6.2.1. Universal selector and namespaces

+ +

The universal selector allows an optional namespace component. It +is used as follows:

+ +
+
ns|*
+
all elements in namespace ns
+
*|*
+
all elements
+
|*
+
all elements without any declared namespace
+
*
+
if no default namespace has been specified, this is equivalent to *|*. + Otherwise it is equivalent to ns|* where ns is the default namespace.
+
+ +

A universal selector containing a namespace prefix that has not +been previously declared is an invalid +selector. The mechanism for declaring a namespace prefix is left up +to the language implementing Selectors. In CSS, such a mechanism is +defined in the General Syntax module.

+ + +

6.3. Attribute selectors

+ +

Selectors allow the representation of an element's attributes. When +a selector is used as an expression to match against an element, +attribute selectors must be considered to match an element if that +element has an attribute that matches the attribute represented by the +attribute selector.

+ +

6.3.1. Attribute presence and values +selectors

+ +

CSS2 introduced four attribute selectors:

+ +
+
[att] +
Represents an element with the att attribute, whatever the value of + the attribute.
+
[att=val]
+
Represents an element with the att attribute whose value is exactly + "val".
+
[att~=val]
+
Represents an element with the att attribute whose value is a whitespace-separated list of words, one of + which is exactly "val". If "val" contains whitespace, it will never + represent anything (since the words are separated by + spaces).
+
[att|=val] +
Represents an element with the att attribute, its value either + being exactly "val" or beginning with "val" immediately followed by + "-" (U+002D). This is primarily intended to allow language subcode + matches (e.g., the hreflang attribute on the + link element in HTML) as described in RFC 3066 ([RFC3066]). For lang (or + xml:lang) language subcode matching, please see the :lang pseudo-class.
+
+ +

Attribute values must be identifiers or strings. The +case-sensitivity of attribute names and values in selectors depends on +the document language.

+ +
+ +

Examples:

+ +

The following attribute selector represents an h1 + element that carries the title attribute, whatever its + value:

+ +
h1[title]
+ +

In the following example, the selector represents a + span element whose class attribute has + exactly the value "example":

+ +
span[class="example"]
+ +

Multiple attribute selectors can be used to represent several + attributes of an element, or several conditions on the same + attribute. Here, the selector represents a span element + whose hello attribute has exactly the value "Cleveland" + and whose goodbye attribute has exactly the value + "Columbus":

+ +
span[hello="Cleveland"][goodbye="Columbus"]
+ +

The following selectors illustrate the differences between "=" + and "~=". The first selector will represent, for example, the value + "copyright copyleft copyeditor" on a rel attribute. The + second selector will only represent an a element with + an href attribute having the exact value + "http://www.w3.org/".

+ +
a[rel~="copyright"]
+a[href="http://www.w3.org/"]
+ +

The following selector represents a link element + whose hreflang attribute is exactly "fr".

+ +
link[hreflang=fr]
+ +

The following selector represents a link element for + which the values of the hreflang attribute begins with + "en", including "en", "en-US", and "en-cockney":

+ +
link[hreflang|="en"]
+ +

Similarly, the following selectors represents a + DIALOGUE element whenever it has one of two different + values for an attribute character:

+ +
DIALOGUE[character=romeo]
+DIALOGUE[character=juliet]
+ +
+ +

6.3.2. Substring matching attribute +selectors

+ +

Three additional attribute selectors are provided for matching +substrings in the value of an attribute:

+ +
+
[att^=val]
+
Represents an element with the att attribute whose value begins + with the prefix "val".
+
[att$=val] +
Represents an element with the att attribute whose value ends with + the suffix "val".
+
[att*=val] +
Represents an element with the att attribute whose value contains + at least one instance of the substring "val".
+
+ +

Attribute values must be identifiers or strings. The +case-sensitivity of attribute names in selectors depends on the +document language.

+ +
+

Examples:

+

The following selector represents an HTML object, referencing an + image:

+
object[type^="image/"]
+

The following selector represents an HTML anchor a with an + href attribute whose value ends with ".html".

+
a[href$=".html"]
+

The following selector represents an HTML paragraph with a title + attribute whose value contains the substring "hello"

+
p[title*="hello"]
+
+ +

6.3.3. Attribute selectors and namespaces

+ +

Attribute selectors allow an optional namespace component to the +attribute name. A namespace prefix that has been previously declared +may be prepended to the attribute name separated by the namespace +separator "vertical bar" (|). In keeping with +the Namespaces in the XML recommendation, default namespaces do not +apply to attributes, therefore attribute selectors without a namespace +component apply only to attributes that have no declared namespace +(equivalent to "|attr"). An asterisk may be used for the +namespace prefix indicating that the selector is to match all +attribute names without regard to the attribute's namespace. + +

An attribute selector with an attribute name containing a namespace +prefix that has not been previously declared is an invalid selector. The mechanism for declaring +a namespace prefix is left up to the language implementing Selectors. +In CSS, such a mechanism is defined in the General Syntax module. + +

+

CSS examples:

+
@namespace foo "http://www.example.com";
+[foo|att=val] { color: blue }
+[*|att] { color: yellow }
+[|att] { color: green }
+[att] { color: green }
+ +

The first rule will match only elements with the attribute + att in the "http://www.example.com" namespace with the + value "val".

+ +

The second rule will match only elements with the attribute + att regardless of the namespace of the attribute + (including no declared namespace).

+ +

The last two rules are equivalent and will match only elements + with the attribute att where the attribute is not + declared to be in a namespace.

+ +
+ +

6.3.4. Default attribute values in DTDs

+ +

Attribute selectors represent explicitly set attribute values in +the document tree. Default attribute values may be defined in a DTD or +elsewhere, but cannot always be selected by attribute +selectors. Selectors should be designed so that they work even if the +default values are not included in the document tree.

+ +

More precisely, a UA is not required to read an "external +subset" of the DTD but is required to look for default +attribute values in the document's "internal subset." (See [XML10] for definitions of these subsets.)

+ +

A UA that recognizes an XML namespace [XMLNAMES] is not required to use its +knowledge of that namespace to treat default attribute values as if +they were present in the document. (For example, an XHTML UA is not +required to use its built-in knowledge of the XHTML DTD.)

+ +

Note: Typically, implementations +choose to ignore external subsets.

+ +
+

Example:

+ +

Consider an element EXAMPLE with an attribute "notation" that has a +default value of "decimal". The DTD fragment might be

+ +
<!ATTLIST EXAMPLE notation (decimal,octal) "decimal">
+ +

If the style sheet contains the rules

+ +
EXAMPLE[notation=decimal] { /*... default property settings ...*/ }
+EXAMPLE[notation=octal]   { /*... other settings...*/ }
+ +

the first rule will not match elements whose "notation" attribute +is set by default, i.e. not set explicitly. To catch all cases, the +attribute selector for the default value must be dropped:

+ +
EXAMPLE                   { /*... default property settings ...*/ }
+EXAMPLE[notation=octal]   { /*... other settings...*/ }
+ +

Here, because the selector EXAMPLE[notation=octal] is +more specific than the tag +selector alone, the style declarations in the second rule will override +those in the first for elements that have a "notation" attribute value +of "octal". Care has to be taken that all property declarations that +are to apply only to the default case are overridden in the non-default +cases' style rules.

+ +
+ +

6.4. Class selectors

+ +

Working with HTML, authors may use the period (U+002E, +.) notation as an alternative to the ~= +notation when representing the class attribute. Thus, for +HTML, div.value and div[class~=value] have +the same meaning. The attribute value must immediately follow the +"period" (.).

+ +

UAs may apply selectors using the period (.) notation in XML +documents if the UA has namespace-specific knowledge that allows it to +determine which attribute is the "class" attribute for the +respective namespace. One such example of namespace-specific knowledge +is the prose in the specification for a particular namespace (e.g. SVG +1.0 [SVG] describes the SVG +"class" attribute and how a UA should interpret it, and +similarly MathML 1.01 [MATH] describes the MathML +"class" attribute.)

+ +
+

CSS examples:

+ +

We can assign style information to all elements with + class~="pastoral" as follows:

+ +
*.pastoral { color: green }  /* all elements with class~=pastoral */
+ +

or just

+ +
.pastoral { color: green }  /* all elements with class~=pastoral */
+ +

The following assigns style only to H1 elements with + class~="pastoral":

+ +
H1.pastoral { color: green }  /* H1 elements with class~=pastoral */
+ +

Given these rules, the first H1 instance below would not have + green text, while the second would:

+ +
<H1>Not green</H1>
+<H1 class="pastoral">Very green</H1>
+ +
+ +

To represent a subset of "class" values, each value must be preceded +by a ".", in any order.

+ +
+ +

CSS example:

+ +

The following rule matches any P element whose "class" attribute + has been assigned a list of whitespace-separated values that includes + "pastoral" and "marine":

+ +
p.pastoral.marine { color: green }
+ +

This rule matches when class="pastoral blue aqua + marine" but does not match for class="pastoral + blue".

+ +
+ +

Note: Because CSS gives considerable +power to the "class" attribute, authors could conceivably design their +own "document language" based on elements with almost no associated +presentation (such as DIV and SPAN in HTML) and assigning style +information through the "class" attribute. Authors should avoid this +practice since the structural elements of a document language often +have recognized and accepted meanings and author-defined classes may +not.

+ +

Note: If an element has multiple +class attributes, their values must be concatenated with spaces +between the values before searching for the class. As of this time the +working group is not aware of any manner in which this situation can +be reached, however, so this behavior is explicitly non-normative in +this specification.

+ +

6.5. ID selectors

+ +

Document languages may contain attributes that are declared to be +of type ID. What makes attributes of type ID special is that no two +such attributes can have the same value in a document, regardless of +the type of the elements that carry them; whatever the document +language, an ID typed attribute can be used to uniquely identify its +element. In HTML all ID attributes are named "id"; XML applications +may name ID attributes differently, but the same restriction +applies.

+ +

An ID-typed attribute of a document language allows authors to +assign an identifier to one element instance in the document tree. W3C +ID selectors represent an element instance based on its identifier. An +ID selector contains a "number sign" (U+0023, +#) immediately followed by the ID value, which must be an +identifier.

+ +

Selectors does not specify how a UA knows the ID-typed attribute of +an element. The UA may, e.g., read a document's DTD, have the +information hard-coded or ask the user. + +

+

Examples:

+

The following ID selector represents an h1 element + whose ID-typed attribute has the value "chapter1":

+
h1#chapter1
+

The following ID selector represents any element whose ID-typed + attribute has the value "chapter1":

+
#chapter1
+

The following selector represents any element whose ID-typed + attribute has the value "z98y".

+
*#z98y
+
+ +

Note. In XML 1.0 [XML10], the information about which attribute +contains an element's IDs is contained in a DTD or a schema. When +parsing XML, UAs do not always read the DTD, and thus may not know +what the ID of an element is (though a UA may have namespace-specific +knowledge that allows it to determine which attribute is the ID +attribute for that namespace). If a style sheet designer knows or +suspects that a UA may not know what the ID of an element is, he +should use normal attribute selectors instead: +[name=p371] instead of #p371. Elements in +XML 1.0 documents without a DTD do not have IDs at all.

+ +

If an element has multiple ID attributes, all of them must be +treated as IDs for that element for the purposes of the ID +selector. Such a situation could be reached using mixtures of xml:id, +DOM3 Core, XML DTDs, and namespace-specific knowledge.

+ +

6.6. Pseudo-classes

+ +

The pseudo-class concept is introduced to permit selection based on +information that lies outside of the document tree or that cannot be +expressed using the other simple selectors.

+ +

A pseudo-class always consists of a "colon" +(:) followed by the name of the pseudo-class and +optionally by a value between parentheses.

+ +

Pseudo-classes are allowed in all sequences of simple selectors +contained in a selector. Pseudo-classes are allowed anywhere in +sequences of simple selectors, after the leading type selector or +universal selector (possibly omitted). Pseudo-class names are +case-insensitive. Some pseudo-classes are mutually exclusive, while +others can be applied simultaneously to the same +element. Pseudo-classes may be dynamic, in the sense that an element +may acquire or lose a pseudo-class while a user interacts with the +document.

+ + +

6.6.1. Dynamic pseudo-classes

+ +

Dynamic pseudo-classes classify elements on characteristics other +than their name, attributes, or content, in principle characteristics +that cannot be deduced from the document tree.

+ +

Dynamic pseudo-classes do not appear in the document source or +document tree.

+ + +
The link pseudo-classes: :link and :visited
+ +

User agents commonly display unvisited links differently from +previously visited ones. Selectors +provides the pseudo-classes :link and +:visited to distinguish them:

+ +
    +
  • The :link pseudo-class applies to links that have + not yet been visited.
  • +
  • The :visited pseudo-class applies once the link has + been visited by the user.
  • +
+ +

After some amount of time, user agents may choose to return a +visited link to the (unvisited) ':link' state.

+ +

The two states are mutually exclusive.

+ +
+ +

Example:

+ +

The following selector represents links carrying class + external and already visited:

+ +
a.external:visited
+ +
+ +

Note: It is possible for style sheet +authors to abuse the :link and :visited pseudo-classes to determine +which sites a user has visited without the user's consent. + +

UAs may therefore treat all links as unvisited links, or implement +other measures to preserve the user's privacy while rendering visited +and unvisited links differently.

+ +
The user action pseudo-classes +:hover, :active, and :focus
+ +

Interactive user agents sometimes change the rendering in response +to user actions. Selectors provides +three pseudo-classes for the selection of an element the user is +acting on.

+ +
    + +
  • The :hover pseudo-class applies while the user + designates an element with a pointing device, but does not activate + it. For example, a visual user agent could apply this pseudo-class + when the cursor (mouse pointer) hovers over a box generated by the + element. User agents not that do not support interactive + media do not have to support this pseudo-class. Some conforming + user agents that support interactive + media may not be able to support this pseudo-class (e.g., a pen + device that does not detect hovering).
  • + +
  • The :active pseudo-class applies while an element + is being activated by the user. For example, between the times the + user presses the mouse button and releases it.
  • + +
  • The :focus pseudo-class applies while an element + has the focus (accepts keyboard or mouse events, or other forms of + input).
  • + +
+ +

There may be document language or implementation specific limits on +which elements can become :active or acquire +:focus.

+ +

These pseudo-classes are not mutually exclusive. An element may +match several pseudo-classes at the same time.

+ +

Selectors doesn't define if the parent of an element that is +':active' or ':hover' is also in that state.

+ +
+

Examples:

+
a:link    /* unvisited links */
+a:visited /* visited links */
+a:hover   /* user hovers */
+a:active  /* active links */
+

An example of combining dynamic pseudo-classes:

+
a:focus
+a:focus:hover
+

The last selector matches a elements that are in + the pseudo-class :focus and in the pseudo-class :hover.

+
+ +

Note: An element can be both ':visited' +and ':active' (or ':link' and ':active').

+ +

6.6.2. The target pseudo-class :target

+ +

Some URIs refer to a location within a resource. This kind of URI +ends with a "number sign" (#) followed by an anchor +identifier (called the fragment identifier).

+ +

URIs with fragment identifiers link to a certain element within the +document, known as the target element. For instance, here is a URI +pointing to an anchor named section_2 in an HTML +document:

+ +
http://example.com/html/top.html#section_2
+ +

A target element can be represented by the :target +pseudo-class. If the document's URI has no fragment identifier, then +the document has no target element.

+ +
+

Example:

+
p.note:target
+

This selector represents a p element of class + note that is the target element of the referring + URI.

+
+ +
+

CSS example:

+

Here, the :target pseudo-class is used to make the + target element red and place an image before it, if there is one:

+
*:target { color : red }
+*:target::before { content : url(target.png) }
+
+ +

6.6.3. The language pseudo-class :lang

+ +

If the document language specifies how the human language of an +element is determined, it is possible to write selectors that +represent an element based on its language. For example, in HTML [HTML4], the language is determined by a +combination of the lang attribute, the meta +element, and possibly by information from the protocol (such as HTTP +headers). XML uses an attribute called xml:lang, and +there may be other document language-specific methods for determining +the language.

+ +

The pseudo-class :lang(C) represents an element that +is in language C. Whether an element is represented by a +:lang() selector is based solely on the identifier C +being either equal to, or a hyphen-separated substring of, the +element's language value, in the same way as if performed by the '|=' operator in attribute +selectors. The identifier C does not have to be a valid language +name.

+ +

C must not be empty. (If it is, the selector is invalid.)

+ +

Note: It is recommended that +documents and protocols indicate language using codes from RFC 3066 [RFC3066] or its successor, and by means of +"xml:lang" attributes in the case of XML-based documents [XML10]. See +"FAQ: Two-letter or three-letter language codes."

+ +
+

Examples:

+

The two following selectors represent an HTML document that is in + Belgian, French, or German. The two next selectors represent + q quotations in an arbitrary element in Belgian, French, + or German.

+
html:lang(fr-be)
+html:lang(de)
+:lang(fr-be) > q
+:lang(de) > q
+
+ +

6.6.4. The UI element states pseudo-classes

+ +
The :enabled and :disabled pseudo-classes
+ +

The :enabled pseudo-class allows authors to customize +the look of user interface elements that are enabled — which the +user can select or activate in some fashion (e.g. clicking on a button +with a mouse). There is a need for such a pseudo-class because there +is no way to programmatically specify the default appearance of say, +an enabled input element without also specifying what it +would look like when it was disabled.

+ +

Similar to :enabled, :disabled allows the +author to specify precisely how a disabled or inactive user interface +element should look.

+ +

Most elements will be neither enabled nor disabled. An element is +enabled if the user can either activate it or transfer the focus to +it. An element is disabled if it could be enabled, but the user cannot +presently activate it or transfer focus to it.

+ + +
The :checked pseudo-class
+ +

Radio and checkbox elements can be toggled by the user. Some menu +items are "checked" when the user selects them. When such elements are +toggled "on" the :checked pseudo-class applies. The +:checked pseudo-class initially applies to such elements +that have the HTML4 selected and checked +attributes as described in Section +17.2.1 of HTML4, but of course the user can toggle "off" such +elements in which case the :checked pseudo-class would no +longer apply. While the :checked pseudo-class is dynamic +in nature, and is altered by user action, since it can also be based +on the presence of the semantic HTML4 selected and +checked attributes, it applies to all media. + + +

The :indeterminate pseudo-class
+ +
+ +

Radio and checkbox elements can be toggled by the user, but are +sometimes in an indeterminate state, neither checked nor unchecked. +This can be due to an element attribute, or DOM manipulation.

+ +

A future version of this specification may introduce an +:indeterminate pseudo-class that applies to such elements. +

+ +
+ + +

6.6.5. Structural pseudo-classes

+ +

Selectors introduces the concept of structural +pseudo-classes to permit selection based on extra information that lies in +the document tree but cannot be represented by other simple selectors or +combinators. + +

Note that standalone pieces of PCDATA (text nodes in the DOM) are +not counted when calculating the position of an element in the list of +children of its parent. When calculating the position of an element in +the list of children of its parent, the index numbering starts at 1. + + +

:root pseudo-class
+ +

The :root pseudo-class represents an element that is +the root of the document. In HTML 4, this is always the +HTML element. + + +

:nth-child() pseudo-class
+ +

The +:nth-child(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings +before it in the document tree, for a given positive +integer or zero value of n, and has a parent element. In +other words, this matches the bth child of an element after +all the children have been split into groups of a elements +each. For example, this allows the selectors to address every other +row in a table, and could be used to alternate the color +of paragraph text in a cycle of four. The a and +b values must be zero, negative integers or positive +integers. The index of the first child of an element is 1. + +

In addition to this, :nth-child() can take +'odd' and 'even' as arguments instead. +'odd' has the same signification as 2n+1, +and 'even' has the same signification as 2n. + + +

+

Examples:

+
tr:nth-child(2n+1) /* represents every odd row of an HTML table */
+tr:nth-child(odd)  /* same */
+tr:nth-child(2n)   /* represents every even row of an HTML table */
+tr:nth-child(even) /* same */
+
+/* Alternate paragraph colours in CSS */
+p:nth-child(4n+1) { color: navy; }
+p:nth-child(4n+2) { color: green; }
+p:nth-child(4n+3) { color: maroon; }
+p:nth-child(4n+4) { color: purple; }
+
+ +

When a=0, no repeating is used, so for example +:nth-child(0n+5) matches only the fifth child. When +a=0, the an part need not be +included, so the syntax simplifies to +:nth-child(b) and the last example simplifies +to :nth-child(5). + +

+

Examples:

+
foo:nth-child(0n+1)   /* represents an element foo, first child of its parent element */
+foo:nth-child(1)      /* same */
+
+ +

When a=1, the number may be omitted from the rule. + +

+

Examples:

+

The following selectors are therefore equivalent:

+
bar:nth-child(1n+0)   /* represents all bar elements, specificity (0,1,1) */
+bar:nth-child(n+0)    /* same */
+bar:nth-child(n)      /* same */
+bar                   /* same but lower specificity (0,0,1) */
+
+ +

If b=0, then every ath element is picked. In +such a case, the b part may be omitted. + +

+

Examples:

+
tr:nth-child(2n+0) /* represents every even row of an HTML table */
+tr:nth-child(2n) /* same */
+
+ +

If both a and b are equal to zero, the +pseudo-class represents no element in the document tree.

+ +

The value a can be negative, but only the positive +values of an+b, for +n≥0, may represent an element in the document +tree.

+ +
+

Example:

+
html|tr:nth-child(-n+6)  /* represents the 6 first rows of XHTML tables */
+
+ +

When the value b is negative, the "+" character in the +expression must be removed (it is effectively replaced by the "-" +character indicating the negative value of b).

+ +
+

Examples:

+
:nth-child(10n-1)  /* represents the 9th, 19th, 29th, etc, element */
+:nth-child(10n+9)  /* Same */
+:nth-child(10n+-1) /* Syntactically invalid, and would be ignored */
+
+ + +
:nth-last-child() pseudo-class
+ +

The :nth-last-child(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings +after it in the document tree, for a given positive +integer or zero value of n, and has a parent element. See +:nth-child() pseudo-class for the syntax of its argument. +It also accepts the 'even' and 'odd' values +as arguments. + + +

+

Examples:

+
tr:nth-last-child(-n+2)    /* represents the two last rows of an HTML table */
+
+foo:nth-last-child(odd)    /* represents all odd foo elements in their parent element,
+                              counting from the last one */
+
+ + +
:nth-of-type() pseudo-class
+ +

The :nth-of-type(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings with the same +element name before it in the document tree, for a +given zero or positive integer value of n, and has a +parent element. In other words, this matches the bth child +of that type after all the children of that type have been split into +groups of a elements each. See :nth-child() pseudo-class +for the syntax of its argument. It also accepts the +'even' and 'odd' values. + + +

+

CSS example:

+

This allows an author to alternate the position of floated images:

+
img:nth-of-type(2n+1) { float: right; }
+img:nth-of-type(2n) { float: left; }
+
+ + +
:nth-last-of-type() pseudo-class
+ +

The :nth-last-of-type(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings with the same +element name after it in the document tree, for a +given zero or positive integer value of n, and has a +parent element. See :nth-child() pseudo-class for the +syntax of its argument. It also accepts the 'even' and 'odd' values. + + +

+

Example:

+

To represent all h2 children of an XHTML + body except the first and last, one could use the + following selector:

+
body > h2:nth-of-type(n+2):nth-last-of-type(n+2)
+

In this case, one could also use :not(), although the + selector ends up being just as long:

+
body > h2:not(:first-of-type):not(:last-of-type)
+
+ + +
:first-child pseudo-class
+ +

Same as :nth-child(1). The :first-child pseudo-class +represents an element that is the first child of some other element. + + +

+

Examples:

+

The following selector represents a p element that is + the first child of a div element:

+
div > p:first-child
+

This selector can represent the p inside the + div of the following fragment:

+
<p> The last P before the note.</p>
+<div class="note">
+   <p> The first P inside the note.</p>
+</div>
but cannot represent the second p in the following +fragment: +
<p> The last P before the note.</p>
+<div class="note">
+   <h2> Note </h2>
+   <p> The first P inside the note.</p>
+</div>
+

The following two selectors are usually equivalent:

+
* > a:first-child /* a is first child of any element */
+a:first-child /* Same (assuming a is not the root element) */
+
+ +
:last-child pseudo-class
+ +

Same as :nth-last-child(1). The :last-child pseudo-class +represents an element that is the last child of some other element. + +

+

Example:

+

The following selector represents a list item li that + is the last child of an ordered list ol. +

ol > li:last-child
+
+ +
:first-of-type pseudo-class
+ +

Same as :nth-of-type(1). The :first-of-type pseudo-class +represents an element that is the first sibling of its type in the list of +children of its parent element. + +

+

Example:

+

The following selector represents a definition title +dt inside a definition list dl, this +dt being the first of its type in the list of children of +its parent element.

+
dl dt:first-of-type
+

It is a valid description for the first two dt +elements in the following example but not for the third one:

+
<dl>
+ <dt>gigogne</dt>
+ <dd>
+  <dl>
+   <dt>fusée</dt>
+   <dd>multistage rocket</dd>
+   <dt>table</dt>
+   <dd>nest of tables</dd>
+  </dl>
+ </dd>
+</dl>
+
+ +
:last-of-type pseudo-class
+ +

Same as :nth-last-of-type(1). The +:last-of-type pseudo-class represents an element that is +the last sibling of its type in the list of children of its parent +element.

+ +
+

Example:

+

The following selector represents the last data cell + td of a table row.

+
tr > td:last-of-type
+
+ +
:only-child pseudo-class
+ +

Represents an element that has a parent element and whose parent +element has no other element children. Same as +:first-child:last-child or +:nth-child(1):nth-last-child(1), but with a lower +specificity.

+ +
:only-of-type pseudo-class
+ +

Represents an element that has a parent element and whose parent +element has no other element children with the same element name. Same +as :first-of-type:last-of-type or +:nth-of-type(1):nth-last-of-type(1), but with a lower +specificity.

+ + +
:empty pseudo-class
+ +

The :empty pseudo-class represents an element that has +no children at all. In terms of the DOM, only element nodes and text +nodes (including CDATA nodes and entity references) whose data has a +non-zero length must be considered as affecting emptiness; comments, +PIs, and other nodes must not affect whether an element is considered +empty or not.

+ +
+

Examples:

+

p:empty is a valid representation of the following fragment:

+
<p></p>
+

foo:empty is not a valid representation for the + following fragments:

+
<foo>bar</foo>
+
<foo><bar>bla</bar></foo>
+
<foo>this is not <bar>:empty</bar></foo>
+
+ +

6.6.6. Blank

+ +

This section intentionally left blank.

+ + +

6.6.7. The negation pseudo-class

+ +

The negation pseudo-class, :not(X), is a +functional notation taking a simple +selector (excluding the negation pseudo-class itself and +pseudo-elements) as an argument. It represents an element that is not +represented by the argument. + + + +

+

Examples:

+

The following CSS selector matches all button + elements in an HTML document that are not disabled.

+
button:not([DISABLED])
+

The following selector represents all but FOO + elements.

+
*:not(FOO)
+

The following group of selectors represents all HTML elements + except links.

+
html|*:not(:link):not(:visited)
+
+ +

Default namespace declarations do not affect the argument of the +negation pseudo-class unless the argument is a universal selector or a +type selector.

+ +
+

Examples:

+

Assuming that the default namespace is bound to + "http://example.com/", the following selector represents all + elements that are not in that namespace:

+
*|*:not(*)
+

The following CSS selector matches any element being hovered, + regardless of its namespace. In particular, it is not limited to + only matching elements in the default namespace that are not being + hovered, and elements not in the default namespace don't match the + rule when they are being hovered.

+
*|*:not(:hover)
+
+ +

Note: the :not() pseudo allows +useless selectors to be written. For instance :not(*|*), +which represents no element at all, or foo:not(bar), +which is equivalent to foo but with a higher +specificity.

+ +

7. Pseudo-elements

+ +

Pseudo-elements create abstractions about the document tree beyond +those specified by the document language. For instance, document +languages do not offer mechanisms to access the first letter or first +line of an element's content. Pseudo-elements allow designers to refer +to this otherwise inaccessible information. Pseudo-elements may also +provide designers a way to refer to content that does not exist in the +source document (e.g., the ::before and +::after pseudo-elements give access to generated +content).

+ +

A pseudo-element is made of two colons (::) followed +by the name of the pseudo-element.

+ +

This :: notation is introduced by the current document +in order to establish a discrimination between pseudo-classes and +pseudo-elements. For compatibility with existing style sheets, user +agents must also accept the previous one-colon notation for +pseudo-elements introduced in CSS levels 1 and 2 (namely, +:first-line, :first-letter, +:before and :after). This compatibility is +not allowed for the new pseudo-elements introduced in CSS level 3.

+ +

Only one pseudo-element may appear per selector, and if present it +must appear after the sequence of simple selectors that represents the +subjects of the selector. A +future version of this specification may allow multiple +pesudo-elements per selector.

+ +

7.1. The ::first-line pseudo-element

+ +

The ::first-line pseudo-element describes the contents +of the first formatted line of an element. + +

+

CSS example:

+
p::first-line { text-transform: uppercase }
+

The above rule means "change the letters of the first line of every +paragraph to uppercase".

+
+ +

The selector p::first-line does not match any real +HTML element. It does match a pseudo-element that conforming user +agents will insert at the beginning of every paragraph.

+ +

Note that the length of the first line depends on a number of +factors, including the width of the page, the font size, etc. Thus, +an ordinary HTML paragraph such as:

+ +
+<P>This is a somewhat long HTML 
+paragraph that will be broken into several 
+lines. The first line will be identified
+by a fictional tag sequence. The other lines 
+will be treated as ordinary lines in the 
+paragraph.</P>
+
+ +

the lines of which happen to be broken as follows: + +

+THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT
+will be broken into several lines. The first
+line will be identified by a fictional tag 
+sequence. The other lines will be treated as 
+ordinary lines in the paragraph.
+
+ +

This paragraph might be "rewritten" by user agents to include the +fictional tag sequence for ::first-line. This +fictional tag sequence helps to show how properties are inherited.

+ +
+<P><P::first-line> This is a somewhat long HTML 
+paragraph that </P::first-line> will be broken into several
+lines. The first line will be identified 
+by a fictional tag sequence. The other lines 
+will be treated as ordinary lines in the 
+paragraph.</P>
+
+ +

If a pseudo-element breaks up a real element, the desired effect +can often be described by a fictional tag sequence that closes and +then re-opens the element. Thus, if we mark up the previous paragraph +with a span element:

+ +
+<P><SPAN class="test"> This is a somewhat long HTML
+paragraph that will be broken into several
+lines.</SPAN> The first line will be identified
+by a fictional tag sequence. The other lines 
+will be treated as ordinary lines in the 
+paragraph.</P>
+
+ +

the user agent could simulate start and end tags for +span when inserting the fictional tag sequence for +::first-line. + +

+<P><P::first-line><SPAN class="test"> This is a
+somewhat long HTML
+paragraph that will </SPAN></P::first-line><SPAN class="test"> be
+broken into several
+lines.</SPAN> The first line will be identified
+by a fictional tag sequence. The other lines
+will be treated as ordinary lines in the 
+paragraph.</P>
+
+ +

In CSS, the ::first-line pseudo-element can only be +attached to a block-level element, an inline-block, a table-caption, +or a table-cell.

+ +

The "first formatted line" of an +element may occur inside a +block-level descendant in the same flow (i.e., a block-level +descendant that is not positioned and not a float). E.g., the first +line of the div in <DIV><P>This +line...</P></DIV> is the first line of the p (assuming +that both p and div are block-level). + +

The first line of a table-cell or inline-block cannot be the first +formatted line of an ancestor element. Thus, in <DIV><P +STYLE="display: inline-block">Hello<BR>Goodbye</P> +etcetera</DIV> the first formatted line of the +div is not the line "Hello". + +

Note that the first line of the p in this +fragment: <p><br>First... doesn't contain any +letters (assuming the default style for br in HTML +4). The word "First" is not on the first formatted line. + +

A UA should act as if the fictional start tags of the +::first-line pseudo-elements were nested just inside the +innermost enclosing block-level element. (Since CSS1 and CSS2 were +silent on this case, authors should not rely on this behavior.) Here +is an example. The fictional tag sequence for

+ +
+<DIV>
+  <P>First paragraph</P>
+  <P>Second paragraph</P>
+</DIV>
+
+ +

is

+ +
+<DIV>
+  <P><DIV::first-line><P::first-line>First paragraph</P::first-line></DIV::first-line></P>
+  <P><P::first-line>Second paragraph</P::first-line></P>
+</DIV>
+
+ +

The ::first-line pseudo-element is similar to an +inline-level element, but with certain restrictions. In CSS, the +following properties apply to a ::first-line +pseudo-element: font properties, color property, background +properties, 'word-spacing', 'letter-spacing', 'text-decoration', +'vertical-align', 'text-transform', 'line-height'. UAs may apply other +properties as well.

+ + +

7.2. The ::first-letter pseudo-element

+ +

The ::first-letter pseudo-element represents the first +letter of the first line of a block, if it is not preceded by any +other content (such as images or inline tables) on its line. The +::first-letter pseudo-element may be used for "initial caps" and "drop +caps", which are common typographical effects. This type of initial +letter is similar to an inline-level element if its 'float' property +is 'none'; otherwise, it is similar to a floated element.

+ +

In CSS, these are the properties that apply to ::first-letter +pseudo-elements: font properties, 'text-decoration', 'text-transform', +'letter-spacing', 'word-spacing' (when appropriate), 'line-height', +'float', 'vertical-align' (only if 'float' is 'none'), margin +properties, padding properties, border properties, color property, +background properties. UAs may apply other properties as well. To +allow UAs to render a typographically correct drop cap or initial cap, +the UA may choose a line-height, width and height based on the shape +of the letter, unlike for normal elements.

+ +
+

Example:

+

This example shows a possible rendering of an initial cap. Note +that the 'line-height' that is inherited by the ::first-letter +pseudo-element is 1.1, but the UA in this example has computed the +height of the first letter differently, so that it doesn't cause any +unnecessary space between the first two lines. Also note that the +fictional start tag of the first letter is inside the span, and thus +the font weight of the first letter is normal, not bold as the span: +

+p { line-height: 1.1 }
+p::first-letter { font-size: 3em; font-weight: normal }
+span { font-weight: bold }
+...
+<p><span>Het hemelsche</span> gerecht heeft zich ten lange lesten<br>
+Erbarremt over my en mijn benaeuwde vesten<br>
+En arme burgery, en op mijn volcx gebed<br>
+En dagelix geschrey de bange stad ontzet.
+
+
+

Image illustrating the ::first-letter pseudo-element +

+
+ +
+

The following CSS will make a drop cap initial letter span about two lines:

+ +
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+ <HEAD>
+  <TITLE>Drop cap initial letter</TITLE>
+  <STYLE type="text/css">
+   P               { font-size: 12pt; line-height: 1.2 }
+   P::first-letter { font-size: 200%; font-weight: bold; float: left }
+   SPAN            { text-transform: uppercase }
+  </STYLE>
+ </HEAD>
+ <BODY>
+  <P><SPAN>The first</SPAN> few words of an article
+    in The Economist.</P>
+ </BODY>
+</HTML>
+
+ +

This example might be formatted as follows:

+ +
+

Image illustrating the combined effect of the ::first-letter and ::first-line pseudo-elements

+
+ +

The fictional tag sequence is:

+ +
+<P>
+<SPAN>
+<P::first-letter>
+T
+</P::first-letter>he first
+</SPAN> 
+few words of an article in the Economist.
+</P>
+
+ +

Note that the ::first-letter pseudo-element tags abut +the content (i.e., the initial character), while the ::first-line +pseudo-element start tag is inserted right after the start tag of the +block element.

+ +

In order to achieve traditional drop caps formatting, user agents +may approximate font sizes, for example to align baselines. Also, the +glyph outline may be taken into account when formatting.

+ +

Punctuation (i.e, characters defined in Unicode in the "open" (Ps), +"close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po) +punctuation classes), that precedes or follows the first letter should +be included. [UNICODE]

+ +
+

Quotes that precede the
+first letter should be included.

+
+ +

The ::first-letter also applies if the first letter is +in fact a digit, e.g., the "6" in "67 million dollars is a lot of +money."

+ +

In CSS, the ::first-letter pseudo-element applies to +block, list-item, table-cell, table-caption, and inline-block +elements. A future version of this specification +may allow this pesudo-element to apply to more element +types.

+ +

The ::first-letter pseudo-element can be used with all +such elements that contain text, or that have a descendant in the same +flow that contains text. A UA should act as if the fictional start tag +of the ::first-letter pseudo-element is just before the first text of +the element, even if that first text is in a descendant.

+ +
+

Example:

+

The fictional tag sequence for this HTMLfragment: +

<div>
+<p>The first text.
+

is: +

<div>
+<p><div::first-letter><p::first-letter>T</...></...>he first text.
+
+ +

The first letter of a table-cell or inline-block cannot be the +first letter of an ancestor element. Thus, in <DIV><P +STYLE="display: inline-block">Hello<BR>Goodbye</P> +etcetera</DIV> the first letter of the div is not the +letter "H". In fact, the div doesn't have a first letter. + +

The first letter must occur on the first formatted line. For example, in +this fragment: <p><br>First... the first line +doesn't contain any letters and ::first-letter doesn't +match anything (assuming the default style for br in HTML +4). In particular, it does not match the "F" of "First." + +

In CSS, if an element is a list item ('display: list-item'), the +::first-letter applies to the first letter in the +principal box after the marker. UAs may ignore +::first-letter on list items with 'list-style-position: +inside'. If an element has ::before or +::after content, the ::first-letter applies +to the first letter of the element including that content. + +

+

Example:

+

After the rule 'p::before {content: "Note: "}', the selector +'p::first-letter' matches the "N" of "Note".

+
+ +

Some languages may have specific rules about how to treat certain +letter combinations. In Dutch, for example, if the letter combination +"ij" appears at the beginning of a word, both letters should be +considered within the ::first-letter pseudo-element. + +

If the letters that would form the ::first-letter are not in the +same element, such as "'T" in <p>'<em>T..., the UA +may create a ::first-letter pseudo-element from one of the elements, +both elements, or simply not create a pseudo-element.

+ +

Similarly, if the first letter(s) of the block are not at the start +of the line (for example due to bidirectional reordering), then the UA +need not create the pseudo-element(s). + +

+

Example:

+

The following example illustrates +how overlapping pseudo-elements may interact. The first letter of +each P element will be green with a font size of '24pt'. The rest of +the first formatted line will be 'blue' while the rest of the +paragraph will be 'red'.

+ +
p { color: red; font-size: 12pt }
+p::first-letter { color: green; font-size: 200% }
+p::first-line { color: blue }
+
+<P>Some text that ends up on two lines</P>
+ +

Assuming that a line break will occur before the word "ends", the +fictional tag +sequence for this fragment might be:

+ +
<P>
+<P::first-line>
+<P::first-letter> 
+S 
+</P::first-letter>ome text that 
+</P::first-line> 
+ends up on two lines 
+</P>
+ +

Note that the ::first-letter element is inside the ::first-line +element. Properties set on ::first-line are inherited by +::first-letter, but are overridden if the same property is set on +::first-letter.

+
+ + +

7.3. The ::selection pseudo-element

+ +

The ::selection pseudo-element applies to the portion +of a document that has been highlighted by the user. This also +applies, for example, to selected text within an editable text +field. This pseudo-element should not be confused with the :checked pseudo-class (which used to be +named :selected) + +

Although the ::selection pseudo-element is dynamic in +nature, and is altered by user action, it is reasonable to expect that +when a UA re-renders to a static medium (such as a printed page, see +[CSS21]) which was originally rendered to a +dynamic medium (like screen), the UA may wish to transfer the current +::selection state to that other medium, and have all the +appropriate formatting and rendering take effect as well. This is not +required — UAs may omit the ::selection +pseudo-element for static media. + +

These are the CSS properties that apply to ::selection +pseudo-elements: color, background, cursor (optional), outline +(optional). The computed value of the 'background-image' property on +::selection may be ignored. + + +

7.4. The ::before and ::after pseudo-elements

+ +

The ::before and ::after pseudo-elements +can be used to describe generated content before or after an element's +content. They are explained in CSS 2.1 [CSS21].

+ +

When the ::first-letter and ::first-line +pseudo-elements are combined with ::before and +::after, they apply to the first letter or line of the +element including the inserted text.

+ +

8. Combinators

+ +

8.1. Descendant combinator

+ +

At times, authors may want selectors to describe an element that is +the descendant of another element in the document tree (e.g., "an +EM element that is contained within an H1 +element"). Descendant combinators express such a relationship. A +descendant combinator is white space that +separates two sequences of simple selectors. A selector of the form +"A B" represents an element B that is an +arbitrary descendant of some ancestor element A. + +

+

Examples:

+

For example, consider the following selector:

+
h1 em
+

It represents an em element being the descendant of + an h1 element. It is a correct and valid, but partial, + description of the following fragment:

+
<h1>This <span class="myclass">headline
+is <em>very</em> important</span></h1>
+

The following selector:

+
div * p
+

represents a p element that is a grandchild or later + descendant of a div element. Note the whitespace on + either side of the "*" is not part of the universal selector; the + whitespace is a combinator indicating that the DIV must be the + ancestor of some element, and that that element must be an ancestor + of the P.

+

The following selector, which combines descendant combinators and + attribute selectors, represents an + element that (1) has the href attribute set and (2) is + inside a p that is itself inside a div:

+
div p *[href]
+
+ +

8.2. Child combinators

+ +

A child combinator describes a childhood relationship +between two elements. A child combinator is made of the +"greater-than sign" (>) character and +separates two sequences of simple selectors. + + +

+

Examples:

+

The following selector represents a p element that is + child of body:

+
body > p
+

The following example combines descendant combinators and child + combinators.

+
div ol>li p
+

It represents a p element that is a descendant of an + li element; the li element must be the + child of an ol element; the ol element must + be a descendant of a div. Notice that the optional white + space around the ">" combinator has been left out.

+
+ +

For information on selecting the first child of an element, please +see the section on the :first-child pseudo-class +above.

+ +

8.3. Sibling combinators

+ +

There are two different sibling combinators: the adjacent sibling +combinator and the general sibling combinator. In both cases, +non-element nodes (e.g. text between elements) are ignored when +considering adjacency of elements.

+ +

8.3.1. Adjacent sibling combinator

+ +

The adjacent sibling combinator is made of the "plus +sign" (U+002B, +) character that separates two +sequences of simple selectors. The elements represented by the two +sequences share the same parent in the document tree and the element +represented by the first sequence immediately precedes the element +represented by the second one.

+ +
+

Examples:

+

The following selector represents a p element + immediately following a math element:

+
math + p
+

The following selector is conceptually similar to the one in the + previous example, except that it adds an attribute selector — it + adds a constraint to the h1 element, that it must have + class="opener":

+
h1.opener + h2
+
+ + +

8.3.2. General sibling combinator

+ +

The general sibling combinator is made of the "tilde" +(U+007E, ~) character that separates two sequences of +simple selectors. The elements represented by the two sequences share +the same parent in the document tree and the element represented by +the first sequence precedes (not necessarily immediately) the element +represented by the second one.

+ +
+

Example:

+
h1 ~ pre
+

represents a pre element following an h1. It + is a correct and valid, but partial, description of:

+
<h1>Definition of the function a</h1>
+<p>Function a(x) has to be applied to all figures in the table.</p>
+<pre>function a(x) = 12x/13.5</pre>
+
+ +

9. Calculating a selector's specificity

+ +

A selector's specificity is calculated as follows:

+ +
    +
  • count the number of ID selectors in the selector (= a)
  • +
  • count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b)
  • +
  • count the number of element names in the selector (= c)
  • +
  • ignore pseudo-elements
  • +
+ +

Selectors inside the negation pseudo-class +are counted like any other, but the negation itself does not count as +a pseudo-class.

+ +

Concatenating the three numbers a-b-c (in a number system with a +large base) gives the specificity.

+ +
+

Examples:

+
*               /* a=0 b=0 c=0 -> specificity =   0 */
+LI              /* a=0 b=0 c=1 -> specificity =   1 */
+UL LI           /* a=0 b=0 c=2 -> specificity =   2 */
+UL OL+LI        /* a=0 b=0 c=3 -> specificity =   3 */
+H1 + *[REL=up]  /* a=0 b=1 c=1 -> specificity =  11 */
+UL OL LI.red    /* a=0 b=1 c=3 -> specificity =  13 */
+LI.red.level    /* a=0 b=2 c=1 -> specificity =  21 */
+#x34y           /* a=1 b=0 c=0 -> specificity = 100 */
+#s12:not(FOO)   /* a=1 b=0 c=1 -> specificity = 101 */
+
+
+ +

Note: the specificity of the styles +specified in an HTML style attribute is described in CSS +2.1. [CSS21].

+ +

10. The grammar of Selectors

+ +

10.1. Grammar

+ +

The grammar below defines the syntax of Selectors. It is globally +LL(1) and can be locally LL(2) (but note that most UA's should not use +it directly, since it doesn't express the parsing conventions). The +format of the productions is optimized for human consumption and some +shorthand notations beyond Yacc (see [YACC]) +are used:

+ +
    +
  • *: 0 or more +
  • +: 1 or more +
  • ?: 0 or 1 +
  • |: separates alternatives +
  • [ ]: grouping
  • +
+ +

The productions are:

+ +
selectors_group
+  : selector [ COMMA S* selector ]*
+  ;
+
+selector
+  : simple_selector_sequence [ combinator simple_selector_sequence ]*
+  ;
+
+combinator
+  /* combinators can be surrounded by white space */
+  : PLUS S* | GREATER S* | TILDE S* | S+
+  ;
+
+simple_selector_sequence
+  : [ type_selector | universal ]
+    [ HASH | class | attrib | pseudo | negation ]*
+  | [ HASH | class | attrib | pseudo | negation ]+
+  ;
+
+type_selector
+  : [ namespace_prefix ]? element_name
+  ;
+
+namespace_prefix
+  : [ IDENT | '*' ]? '|'
+  ;
+
+element_name
+  : IDENT
+  ;
+
+universal
+  : [ namespace_prefix ]? '*'
+  ;
+
+class
+  : '.' IDENT
+  ;
+
+attrib
+  : '[' S* [ namespace_prefix ]? IDENT S*
+        [ [ PREFIXMATCH |
+            SUFFIXMATCH |
+            SUBSTRINGMATCH |
+            '=' |
+            INCLUDES |
+            DASHMATCH ] S* [ IDENT | STRING ] S*
+        ]? ']'
+  ;
+
+pseudo
+  /* '::' starts a pseudo-element, ':' a pseudo-class */
+  /* Exceptions: :first-line, :first-letter, :before and :after. */
+  /* Note that pseudo-elements are restricted to one per selector and */
+  /* occur only in the last simple_selector_sequence. */
+  : ':' ':'? [ IDENT | functional_pseudo ]
+  ;
+
+functional_pseudo
+  : FUNCTION S* expression ')'
+  ;
+
+expression
+  /* In CSS3, the expressions are identifiers, strings, */
+  /* or of the form "an+b" */
+  : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
+  ;
+
+negation
+  : NOT S* negation_arg S* ')'
+  ;
+
+negation_arg
+  : type_selector | universal | HASH | class | attrib | pseudo
+  ;
+ + +

10.2. Lexical scanner

+ +

The following is the tokenizer, written in Flex (see +[FLEX]) notation. The tokenizer is +case-insensitive.

+ +

The two occurrences of "\377" represent the highest character +number that current versions of Flex can deal with (decimal 255). They +should be read as "\4177777" (decimal 1114111), which is the highest +possible code point in Unicode/ISO-10646. [UNICODE]

+ +
%option case-insensitive
+
+ident     [-]?{nmstart}{nmchar}*
+name      {nmchar}+
+nmstart   [_a-z]|{nonascii}|{escape}
+nonascii  [^\0-\177]
+unicode   \\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?
+escape    {unicode}|\\[^\n\r\f0-9a-f]
+nmchar    [_a-z0-9-]|{nonascii}|{escape}
+num       [0-9]+|[0-9]*\.[0-9]+
+string    {string1}|{string2}
+string1   \"([^\n\r\f\\"]|\\{nl}|{nonascii}|{escape})*\"
+string2   \'([^\n\r\f\\']|\\{nl}|{nonascii}|{escape})*\'
+invalid   {invalid1}|{invalid2}
+invalid1  \"([^\n\r\f\\"]|\\{nl}|{nonascii}|{escape})*
+invalid2  \'([^\n\r\f\\']|\\{nl}|{nonascii}|{escape})*
+nl        \n|\r\n|\r|\f
+w         [ \t\r\n\f]*
+
+%%
+
+[ \t\r\n\f]+     return S;
+
+"~="             return INCLUDES;
+"|="             return DASHMATCH;
+"^="             return PREFIXMATCH;
+"$="             return SUFFIXMATCH;
+"*="             return SUBSTRINGMATCH;
+{ident}          return IDENT;
+{string}         return STRING;
+{ident}"("       return FUNCTION;
+{num}            return NUMBER;
+"#"{name}        return HASH;
+{w}"+"           return PLUS;
+{w}">"           return GREATER;
+{w}","           return COMMA;
+{w}"~"           return TILDE;
+":not("          return NOT;
+@{ident}         return ATKEYWORD;
+{invalid}        return INVALID;
+{num}%           return PERCENTAGE;
+{num}{ident}     return DIMENSION;
+"<!--"           return CDO;
+"-->"            return CDC;
+
+"url("{w}{string}{w}")"                           return URI;
+"url("{w}([!#$%&*-~]|{nonascii}|{escape})*{w}")"  return URI;
+U\+[0-9a-f?]{1,6}(-[0-9a-f]{1,6})?                return UNICODE_RANGE;
+
+\/\*[^*]*\*+([^/*][^*]*\*+)*\/                    /* ignore comments */
+
+.                return *yytext;
+ + + +

11. Namespaces and down-level clients

+ +

An important issue is the interaction of CSS selectors with XML +documents in web clients that were produced prior to this +document. Unfortunately, due to the fact that namespaces must be +matched based on the URI which identifies the namespace, not the +namespace prefix, some mechanism is required to identify namespaces in +CSS by their URI as well. Without such a mechanism, it is impossible +to construct a CSS style sheet which will properly match selectors in +all cases against a random set of XML documents. However, given +complete knowledge of the XML document to which a style sheet is to be +applied, and a limited use of namespaces within the XML document, it +is possible to construct a style sheet in which selectors would match +elements and attributes correctly.

+ +

It should be noted that a down-level CSS client will (if it +properly conforms to CSS forward compatible parsing rules) ignore all +@namespace at-rules, as well as all style rules that make +use of namespace qualified element type or attribute selectors. The +syntax of delimiting namespace prefixes in CSS was deliberately chosen +so that down-level CSS clients would ignore the style rules rather +than possibly match them incorrectly.

+ +

The use of default namespaces in CSS makes it possible to write +element type selectors that will function in both namespace aware CSS +clients as well as down-level clients. It should be noted that +down-level clients may incorrectly match selectors against XML +elements in other namespaces.

+ +

The following are scenarios and examples in which it is possible to +construct style sheets which would function properly in web clients +that do not implement this proposal.

+ +
    +
  1. + +

    The XML document does not use namespaces.

    + +
      + +
    • In this case, it is obviously not necessary to declare or use + namespaces in the style sheet. Standard CSS element type and + attribute selectors will function adequately in a down-level + client.
    • + +
    • In a CSS namespace aware client, the default behavior of + element selectors matching without regard to namespace will + function properly against all elements, since no namespaces are + present. However, the use of specific element type selectors that + match only elements that have no namespace ("|name") + will guarantee that selectors will match only XML elements that do + not have a declared namespace.
    • + +
    + +
  2. + +
  3. + +

    The XML document defines a single, default namespace used + throughout the document. No namespace prefixes are used in element + names.

    + +
      + +
    • In this case, a down-level client will function as if + namespaces were not used in the XML document at all. Standard CSS + element type and attribute selectors will match against all + elements.
    • + +
    + +
  4. + +
  5. + +

    The XML document does not use a default namespace, all + namespace prefixes used are known to the style sheet author, and + there is a direct mapping between namespace prefixes and namespace + URIs. (A given prefix may only be mapped to one namespace URI + throughout the XML document; there may be multiple prefixes mapped + to the same URI).

    + +
      + +
    • In this case, the down-level client will view and match + element type and attribute selectors based on their fully + qualified name, not the local part as outlined in the Type selectors and Namespaces section. CSS + selectors may be declared using an escaped colon "\:" + to describe the fully qualified names, e.g. + "html\:h1" will match + <html:h1>. Selectors using the qualified name + will only match XML elements that use the same prefix. Other + namespace prefixes used in the XML that are mapped to the same URI + will not match as expected unless additional CSS style rules are + declared for them.
    • + +
    • Note that selectors declared in this fashion will + only match in down-level clients. A CSS namespace aware + client will match element type and attribute selectors based on + the name's local part. Selectors declared with the fully + qualified name will not match (unless there is no namespace prefix + in the fully qualified name).
    • + +
    + +
  6. + +
+ +

In other scenarios: when the namespace prefixes used in the XML are +not known in advance by the style sheet author; or a combination of +elements with no namespace are used in conjunction with elements using +a default namespace; or the same namespace prefix is mapped to +different namespace URIs within the same document, or in +different documents; it is impossible to construct a CSS style sheet +that will function properly against all elements in those documents, +unless, the style sheet is written using a namespace URI syntax (as +outlined in this document or similar) and the document is processed by +a CSS and XML namespace aware client.

+ +

12. Profiles

+ +

Each specification using Selectors must define the subset of W3C +Selectors it allows and excludes, and describe the local meaning of +all the components of that subset.

+ +

Non normative examples: + +

+ + + + + + + + + + + + + + + +
Selectors profile
SpecificationCSS level 1
Acceptstype selectors
class selectors
ID selectors
:link, + :visited and :active pseudo-classes
descendant combinator +
::first-line and ::first-letter pseudo-elements
Excludes + +

universal selector
attribute selectors
:hover and :focus + pseudo-classes
:target pseudo-class
:lang() pseudo-class
all UI + element states pseudo-classes
all structural + pseudo-classes
negation pseudo-class
all + UI element fragments pseudo-elements
::before and ::after + pseudo-elements
child combinators
sibling combinators + +

namespaces

Extra constraintsonly one class selector allowed per sequence of simple + selectors


+ + + + + + + + + + + + + + + +
Selectors profile
SpecificationCSS level 2
Acceptstype selectors
universal selector
attribute presence and + values selectors
class selectors
ID selectors
:link, :visited, + :active, :hover, :focus, :lang() and :first-child pseudo-classes +
descendant combinator
child combinator
adjacent sibling + combinator
::first-line and ::first-letter pseudo-elements
::before + and ::after pseudo-elements
Excludes + +

content selectors
substring matching attribute + selectors
:target pseudo-classes
all UI element + states pseudo-classes
all structural pseudo-classes other + than :first-child
negation pseudo-class
all UI element + fragments pseudo-elements
general sibling combinators + +

namespaces

Extra constraintsmore than one class selector per sequence of simple selectors (CSS1 + constraint) allowed
+ +

In CSS, selectors express pattern matching rules that determine which style +rules apply to elements in the document tree. + +

The following selector (CSS level 2) will match all anchors a +with attribute name set inside a section 1 header h1: +

h1 a[name]
+ +

All CSS declarations attached to such a selector are applied to elements +matching it.

+ +
+ + + + + + + + + + + + + + + + +
Selectors profile
SpecificationSTTS 3
Accepts + +

type selectors
universal selectors
attribute selectors
class + selectors
ID selectors
all structural pseudo-classes
+ all combinators + +

namespaces

Excludesnon-accepted pseudo-classes
pseudo-elements
Extra constraintssome selectors and combinators are not allowed in fragment + descriptions on the right side of STTS declarations.
+ +

Selectors can be used in STTS 3 in two different + manners: +

    +
  1. a selection mechanism equivalent to CSS selection mechanism: declarations + attached to a given selector are applied to elements matching that selector, +
  2. fragment descriptions that appear on the right side of declarations. +
+ +

13. Conformance and requirements

+ +

This section defines conformance with the present specification only. + +

The inability of a user agent to implement part of this specification due to +the limitations of a particular device (e.g., non interactive user agents will +probably not implement dynamic pseudo-classes because they make no sense without +interactivity) does not imply non-conformance. + +

All specifications reusing Selectors must contain a Profile listing the +subset of Selectors it accepts or excludes, and describing the constraints +it adds to the current specification. + +

Invalidity is caused by a parsing error, e.g. an unrecognized token or a token +which is not allowed at the current parsing point. + +

User agents must observe the rules for handling parsing errors: +

    +
  • a simple selector containing an undeclared namespace prefix is invalid
  • +
  • a selector containing an invalid simple selector, an invalid combinator + or an invalid token is invalid.
  • +
  • a group of selectors containing an invalid selector is invalid.
  • +
+ +

Specifications reusing Selectors must define how to handle parsing +errors. (In the case of CSS, the entire rule in which the selector is +used is dropped.)

+ + + +

14. Tests

+ +

This specification has a test +suite allowing user agents to verify their basic conformance to +the specification. This test suite does not pretend to be exhaustive +and does not cover all possible combined cases of Selectors.

+ +

15. Acknowledgements

+ +

The CSS working group would like to thank everyone who has sent +comments on this specification over the years.

+ +

The working group would like to extend special thanks to Donna +McManus, Justin Baker, Joel Sklar, and Molly Ives Brower who perfermed +the final editorial review.

+ +

16. References

+ +
+ +
[CSS1] +
Bert Bos, Håkon Wium Lie; "Cascading Style Sheets, level 1", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999 +
(http://www.w3.org/TR/REC-CSS1) + +
[CSS21] +
Bert Bos, Tantek Çelik, Ian Hickson, Håkon Wium Lie, editors; "Cascading Style Sheets, level 2 revision 1", W3C Working Draft, 13 June 2005 +
(http://www.w3.org/TR/CSS21) + +
[CWWW] +
Martin J. Dürst, François Yergeau, Misha Wolf, Asmus Freytag, Tex Texin, editors; "Character Model for the World Wide Web", W3C Recommendation, 15 February 2005 +
(http://www.w3.org/TR/charmod/) + +
[FLEX] +
"Flex: The Lexical Scanner Generator", Version 2.3.7, ISBN 1882114213 + +
[HTML4] +
Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "HTML 4.01 Specification", W3C Recommendation, 24 December 1999 +
(http://www.w3.org/TR/html4/) + +
[MATH] +
Patrick Ion, Robert Miner, editors; "Mathematical Markup Language (MathML) 1.01", W3C Recommendation, revision of 7 July 1999 +
(http://www.w3.org/TR/REC-MathML/) + +
[RFC3066] +
H. Alvestrand; "Tags for the Identification of Languages", Request for Comments 3066, January 2001 +
(http://www.ietf.org/rfc/rfc3066.txt) + +
[STTS] +
Daniel Glazman; "Simple Tree Transformation Sheets 3", Electricité de France, submission to the W3C, 11 November 1998 +
(http://www.w3.org/TR/NOTE-STTS3) + +
[SVG] +
Jon Ferraiolo, 藤沢 淳, Dean Jackson, editors; "Scalable Vector Graphics (SVG) 1.1 Specification", W3C Recommendation, 14 January 2003 +
(http://www.w3.org/TR/SVG/) + +
[UNICODE]
+
The Unicode Standard, Version 4.1, The Unicode Consortium. Boston, MA, Addison-Wesley, March 2005. ISBN 0-321-18578-1, as amended by Unicode 4.0.1 and Unicode 4.1.0. +
(http://www.unicode.org/versions/)
+ +
[XML10] +
Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, François Yergeau, editors; "Extensible Markup Language (XML) 1.0 (Third Edition)", W3C Recommendation, 4 February 2004 +
(http://www.w3.org/TR/REC-xml/) + +
[XMLNAMES] +
Tim Bray, Dave Hollander, Andrew Layman, editors; "Namespaces in XML", W3C Recommendation, 14 January 1999 +
(http://www.w3.org/TR/REC-xml-names/) + +
[YACC] +
S. C. Johnson; "YACC — Yet another compiler compiler", Technical Report, Murray Hill, 1975 + +
+ + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/.svn/text-base/std_testcase.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/.svn/text-base/std_testcase.php.svn-base new file mode 100644 index 0000000..02220f2 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/.svn/text-base/std_testcase.php.svn-base @@ -0,0 +1,243 @@ +load($str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = null; +$dom->load($str); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// text test +$str = << + +HTML; +$dom->load($str); +assert(count($dom->find('unknown'))==1); +assert(count($dom->find('text'))==1); + +// ----------------------------------------------------------------------------- +// string quote test +$str = << + okok
+ +
+
+ +
+
+ +HTML; +$dom->load($str); +$es = $dom->find('input'); +assert(count($es)==4); +assert($es[0]->onclick=='goto("url0")'); +assert($es[1]->onclick=="goto('url1'+'\'')"); +assert($es[2]->onclick=="goto('url2')"); +assert($es[3]->onclick=='goto("url4"+"\"")'); + +// ----------------------------------------------------------------------------- +// clone test +$str = << + okok
+ +
+
+ +
+
+ +HTML; +$dom->load($str); +$es = $dom->find('input'); +assert(count($es)==4); +assert($es[0]->onclick=='goto("url0")'); +assert($es[1]->onclick=="goto('url1'+'\'')"); +assert($es[2]->onclick=="goto('url2')"); +assert($es[3]->onclick=='goto("url4"+"\"")'); + +unset($es); +$dom2 = clone($dom); +$es = $dom2->find('input'); +assert(count($es)==4); +assert($es[0]->onclick=='goto("url0")'); +assert($es[1]->onclick=="goto('url1'+'\'')"); +assert($es[2]->onclick=="goto('url2')"); +assert($es[3]->onclick=='goto("url4"+"\"")'); + +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert($dom==$str); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// monkey test +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<<<>ab +HTML; +$dom->load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +// $str = <<load($str); +// echo $dom; +// assert($dom==$str); +// assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// rnadom string test +function str_random($length) +{ + $str = ""; + srand((double)microtime()*1000000); + $char_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + $char_list .= "abcdefghijklmnopqrstuvwxyz"; + $char_list .= "1234567890"; + $char_list .= "<>!?[]%^&*()"; + for($i=0; $i<$length; ++$i) + $str .= substr($char_list,(rand()%(strlen($char_list))), 1); + return $str; +} + +for($i=0; $i<60; ++$i) { + $str = str_random($i); + //echo $str."\n
"; + $dom->load($str, false); + //echo $dom->save()."\n
"; + assert($dom==$str); +} + +// ----------------------------------------------------------------------------- +// lowercase test +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('img'))==1); +assert(count($dom->find('IMG'))==1); +assert(isset($dom->find('img', 0)->class)); +assert(!isset($dom->find('img', 0)->CLASS)); +assert($dom->find('img', 0)->class=='class0'); +assert($dom==$str); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('img'))==1); +assert(count($dom->find('IMG'))==1); +assert(isset($dom->find('img', 0)->class)); +assert(!isset($dom->find('img', 0)->CLASS)); +assert($dom->find('img', 0)->class=='class0'); +assert($dom==strtolower($str)); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str, false); +assert(count($dom->find('img'))==0); +assert(count($dom->find('IMG'))==1); +assert(isset($dom->find('IMG', 0)->CLASS)); +assert(!isset($dom->find('IMG', 0)->class)); +assert($dom->find('IMG', 0)->CLASS=='class0'); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/.svn/text-base/strip_testcase.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/.svn/text-base/strip_testcase.php.svn-base new file mode 100644 index 0000000..21af47f --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/.svn/text-base/strip_testcase.php.svn-base @@ -0,0 +1,137 @@ + + + +HTML; +$dom->load($str); +assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// test +$str = << + + + + +HTML; +$dom->load($str); +assert(count($dom->find('code'))==1); +assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +//
 &  test
+$str = <<
+    
+
+HTML; +$dom->load($str); +assert(count($dom->find('pre'))==1); +assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// + +HTML; +$dom->load($str); +assert(count($dom->find('style'))==1); +assert(count($dom->find('script'))==3); + +// ----------------------------------------------------------------------------- +// php short tag test +$str = <<hello + +HTML; +$dom->load($str); +assert($dom->find('a', 0)->href===""); +assert($dom->find('input', 0)->value===""); + +// ----------------------------------------------------------------------------- +// noise stripping test +$str = <<--> + + +HTML; +$dom->load($str); +assert(count($dom->find('img'))==1); +assert($dom==$str); +// ----------------------------------------------- +$str = <<ss + + + + + + + + + + + + + +HTML; +$dom->load($str); +assert(count($dom->find('script'))==8); +assert(count($dom->find('style'))==3); +//echo "\n\n\n\n".$dom->save(); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/all_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/all_test.php new file mode 100644 index 0000000..8574df9 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/all_test.php @@ -0,0 +1,24 @@ +'', 'plain'=>'', 'outer'=>'')) { + $html_dom->load($str); + $e = $html_dom->find($selector, 0); + if (isset($params['inner'])) + assert($e->innertext===$params['inner']); + if (isset($params['plain'])) + assert($e->plaintext===$params['plain']); + if (isset($params['outer'])) + assert($e->outertext===$params['outer']); + assert($html_dom==$str); +} + +foreach (new DirectoryIterator(getcwd()) as $entry) { + if ($entry->isFile() && strpos($entry, '_testcase.')>0) { + echo basename($entry); + require_once($entry); + echo '
...pass!

'; + } +} +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/callback_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/callback_testcase.php new file mode 100644 index 0000000..f64496e --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/callback_testcase.php @@ -0,0 +1,74 @@ +

foo

+HTML; + +function callback_1($e) { + if ($e->tag==='img') + $e->outertext = ''; +} + +$dom->load($str); +$dom->set_callback('callback_1'); +assert($dom=='

foo

'); + +// ----------------------------------------------- +// innertext test +function callback_2($e) { + if ($e->tag==='p') + $e->innertext = 'bar'; +} + +$dom->load($str); +$dom->set_callback('callback_2'); +assert($dom=='

bar

'); + +// ----------------------------------------------- +// attributes test +function callback_3($e) { + if ($e->tag==='img') + $e->src = 'foo'; +} + +$dom->load($str); +$dom->set_callback('callback_3'); +assert($dom=='

foo

'); + +function callback_4($e) { + if ($e->tag==='img') + $e->id = 'foo'; +} + +$dom->set_callback('callback_4'); +assert($dom=='

foo

'); + +// ----------------------------------------------- +// attributes test2 +//$dom = str_get_dom($str); +$dom->load($str); +$dom->remove_callback(); +$dom->find('img', 0)->id = "foo"; +assert($dom=='

foo

'); + +function callback_5($e) { + if ($e->src==='src0') + unset($e->id); +} + +$dom->set_callback('callback_5'); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/dom_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/dom_testcase.php new file mode 100644 index 0000000..6bac5df --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/dom_testcase.php @@ -0,0 +1,386 @@ +load(''); +$e = $html->root; +assert($e->first_child()==null); +assert($e->last_child()==null); +assert($e->next_sibling()==null); +assert($e->prev_sibling()==null); +// ----------------------------------------------- +$str = '
'; +$html->load($str); + +$e = $html->root; +assert($e->first_child()->id=='div1'); +assert($e->last_child()->id=='div1'); +assert($e->next_sibling()==null); +assert($e->prev_sibling()==null); +assert($e->plaintext==''); +assert($e->innertext=='
'); +assert($e->outertext==$str); +// ----------------------------------------------- +$str = << +
+
+
+ +HTML; +$html->load($str); +assert($html==$str); + +$e = $html->find('div#div1', 0); +assert(isset($e->id)==true); +assert(isset($e->_not_exist)==false); +assert($e->first_child()->id=='div10'); +assert($e->last_child()->id=='div12'); +assert($e->next_sibling()==null); +assert($e->prev_sibling()==null); +// ----------------------------------------------- +$str = << +
+ +
+
+
+
+
+
+HTML; +$html->load($str); +assert($html==$str); + +$e = $html->find('div#div1', 0); +assert($e->first_child()->id=='div10'); +assert($e->last_child()->id=='div12'); +assert($e->next_sibling()->id=='div2'); +assert($e->prev_sibling()->id=='div0'); + +$e = $html->find('div#div2', 0); +assert($e->first_child()==null); +assert($e->last_child()==null); + +$e = $html->find('div#div0 div#div00', 0); +assert($e->first_child()==null); +assert($e->last_child()==null); +assert($e->next_sibling()==null); +assert($e->prev_sibling()==null); +// ----------------------------------------------- +$str = << +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+HTML; +$html->load($str); +assert($html==$str); + +assert($html->find("#div1", 0)->id=='div1'); +assert($html->find("#div1", 0)->children(0)->id=='div10'); +assert($html->find("#div1", 0)->children(1)->children(1)->id=='div111'); +assert($html->find("#div1", 0)->children(1)->children(1)->children(2)->id=='div1112'); + +// ----------------------------------------------------------------------------- +// no value attr test +$str = << + aaa
+ bbb
+ ccc
+ +HTML; +$html->load($str); +assert($html==$str); + +$counter = 0; +foreach($html->find('input[type=checkbox]') as $checkbox) { + if (isset($checkbox->checked)) { + assert($checkbox->value=="checkbox$counter"); + $counter += 2; + } +} + +$counter = 0; +foreach($html->find('input[type=checkbox]') as $checkbox) { + if ($checkbox->checked) { + assert($checkbox->value=="checkbox$counter"); + $counter += 2; + } +} + +$es = $html->find('input[type=checkbox]'); +$es[1]->checked = true; +assert($es[1]->outertext==''); +$es[0]->checked = false; +assert($es[0]==''); +$es[0]->checked = true; +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// remove attr test +$str = << + +HTML; + +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox0]', 0); +$e->name = null; +assert($e==''); +$e->type = null; +assert($e==''); + +// ----------------------------------------------- +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox0]', 0); +$e->name = null; +assert($e==''); +$e->type = null; +assert($e==''); + +// ----------------------------------------------- +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox1]', 0); +$e->value = null; +assert($e==""); +$e->type = null; +assert($e==""); +$e->name = null; +assert($e==''); + +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox1]', 0); +$e->type = null; +assert($e==""); +$e->name = null; +assert($e==''); +$e->value = null; +assert($e==''); + +// ----------------------------------------------------------------------------- +// remove no value attr test +$str = << + +HTML; +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox1]', 0); +$e->type = NULL; +assert($e==""); +$e->name = null; +assert($e==""); +$e->checked = NULL; +assert($e==""); + +// ----------------------------------------------- +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox0]', 0); +$e->type = NULL; +assert($e==""); +$e->name = NULL; +assert($e==''); +$e->checked = NULL; +assert($e==''); + +$html->load($str); +assert($html==$str); +$e = $html->find('[name=checkbox0]', 0); +$e->checked = NULL; +assert($e==""); +$e->name = NULL; +assert($e==''); +$e->type = NULL; +assert($e==""); + +// ----------------------------------------------------------------------------- +// extract text +$str = <<okok +HTML; +$html->load($str); +assert($html==$str); +assert($html->plaintext=='okok'); + +$str = <<okok +HTML; +$html->load($str); +assert($html==$str); +assert($html->plaintext=='okok'); + +$str = <<okok +HTML; +$html->load($str); +assert($html==$str); +assert($html->plaintext=='okok'); + +$str = <<okok +HTML; +$html->load($str); +assert($html==$str); +assert($html->plaintext=='okok'); + + +// ----------------------------------------------------------------------------- +// old fashion camel naming conventions test +$str = << + + +HTML; +$html->load($str); +assert($html==$str); + +assert($html->getElementByTagName('input')->hasAttribute('checked')==true); +assert($html->getElementsByTagName('input', 1)->hasAttribute('checked')==false); +assert($html->getElementsByTagName('input', 1)->hasAttribute('not_exist')==false); + +assert($html->find('input', 0)->value==$html->getElementByTagName('input')->getAttribute('value')); +assert($html->find('input', 1)->value==$html->getElementsByTagName('input', 1)->getAttribute('value')); + +assert($html->find('#checkbox1', 0)->value==$html->getElementById('checkbox1')->getAttribute('value')); +assert($html->find('#checkbox2', 0)->value==$html->getElementsById('checkbox2', 0)->getAttribute('value')); + +$e = $html->find('[name=checkbox]', 0); +assert($e->getAttribute('value')=='checkbox'); +assert($e->getAttribute('checked')==true); +assert($e->getAttribute('not_exist')==''); + +$e->setAttribute('value', 'okok'); +assert($e==''); + +$e->setAttribute('checked', false); +assert($e==''); + +$e->setAttribute('checked', true); +assert($e==''); + +$e->removeAttribute('value'); +assert($e==''); + +$e->removeAttribute('checked'); +assert($e==''); + +// ----------------------------------------------- +$str = << +
+
+
+ +HTML; +$html->load($str); +assert($html==$str); + +$e = $html->find('div#div1', 0); +assert($e->firstChild()->getAttribute('id')=='div10'); +assert($e->lastChild()->getAttribute('id')=='div12'); +assert($e->nextSibling()==null); +assert($e->previousSibling()==null); + +// ----------------------------------------------- +$str = << +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+HTML; +$html->load($str); +assert($html==$str); + +assert($html->getElementById("div1")->hasAttribute('id')==true); +assert($html->getElementById("div1")->hasAttribute('not_exist')==false); + +assert($html->getElementById("div1")->getAttribute('id')=='div1'); +assert($html->getElementById("div1")->childNodes(0)->getAttribute('id')=='div10'); +assert($html->getElementById("div1")->childNodes(1)->childNodes(1)->getAttribute('id')=='div111'); +assert($html->getElementById("div1")->childNodes(1)->childNodes(1)->childNodes(2)->getAttribute('id')=='div1112'); + +assert($html->getElementsById("div1", 0)->childNodes(1)->id=='div11'); +assert($html->getElementsById("div1", 0)->childNodes(1)->childNodes(1)->getAttribute('id')=='div111'); +assert($html->getElementsById("div1", 0)->childNodes(1)->childNodes(1)->childNodes(1)->getAttribute('id')=='div1111'); + +// ----------------------------------------------- +$str = << + + + + +HTML; +$html->load($str); + +$ul = $html->find('ul', 0); +assert($ul->first_child()->tag==='ul'); + +// ----------------------------------------------- +$str = << +
  • Item 1 +
      +
    • Sub Item 1
    • +
    • Sub Item 2
    • +
    +
  • +
  • Item 2
  • + +HTML; + +$html->load($str); +assert($html==$str); + +$ul = $html->find('ul', 0); +assert($ul->first_child()->tag==='li'); +assert($ul->first_child()->next_sibling()->tag==='li'); +// ----------------------------------------------------------------------------- +// tear down +$html->clear(); +unset($html); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/element_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/element_testcase.php new file mode 100644 index 0000000..6171dec --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/element_testcase.php @@ -0,0 +1,247 @@ + + + +
    + foo + + +HTML; +$dom->load($str); +assert($dom==$str); +// ----------------------------------------------- +$str = << + + +
    + bar + + +HTML; +$dom->load($str); +$dom->find('span', 0)->innertext = 'bar'; +assert($dom==$str); +// ----------------------------------------------- +$str = << + ok + +
    + bar + + +HTML; +$dom->load($str); +$dom->find('head', 0)->innertext = 'ok'; +assert($dom==$str); +// ----------------------------------------------- +$str = <<foo +HTML; +$dom->load($str); + +$e = $dom->find('b text', 0); +assert($e->innertext=='foo'); +assert($e->outertext=='foo'); +$e->innertext = 'bar'; +assert($e->innertext=='bar'); +assert($e->outertext=='bar'); +$e = $dom->find('b', 0); +assert($e->innertext=='bar'); +assert($e->outertext=='bar'); + +// ----------------------------------------------------------------------------- +// outertext test +$str = << +Head1Head2Head3 +123 + +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); +// ----------------------------------------------- +$str = <<Head1Head2Head3123 +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); + +// ----------------------------------------------- +$str = <<
  • li11
  • li12
    • li21
    • li22
    +HTML; +$dom->load($str); +assert($dom->find('ul', 0)->outertext=='
    • li11
    • li12
    '); +assert($dom->find('ul', 1)->outertext=='
    • li21
    • li22
    '); + +// ----------------------------------------------- +$str = <<
  • li11
  • li12
    • li21
    • li22
    • +HTML; +$dom->load($str); +assert($dom->find('ul', 0)->outertext=='
      • li11
      • li12
        • li21
        • li22
        • '); +assert($dom->find('ul', 1)->outertext=='
          • li21
          • li22
          • '); + +// ----------------------------------------------- +$str = <<
          • li11
          • li12
            • li21
            • li22 +HTML; +$dom->load($str); +assert($dom->find('ul', 0)->outertext=='
              • li11
              • li12
                • li21
                • li22'); +assert($dom->find('ul', 1)->outertext=='
                  • li21
                  • li22'); + +// ----------------------------------------------- +$str = << +Head1Head2Head3 +123 + +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); + +// ----------------------------------------------------------------------------- +// replacement test +$str = <<
                    ok
                    +HTML; +$dom->load($str); +$es = $dom->find('div'); +assert(count($es)==2); +assert($es[0]->innertext=='
                    ok
                    '); +assert($es[0]->outertext=='
                    ok
                    '); + +// test isset +$es[0]->class = 'class_test'; +assert(isset($es[0]->class)===true); +assert(isset($es[0]->okok)===false); + +// test replacement +$es[0]->class = 'class_test'; +assert($es[0]->outertext=='
                    ok
                    '); + +// test replacement +$es[0]->tag = 'span'; +assert($es[0]->outertext=='
                    ok
                    '); + +// test unset (no more support...) +//$dom = str_get_dom($str); +//$es = $dom->find('div'); +//unset($es[0]->class); +//assert($es[0]->outertext=='
                    ok
                    '); + +$dom->load($str); +$es = $dom->find('div'); +unset($es[0]->attr['class']); +assert($es[0]->outertext=='
                    ok
                    '); + +// ----------------------------------------------- +$str = <<blahblah2 +HTML; +$dom->load($str); +$e = $dom->find('select[name=something]', 0); +$e->innertext = ''; +assert($e->outertext ==''); + +// ----------------------------------------------------------------------------- +// nested replacement test +$str = <<
                    ok
                    +HTML; +$dom->load($str); +$es = $dom->find('div'); +assert(count($es)==2); +assert($es[0]->innertext=='
                    ok
                    '); +assert($es[0]->outertext=='
                    ok
                    '); +assert($es[1]->innertext=='ok'); +assert($es[1]->outertext=='
                    ok
                    '); + +// test replacement +$es[1]->innertext = 'okok'; +assert($es[1]->outertext=='
                    okok
                    '); +assert($es[0]->outertext=='
                    okok
                    '); +assert($dom=='
                    okok
                    '); + +$es[1]->class = 'class_test'; +assert($es[1]->outertext=='
                    okok
                    '); +assert($es[0]->outertext=='
                    okok
                    '); +assert($dom=='
                    okok
                    '); + +$es[0]->class = 'class_test'; +assert($es[0]->outertext=='
                    okok
                    '); +assert($dom=='
                    okok
                    '); + +$es[0]->innertext = 'okokok'; +assert($es[0]->outertext=='
                    okokok
                    '); +assert($dom=='
                    okokok
                    '); + +// ----------------------------------------------------------------------------- +//

                    test +$str = << +

                    ok0link0

                    + +
                    +

                    ok2link2

                    + +HTML; +$dom->load($str); +$es = $dom->find('p'); +assert($es[0]->innertext=='ok0link0'); +assert($es[1]->innertext=='ok1link1'); +assert($es[2]->innertext=='ok2link2'); +assert($dom->find('p', 0)->plaintext=='ok0link0'); +assert($dom->find('p', 1)->plaintext=='ok1link1'); +assert($dom->find('p', 2)->plaintext=='ok2link2'); + +$count = 0; +foreach($dom->find('p') as $p) { + $a = $p->find('a'); + assert($a[0]->innertext=='link'.$count); + ++$count; +} + +$es = $dom->find('p a'); +assert($es[0]->innertext=='link0'); +assert($es[1]->innertext=='link1'); +assert($es[2]->innertext=='link2'); +assert($dom->find('p a', 0)->plaintext=='link0'); +assert($dom->find('p a', 1)->plaintext=='link1'); +assert($dom->find('p a', 2)->plaintext=='link2'); + +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// test +$str = << +HTML; +$dom->load($str); +$e = $dom->find('embed', 0); +assert($e->src=='../graphics/sounds/1812over.mid'); +assert($e->height=='60'); +assert($e->width=='144'); +assert($dom==strtolower($str)); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/html/.svn/all-wcprops b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/html/.svn/all-wcprops new file mode 100644 index 0000000..61b4d3b --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/html/.svn/all-wcprops @@ -0,0 +1,5 @@ +K 25 +svn:wc:ra_dav:version-url +V 54 +/svnroot/simplehtmldom/!svn/ver/28/trunk/testcase/html +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/html/.svn/entries b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/html/.svn/entries new file mode 100644 index 0000000..f99c685 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/html/.svn/entries @@ -0,0 +1,28 @@ +10 + +dir +182 +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom/trunk/testcase/html +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom + + + +2008-03-14T14:52:38.823464Z +28 +me578022 + + + + + + + + + + + + + + +d0e60b4b-9046-0410-940c-b97530268c78 + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/invalid_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/invalid_testcase.php new file mode 100644 index 0000000..3e233d5 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/invalid_testcase.php @@ -0,0 +1,658 @@ + +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->id= 'foo'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->id= 'foo'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->id= 'foo'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->id= 'foo'; +$e->class = 'bar'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->id= 'foo'; +$e->class = 'bar'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->id= 'foo'; +$e->class = 'bar'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->class = 'bar'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->class = 'bar'; +assert($e->outertext=='
                    '); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('hr', 0); +$e->class = 'bar'; +assert($e->outertext=='
                    '); + +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +$e = $dom->find('nobr', 0); +assert($e->outertext==''); + +// ----------------------------------------------------------------------------- +// optional closing tags test +$str = << +<.b> + +HTML; +$dom = str_get_html($str); +assert($dom->find('body', 0)->outertext==$str); + +// ----------------------------------------------- +$str = << + + foo + foo2 +HTML; +$dom = str_get_html($str); +assert($dom==$str); +assert($dom->find('html body a', 1)->innertext=='foo2'); + +// ----------------------------------------------- +$str = <<find('html a', 1)===null); +//assert($dom->find('html a', 1)->innertext=='foo2'); + +// ----------------------------------------------- +$str = << +
                    + +HTML; +$dom = str_get_html($str); +assert($dom==$str); +assert($dom->find('body', 0)->outertext==$str); + +// ----------------------------------------------- +$str = << +
                    + +HTML; +$dom = str_get_html($str); + +assert($dom->find('body', 0)->outertext==$str); + +// ----------------------------------------------- +$str = << + + aa + + bb + +HTML; +$dom = str_get_html($str); + +assert($dom==$str); + +// ----------------------------------------------- +$str = << +123 + +HTML; +$dom = str_get_html($str); +assert(count($dom->find('td'))==3); +assert($dom->find('td', 0)->innertext=='1'); +assert($dom->find('td', 0)->outertext=='1'); +assert($dom->find('td', 1)->innertext=='2'); +assert($dom->find('td', 1)->outertext=='2'); +assert($dom->find('td', 2)->innertext=="3\r\n"); +assert($dom->find('td', 2)->outertext=="3\r\n"); + +// ----------------------------------------------- +$str = << + + 1 + 2 + 3 + +HTML; +$dom = str_get_html($str); +assert(count($dom->find('tr td'))==3); + +// ----------------------------------------------- +$str = << +111213 +213243 + +HTML; +$dom = str_get_html($str); +assert(count($dom->find('tr'))==2); +assert(count($dom->find('tr td'))==6); +assert($dom->find('tr', 1)->outertext=="213243\r\n"); +assert($dom->find('tr', 1)->innertext=="213243\r\n"); +assert($dom->find('tr', 1)->plaintext=="213243\r\n"); + +// ----------------------------------------------- +$str = <<1 +

                    2

                    +

                    3 +HTML; +$dom = str_get_html($str); +assert(count($dom->find('p'))==3); +assert($dom->find('p', 0)->innertext=="1\r\n"); +assert($dom->find('p', 0)->outertext=="

                    1\r\n"); +assert($dom->find('p', 1)->innertext=="2"); +assert($dom->find('p', 1)->outertext=="

                    2

                    "); +assert($dom->find('p', 2)->innertext=="3"); +assert($dom->find('p', 2)->outertext=="

                    3"); + +// ----------------------------------------------- +$str = <<1 +2 +3 +HTML; +$dom = str_get_html($str); +assert(count($dom->find('nobr'))==3); +assert($dom->find('nobr', 0)->innertext=="1\r\n"); +assert($dom->find('nobr', 0)->outertext=="1\r\n"); +assert($dom->find('nobr', 1)->innertext=="2"); +assert($dom->find('nobr', 1)->outertext=="2"); +assert($dom->find('nobr', 2)->innertext=="3"); +assert($dom->find('nobr', 2)->outertext=="3"); + +// ----------------------------------------------- +$str = <<

                    1
                    2
                    3
                    4 +HTML; +$dom = str_get_html($str); +assert(count($dom->find('dt'))==2); +assert(count($dom->find('dd'))==2); +assert($dom->find('dt', 0)->innertext=="1"); +assert($dom->find('dt', 0)->outertext=="
                    1"); +assert($dom->find('dt', 1)->innertext=="3"); +assert($dom->find('dt', 1)->outertext=="
                    3"); +assert($dom->find('dd', 0)->innertext=="2"); +assert($dom->find('dd', 0)->outertext=="
                    2"); +assert($dom->find('dd', 1)->innertext=="4"); +assert($dom->find('dd', 1)->outertext=="
                    4"); + +// ----------------------------------------------- +$str = <<
                    11
                    12
                    13
                    14 +
                    21
                    22
                    23
                    24
                    +HTML; +$dom = str_get_html($str); +assert(count($dom->find('#dl1 dt'))==2); +assert(count($dom->find('#dl2 dd'))==2); +assert($dom->find('dl', 0)->innertext=="
                    11
                    12
                    13
                    14"); +assert($dom->find('dl', 1)->innertext=="
                    21
                    22
                    23
                    24"); + +// ----------------------------------------------- +$str = <<
                  • 1
                  • 2
                  +
                  • 3
                  • 4
                  +HTML; +$dom = str_get_html($str); +assert(count($dom->find('ul[id=ul1] li'))==2); + +// ----------------------------------------------------------------------------- +// invalid test +$str = << +
                  + + + +
                  + +HTML; +$dom->load($str); +assert(count($dom->find('img'))==2); +assert(count($dom->find('img'))==2); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                  + + + +
                  + +HTML; + +$dom->load($str); +assert(count($dom->find('span'))==2); +assert(count($dom->find('div'))==2); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                  + + + +
                  + +HTML; +$dom->load($str); +assert(count($dom->find('span'))==3); +assert(count($dom->find('div'))==2); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                • + + +
                +HTML; +$dom->load($str); +assert(count($dom->find('ul'))==2); +assert(count($dom->find('ul ul'))==1); +assert(count($dom->find('li'))==1); +assert(count($dom->find('a'))==1); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                + +
                + +HTML; +$dom->load($str); +assert(count($dom->find('td'))==1); +assert(count($dom->find('div'))==1); +assert(count($dom->find('td div'))==1); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                + +
                + +HTML; +$dom->load($str); +assert(count($dom->find('td'))==1); +assert(count($dom->find('div'))==1); +assert(count($dom->find('td div'))==1); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                + + +HTML; +$dom->load($str); +assert(count($dom->find('td'))==1); +assert(count($dom->find('div'))==1); +assert(count($dom->find('td div'))==1); +assert($dom==$str); + +// ----------------------------------------------- +$str = << + + + + foo + bar + important + +
                + + +HTML; +$dom->load($str); +assert(count($dom->find('table span'))===1); +assert($dom->find('table span', 0)->innertext==='bar'); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +
                + + foo +
                + +HTML; +$dom->load($str); +assert(count($dom->find('td div font b'))==1); +assert($dom==$str); + +// ----------------------------------------------- +$str = << +... then slow into 287 + + + (hanover0...more volume between 202 & 53 + + + (parsippany) + + + ...then sluggish in spots out to dover chester road + + + (randolph) + + ..then traffic light delays out to route 46 + + + (roxbury) + + /eb slow into 202 + + + (morris plains) + + & again into 287 + + + (hanover) + + +. +52 +HTML; +$dom->load($str); +assert(count($dom->find('span td'))==0); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// invalid '<' +// ----------------------------------------------- +$str = <<test :1 gram but <5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but <5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but <5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but<5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but<5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but<5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but< 5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but< 5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but< 5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but < 5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but < 5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but < 5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5< grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5< grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5< grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 < grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 < grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5 < grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 find('td', 0)->plaintext==='test :1 gram but 5 test :1 gram but 5< grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5< grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5< grams'); +assert($dom==$str); + +$str = <<test :1 gram but5< grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but5< grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but5< grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 find('td', 0)->plaintext==='test :1 gram but 5 test :1 gram but 5 +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5find('td', 0)->plaintext==='test :1 gram but 5test :1 gram but 5 +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 find('td', 0)->plaintext==='test :1 gram but 5 ' +// ----------------------------------------------- +$str = <<test :1 gram but >5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but >5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but >5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but>5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but>5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but>5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but> 5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but> 5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but> 5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but > 5 grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but > 5 grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but > 5 grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5> grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5> grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5> grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 > grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 > grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5 > grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 >grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 >grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5 >grams'); +assert($dom==$str); +// ----------------------------------------------- +$str = <<test :1 gram but 5> grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5> grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5> grams'); +assert($dom==$str); + +$str = <<test :1 gram but5> grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but5> grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but5> grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 >grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 >grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5 >grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5>grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5>grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5>grams'); +assert($dom==$str); + +$str = <<test :1 gram but 5 >grams +HTML; +$dom->load($str); +assert($dom->find('td', 0)->innertext==='test :1 gram but 5 >grams'); +assert($dom->find('td', 0)->plaintext==='test :1 gram but 5 >grams'); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// BAD HTML test +$str = <<http://www.oeb.harvard.edu/faculty/girguis/">.

                +HTML; +$dom->load($str); +// ----------------------------------------------- +$str = <<http://www.oeb.harvard.edu/faculty/girguis/"> +HTML; +$dom->load($str); +// ----------------------------------------------- +$str = <<""'''"'" ' +HTML; +$dom->load($str); +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/jquery-1.2.3.pack.js b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/jquery-1.2.3.pack.js new file mode 100644 index 0000000..1ea906d --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/jquery-1.2.3.pack.js @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.3 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ + * $Rev: 106 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>",""]||!f.1f("<9M")&&[1,"<73>",""]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>",""]||!f.1f("<4v")&&[2,"<1O><1U>",""]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>",""]||!f.1f("<7e")&&[2,"<1O><1U><6V>",""]||E.14.1d&&[1,"1x<1x>",""]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K im[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{})) \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/mass_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/mass_test.php new file mode 100644 index 0000000..8d74f90 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/mass_test.php @@ -0,0 +1,68 @@ +'empty.htm', 'url'=>''), + array('name'=>'smarty_1.htm', 'url'=>'guestbook.tpl'), + array('name'=>'smarty_2.htm', 'url'=>'guestbook_form.tpl'), + + array('name'=>'google.htm', 'url'=>'http://www.google.com/'), + array('name'=>'senate.htm', 'url'=>'http://www.senate.gov/legislative/LIS/roll_call_lists/roll_call_vote_cfm.cfm?congress=101&session=2&vote=00317'), + array('name'=>'cyberciti.htm', 'url'=>'http://www.cyberciti.biz/tips/configure-ubuntu-grub-to-load-freebsd.html'), + array('name'=>'myspace.htm', 'url'=>'http://www.myspace.com/'), + array('name'=>'mootools.htm', 'url'=>'http://www.mootools.net/'), + array('name'=>'jquery.htm', 'url'=>'http://jquery.com/'), + array('name'=>'scriptaculo.htm', 'url'=>'http://script.aculo.us/'), + array('name'=>'apache.htm', 'url'=>'http://www.apache.org/'), + array('name'=>'microsoft.htm', 'url'=>'http://www.microsoft.com/'), + array('name'=>'slashdot.htm', 'url'=>'http://www.slashdot.org/'), + array('name'=>'ror.htm', 'url'=>'http://www.rubyonrails.org/'), + array('name'=>'yahoo.htm', 'url'=>'http://www.yahoo.com/'), + array('name'=>'phpbb.htm', 'url'=>'http://www.phpbb.com/'), + array('name'=>'python.htm', 'url'=>'http://www.python.org/'), + array('name'=>'lua.htm', 'url'=>'http://www.lua.org/'), + array('name'=>'php.htm', 'url'=>'http://www.php.net/'), + array('name'=>'ibm.htm', 'url'=>'http://www.ibm.com/'), + array('name'=>'java.htm', 'url'=>'http://java.sun.com/'), + array('name'=>'flickr.htm', 'url'=>'http://www.flickr.com/tour/upload/'), + array('name'=>'amazon.htm', 'url'=>'http://www.amazon.com/'), + array('name'=>'youtube.htm', 'url'=>'http://www.youtube.com/watch?v=kib05Ip6GSo&feature=bz302'), +); + + +echo 'memory: '.memory_get_usage().'
                '; +$dom = new simple_html_dom; + +foreach($files as $f) { + // get file from url + if($f['url']!='') file_put_contents($dir.$f['name'], file_get_contents($f['url'])); + else file_put_contents($dir.$f['name'], ''); + + $start = microtime(); + $dom->load(file_get_contents($dir.$f['name']), false); + list($eu, $es) = explode(' ', microtime()); + list($bu, $bs) = explode(' ', $start); + echo sprintf('(%.1f)', ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000).'
                '; + + if (file_get_contents($dir.$f['name'])!=$dom->save()) { + echo "[failed] ".$f['name']."
                "; + $dom->save($dir.$f['name'].'.error'); + } + else + echo "[success] ".$f['name']."
                "; + + echo 'memory: '.memory_get_usage().'
                '; + + flush(); + set_time_limit(0); +} + +$dom->clear(); +unset($dom); +echo '
                memory: '.memory_get_usage().'
                '; + +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/memory_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/memory_test.php new file mode 100644 index 0000000..1beeba5 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/memory_test.php @@ -0,0 +1,121 @@ +"; +} + +// ----------------------------------------------------------------------------- +$filename = './html/google.htm'; +//$filename = 'test.htm'; + +// ----------------------------------------------------------------------------- +// test_load_file_memory +function test_load_file_memory($filename, $init_size) { + echo '[load file] init memory: '.number_format(memory_get_usage()/1024, 0, '.', ',').'
                '; + echo '--------------------------------------------------------------------
                '; + flush(); + for($i=0; $i<3; ++$i) { + $str = file_get_contents($filename); + + dump_memory($init_size); + unset($str); + } + echo 'after loop: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; + echo '--------------------------------------------------------------------
                '; + flush(); +} + +// ----------------------------------------------------------------------------- +// test_multi_objects_str_get_html +function test_multi_str_get_html($filename, $init_size) { + global $__g_node_mgr; + + $str = file_get_contents($filename); + echo '[str_get_html] init memory: '.number_format(memory_get_usage()/1024, 0, '.', ',').'
                '; + echo '--------------------------------------------------------------------
                '; + flush(); + for($i=0; $i<3; ++$i) { + $html = str_get_html($str); + dump_memory($init_size); + flush(); + } + echo 'after loop: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; + echo '--------------------------------------------------------------------
                '; + flush(); + unset($str); +} + +// ----------------------------------------------------------------------------- +// test_multi_file_get_html +function test_multi_file_get_html($filename, $init_size) { + echo '[file_get_html] init memory: '.number_format(memory_get_usage()/1024, 0, '.', ',').'
                '; + echo '--------------------------------------------------------------------
                '; + flush(); + for($i=0; $i<3; ++$i) { + $html = file_get_html($filename); + //$html->clear(); + unset($html); + dump_memory($init_size); + flush(); + } + echo 'after loop: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; + echo '--------------------------------------------------------------------
                '; + flush(); +} +/* +// ----------------------------------------------------------------------------- +// test_multi_objects_clear_memory +function test_multi_objects_file_get_html_clear_memory($filename) { +echo '

                [one object]
                init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; +echo '------------------------------------------
                '; +flush(); +$html = new simple_html_dom; +for($i=0; $i<3; ++$i) { + $html->load_file($filename); + $html->clear(); + dump_memory(); +} +unset($dom); +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; +flush(); + + +echo '

                [multi objects without clear memory]
                init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; +echo '------------------------------------------
                '; +flush(); +for($i=0; $i<3; ++$i) { + $html = file_get_html($filename); + dump_memory(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                '; +flush(); +*/ + +// ----------------------------------------------------------------------------- +// begin test +$init_size = number_format(memory_get_usage(), 0, '.', ','); +echo 'init ' . $init_size . " bytes
                "; +flush(); + +echo '
                before function: '.number_format(memory_get_usage()/1024, 0, '.', ',').'
                '; +test_load_file_memory($filename, $init_size); +echo 'after function: '.number_format(memory_get_usage()/1024, 0, '.', ',').'

                '; +flush(); + +echo '
                before function: '.number_format(memory_get_usage()/1024, 0, '.', ',').'
                '; +test_multi_file_get_html($filename, $init_size); +echo 'after function: '.number_format(memory_get_usage()/1024, 0, '.', ',').'

                '; +flush(); + +echo '
                before function: '.number_format(memory_get_usage()/1024, 0, '.', ',').'
                '; +test_multi_file_get_html($filename, $init_size); +echo 'after function: '.number_format(memory_get_usage()/1024, 0, '.', ',').'

                '; +flush(); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/misc_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/misc_testcase.php new file mode 100644 index 0000000..fa307b1 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/misc_testcase.php @@ -0,0 +1,60 @@ + + + +HTML; + +$dom->load($str); +$es = $dom->find('img'); +assert(count($es)==3); +assert($es[0]->src=='src0'); +assert($es[1]->src=='src1'); +assert($es[2]->src=='src2'); +assert($es[0]->innertext==''); +assert($es[1]->innertext==''); +assert($es[2]->innertext==''); +assert($es[0]->outertext==''); +assert($es[1]->outertext==''); +assert($es[2]->outertext==''); +assert($dom->find('img', 0)->src=='src0'); +assert($dom->find('img', 1)->src=='src1'); +assert($dom->find('img', 2)->src=='src2'); +assert($dom->find('img', 3)===null); +assert($dom->find('img', 99)===null); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// test error tag +$str = <<

                p1

                +

                + +HTML; + +$dom = str_get_html($str); +$es = $dom->find('img'); +assert(count($es)==3); +assert($es[0]->src=='src0'); +assert($es[1]->src=='src1'); +assert($es[2]->src=='src2'); + +$es = $dom->find('p'); +assert($es[0]->innertext=='p1'); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/performance_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/performance_test.php new file mode 100644 index 0000000..384d2ac --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/performance_test.php @@ -0,0 +1,40 @@ +load($str, false); + + list($eu, $es) = explode(' ', microtime()); + list($bu, $bs) = explode(' ', $start); + + $diff = ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + + if ($diff>$max) + $max = $diff; + + if ($diff<$min) + $min = $diff; + + $all += $diff; + echo sprintf('(%.1f)', $diff).'
                '; +} + +echo '
                -------------------------
                '; +echo 'min: ' . $min . '
                '; +echo 'max: ' . $max . '
                '; + +echo '
                avg: ' . $all/$count . '
                '; +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/all-wcprops b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/all-wcprops new file mode 100644 index 0000000..4251337 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/all-wcprops @@ -0,0 +1,35 @@ +K 25 +svn:wc:ra_dav:version-url +V 57 +/svnroot/simplehtmldom/!svn/ver/130/trunk/testcase/reader +END +selector_testcase.php +K 25 +svn:wc:ra_dav:version-url +V 79 +/svnroot/simplehtmldom/!svn/ver/130/trunk/testcase/reader/selector_testcase.php +END +performance_test.php +K 25 +svn:wc:ra_dav:version-url +V 78 +/svnroot/simplehtmldom/!svn/ver/130/trunk/testcase/reader/performance_test.php +END +element_testcase.php +K 25 +svn:wc:ra_dav:version-url +V 78 +/svnroot/simplehtmldom/!svn/ver/130/trunk/testcase/reader/element_testcase.php +END +all_test.php +K 25 +svn:wc:ra_dav:version-url +V 70 +/svnroot/simplehtmldom/!svn/ver/129/trunk/testcase/reader/all_test.php +END +memory_test.php +K 25 +svn:wc:ra_dav:version-url +V 73 +/svnroot/simplehtmldom/!svn/ver/130/trunk/testcase/reader/memory_test.php +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/dir-prop-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/dir-prop-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/dir-prop-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/entries b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/entries new file mode 100644 index 0000000..2692807 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/entries @@ -0,0 +1,198 @@ +10 + +dir +182 +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom/trunk/testcase/reader +https://simplehtmldom.svn.sourceforge.net/svnroot/simplehtmldom + + + +2008-07-19T21:40:06.854888Z +130 +me578022 +has-props + + + + + + + + + + + + + +d0e60b4b-9046-0410-940c-b97530268c78 + +selector_testcase.php +file + + + + +2010-08-17T19:13:53.174276Z +ed68e3ea92d0c1b58ad31728b0b10023 +2008-07-19T21:40:06.854888Z +130 +me578022 +has-props + + + + + + + + + + + + + + + + + + + + +16889 + +performance_test.php +file + + + + +2010-08-17T19:13:53.181276Z +3659fd102d8a60a35a95e735d9762dd6 +2008-07-19T21:40:06.854888Z +130 +me578022 +has-props + + + + + + + + + + + + + + + + + + + + +1110 + +element_testcase.php +file + + + + +2010-08-17T19:13:53.188276Z +b346a61a9d66e112e5bb8e7cae72dfcf +2008-07-19T21:40:06.854888Z +130 +me578022 +has-props + + + + + + + + + + + + + + + + + + + + +8889 + +all_test.php +file + + + + +2010-08-17T19:13:53.198277Z +2217fa92f9dea484afa35bcd9ded0e15 +2008-07-15T20:06:11.267636Z +129 +me578022 +has-props + + + + + + + + + + + + + + + + + + + + +281 + +memory_test.php +file + + + + +2010-08-17T19:13:53.204277Z +2861f8bf56bfdd23a6444c4dddcfb177 +2008-07-19T21:40:06.854888Z +130 +me578022 +has-props + + + + + + + + + + + + + + + + + + + + +3134 + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/all_test.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/all_test.php.svn-base new file mode 100644 index 0000000..698ec4c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/all_test.php.svn-base @@ -0,0 +1,13 @@ +K 13 +svn:eol-style +V 6 +native +K 12 +svn:keywords +V 3 +Rev +K 13 +svn:mime-type +V 10 +text/x-php +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/element_testcase.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/element_testcase.php.svn-base new file mode 100644 index 0000000..698ec4c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/element_testcase.php.svn-base @@ -0,0 +1,13 @@ +K 13 +svn:eol-style +V 6 +native +K 12 +svn:keywords +V 3 +Rev +K 13 +svn:mime-type +V 10 +text/x-php +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/memory_test.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/memory_test.php.svn-base new file mode 100644 index 0000000..698ec4c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/memory_test.php.svn-base @@ -0,0 +1,13 @@ +K 13 +svn:eol-style +V 6 +native +K 12 +svn:keywords +V 3 +Rev +K 13 +svn:mime-type +V 10 +text/x-php +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/performance_test.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/performance_test.php.svn-base new file mode 100644 index 0000000..698ec4c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/performance_test.php.svn-base @@ -0,0 +1,13 @@ +K 13 +svn:eol-style +V 6 +native +K 12 +svn:keywords +V 3 +Rev +K 13 +svn:mime-type +V 10 +text/x-php +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/selector_testcase.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/selector_testcase.php.svn-base new file mode 100644 index 0000000..698ec4c --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/prop-base/selector_testcase.php.svn-base @@ -0,0 +1,13 @@ +K 13 +svn:eol-style +V 6 +native +K 12 +svn:keywords +V 3 +Rev +K 13 +svn:mime-type +V 10 +text/x-php +END diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/all_test.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/all_test.php.svn-base new file mode 100644 index 0000000..3c3ccf1 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/all_test.php.svn-base @@ -0,0 +1,12 @@ +isFile() && strpos($entry, '_testcase.')>0) { + echo basename($entry); + require_once($entry); + echo '
                ...pass!

                '; + } +} +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/element_testcase.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/element_testcase.php.svn-base new file mode 100644 index 0000000..55b0ec7 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/element_testcase.php.svn-base @@ -0,0 +1,243 @@ +foo +HTML; +$dom->load($str); +assert($dom->find('div', 0)==$str); +// ----------------------------------------------- +$str = <<foo +HTML; +$dom->load($str); +assert($dom->find('div', 0)==$str); + +// ----------------------------------------------------------------------------- +// innertext test +$str = <<
                foo +HTML; +$dom->load($str); +assert($dom==$str); +// ----------------------------------------------- +$str = <<
                bar +HTML; +$dom->find('span', 0)->innertext = 'bar'; +assert($dom==$str); +// ----------------------------------------------- +$str = <<ok
                bar +HTML; +$dom->find('head', 0)->innertext = 'ok'; +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// outertext test +$str = << +Head1Head2Head3 +123 + +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); +// ----------------------------------------------- +$str = <<Head1Head2Head3123 +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); + +// ----------------------------------------------- +$str = <<

              • li11
              • li12
              • li21
              • li22
              +HTML; +$dom->load($str); +assert($dom->find('ul', 0)->outertext=='
              • li11
              • li12
              '); +assert($dom->find('ul', 1)->outertext=='
              • li21
              • li22
              '); + +// ----------------------------------------------- +$str = <<
            • li11
            • li12
              • li21
              • li22
              • +HTML; +//$dom->load($str); +//assert($dom->find('ul', 0)->outertext=='
                • li11
                • li12
                '); +//assert($dom->find('ul', 1)->outertext=='
                • li21
                • li22
                '); + +// ----------------------------------------------- +$str = <<
              • li11
              • li12
                • li21
                • li22 +HTML; +//$dom->load($str); +//assert($dom->find('ul', 0)->outertext=='
                  • li11
                  • li12
                  • '); +//assert($dom->find('ul', 1)->outertext=='
                    • li21
                    • li22'); + +// ----------------------------------------------- +$str = << +Head1Head2Head3 +123 + +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); + +// ----------------------------------------------------------------------------- +// replacement test +$str = <<
                      ok
                      +HTML; +$dom->load($str); +$es = $dom->find('div'); +assert(count($es)==2); +assert($es[0]->innertext=='
                      ok
                      '); +assert($es[0]->outertext=='
                      ok
                      '); + +// test isset +$es[0]->class = 'class_test'; +assert(isset($es[0]->class)===true); +assert(isset($es[0]->okok)===false); + +// test replacement +$es[0]->class = 'class_test'; +assert($es[0]->outertext=='
                      ok
                      '); + +// test replacement +//$es[0]->tag = 'span'; +//assert($es[0]->outertext=='
                      ok
                      '); + +// test unset (no more support...) +//$dom = str_get_dom($str); +//$es = $dom->find('div'); +//unset($es[0]->class); +//assert($es[0]->outertext=='
                      ok
                      '); + +//$dom->load($str); +//$es = $dom->find('div'); +//unset($es[0]->attr['class']); +//assert($es[0]->outertext=='
                      ok
                      '); + +// ----------------------------------------------- +$str = <<blahblah2 +HTML; +$dom->load($str); +$e = $dom->find('select[name=something]', 0); +$e->innertext = ''; +assert($e->outertext ==''); + +// ----------------------------------------------------------------------------- +// nested replacement test +$str = <<
                      ok
                      +HTML; +$dom->load($str); +$es = $dom->find('div'); +assert(count($es)==2); +assert($es[0]->innertext=='
                      ok
                      '); +assert($es[0]->outertext=='
                      ok
                      '); +assert($es[1]->innertext=='ok'); +assert($es[1]->outertext=='
                      ok
                      '); + +// test replacement +$es[1]->innertext = 'okok'; +assert($es[1]->outertext=='
                      okok
                      '); +assert($es[0]->outertext=='
                      okok
                      '); +//assert($dom=='
                      okok
                      '); + +$es[1]->class = 'class_test'; +assert($es[1]->outertext=='
                      okok
                      '); +assert($es[0]->outertext=='
                      okok
                      '); +//assert($dom=='
                      okok
                      '); + +$es[0]->class = 'class_test'; +assert($es[0]->outertext=='
                      okok
                      '); +//assert($dom=='
                      okok
                      '); + +$es[0]->innertext = 'okokok'; +assert($es[0]->outertext=='
                      okokok
                      '); +//assert($dom=='
                      okokok
                      '); + +// ----------------------------------------------------------------------------- +//

                      test +$str = <<

                      ok0link0

                      ok2link2

                      +HTML; +$dom->load($str); +$es = $dom->find('p'); +assert($es[0]->innertext=='ok0link0'); +assert($es[1]->innertext=='ok1link1'); +assert($es[2]->innertext=='ok2link2'); +assert($dom->find('p', 0)->plaintext=='ok0link0'); +assert($dom->find('p', 1)->plaintext=='ok1link1'); +assert($dom->find('p', 2)->plaintext=='ok2link2'); + +$count = 0; +foreach($dom->find('p') as $p) { + $a = $p->find('a'); + assert($a[0]->innertext=='link'.$count); + ++$count; +} + +$es = $dom->find('p a'); +assert($es[0]->innertext=='link0'); +assert($es[1]->innertext=='link1'); +assert($es[2]->innertext=='link2'); +assert($dom->find('p a', 0)->plaintext=='link0'); +assert($dom->find('p a', 1)->plaintext=='link1'); +assert($dom->find('p a', 2)->plaintext=='link2'); + +// ----------------------------------------------------------------------------- +// test +$str = << +HTML; +$dom->load($str); +$e = $dom->find('embed', 0); +assert($e->src=='../graphics/sounds/1812over.mid'); +assert($e->height=='60'); +assert($e->width=='144'); +assert($e==strtolower($str)); + +// ----------------------------------------------------------------------------- +//
                       test
                      +$str = <<
                      +    
                      +        
                      +    
                      + +HTML; +$dom->load($str); +//assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// test +$str = << + + + + +HTML; +$dom->load($str); +assert(count($dom->find('code'))==1); +//assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/memory_test.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/memory_test.php.svn-base new file mode 100644 index 0000000..06bc351 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/memory_test.php.svn-base @@ -0,0 +1,103 @@ +"; +} + +function stat_dom($dom) { + $count_text = 0; + $count_comm = 0; + $count_elem = 0; + $count_tag_end = 0; + + foreach($dom->nodes as $n) { + if ($n->nodetype==HDOM_TYPE_TEXT) + ++$count_text; + if ($n->nodetype==HDOM_TYPE_COMMENT) + ++$count_comm; + if ($n->nodetype==HDOM_TYPE_ELEMENT) + ++$count_elem; + if ($n->nodetype==HDOM_TYPE_ENDTAG) + ++$count_tag_end; + } + + echo 'Total: '. count($dom->nodes).', Text: '.$count_text.', Commnet: '.$count_comm.', Tag: '.$count_elem.', End Tag: '.$count_tag_end.'
                      '; +} + +echo 'init ' . number_format(memory_get_usage(), 0, '.', ',') . " bytes"; + + +echo '

                      [load file]
                      init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +echo '------------------------------------------
                      '; +flush(); +for($i=0; $i<3; ++$i) { + $str = file_get_contents($filename); + unset($str); + dump_memory(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +flush(); + + +$str = file_get_contents($filename); +echo '

                      [multi objects str_get_dom clear memory]
                      init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +echo '------------------------------------------
                      '; +flush(); +for($i=0; $i<3; ++$i) { + $dom = str_get_dom($str); + //stat_dom($dom); + $dom->clear(); + unset($dom); + dump_memory(); + flush(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +flush(); + +echo '

                      [multi objects file_get_dom clear memory]
                      init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +echo '------------------------------------------
                      '; +flush(); +for($i=0; $i<3; ++$i) { + $dom = file_get_dom($filename); + //stat_dom($dom); + $dom->clear(); + unset($dom); + dump_memory(); + flush(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +flush(); + + +echo '

                      [one object]
                      init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +echo '------------------------------------------
                      '; +flush(); +$dom = new simple_html_dom; +for($i=0; $i<3; ++$i) { + $dom->load_file($filename); + $dom->clear(); + dump_memory(); +} +unset($dom); +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +flush(); + + + +echo '

                      [multi objects without clear memory]
                      init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +echo '------------------------------------------
                      '; +flush(); +for($i=0; $i<3; ++$i) { + $dom = file_get_dom($filename); + dump_memory(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                      '; +flush(); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/performance_test.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/performance_test.php.svn-base new file mode 100644 index 0000000..18d7670 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/performance_test.php.svn-base @@ -0,0 +1,38 @@ +load($str, false); + list($eu, $es) = explode(' ', microtime()); + list($bu, $bs) = explode(' ', $start); + + if (((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000 > $max) + $max = ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + + if (((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000 < $min) + $min = ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + + $all += ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + echo sprintf('(%.1f)', ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000).'
                      '; + $dom->clear(); +} + +echo '
                      -------------------------
                      '; +echo 'min: ' . $min . '
                      '; +echo 'max: ' . $max . '
                      '; + +echo '
                      avg: ' . $all/$count . '
                      '; +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/selector_testcase.php.svn-base b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/selector_testcase.php.svn-base new file mode 100644 index 0000000..d93f9d6 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/.svn/text-base/selector_testcase.php.svn-base @@ -0,0 +1,584 @@ + + + +HTML; +$dom->load($str); +$e = $dom->find('img'); +assert(count($e)==3); + +// ----------------------------------------------------------------------------- +// std selector test +$str = << + + +HTML; +$dom->load($str); + +// ----------------------------------------------- +// all +//$e = $dom->find('*'); +//assert(count($e)==3); + +// ----------------------------------------------- +// tag +assert(count($dom->find('img'))==3); + +// ----------------------------------------------- +// class +$es = $dom->find('img.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// id +$es = $dom->find('img#id1'); +assert(count($es)==1); +assert($es[0]->src=='src1'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('#id2'); +assert(count($es)==1); +assert($es[0]->src=='src2'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// attr +$es = $dom->find('img[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('img[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// text +$str = <<text1
                      text2 +HTML; +$dom->load($str); +$es = $dom->find('text'); +assert(count($es)==2); +assert($es[0]->innertext=='text1'); +assert($es[0]->outertext=='text1'); +assert($es[0]->plaintext=='text1'); +assert($es[1]->innertext=='text2'); +assert($es[1]->outertext=='text2'); +assert($es[1]->plaintext=='text2'); + +$str = <<text1text2 +HTML; +$dom->load($str); +$es = $dom->find('b text'); +assert(count($es)==2); +assert($es[0]->innertext=='text1'); +assert($es[0]->outertext=='text1'); +assert($es[0]->plaintext=='text1'); +assert($es[1]->innertext=='text2'); +assert($es[1]->outertext=='text2'); +assert($es[1]->plaintext=='text2'); + + +// ----------------------------------------------- +// xml namespace test +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('bw:bizy'); +assert(count($es)==0); + +// ----------------------------------------------- +// user defined tag name test +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div_test'); +assert(count($es)==1); +assert($es[0]->id=='1'); +// ----------------------------------------------- +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div-test'); +assert(count($es)==1); +assert($es[0]->id=='1'); +// ----------------------------------------------- +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div::test'); +assert(count($es)==0); + +// ----------------------------------------------- +// find all occurrences of id="1" regardless of the tag +$str = << + +
                      ok
                      +HTML; +$dom->load($str); +$es = $dom->find('[id=1]'); +assert(count($es)==2); +assert($es[0]->tag=='img'); +assert($es[1]->tag=='div'); + +// ----------------------------------------------------------------------------- +// multiple selector test +$str = << +
                      +
                      ok
                      +
                      + +HTML; +$dom->load($str); + +$es = $dom->find('div'); +assert(count($es)==3); +assert($es[0]->id=='id0'); +assert($es[1]->id=='id1'); +assert($es[2]->id=='id2'); + +$es = $dom->find('div div'); +assert(count($es)==2); +assert($es[0]->id=='id1'); +assert($es[1]->id=='id2'); + +$es = $dom->find('div div div'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +// ----------------------------------------------------------------------------- +// multiple selector test 2 +$str = << + + 0 + 1 + + + + + + + +
                      23
                      +HTML; +$dom->load($str); +$es = $dom->find('table td'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); + +// ----------------------------------------------------------------------------- +// multiple selector test 3 +$str = << + + + + + + + +
                      01
                      + + + + + + + + +
                      23
                      +HTML; +$dom = str_get_dom($str); +$es = $dom->find('table.hello td'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); + +// ----------------------------------------------------------------------------- +// nested selector test +$str = << +
                    • 0
                    • +
                    • 1
                    • +
                    +
                      +
                    • 2
                    • +
                    • 3
                    • +
                    +HTML; +$dom = str_get_dom($str); +$es= $dom->find('ul'); +assert(count($es)==2); + +foreach($es as $n) { + $li = $n->find('li'); + assert(count($li)==2); +} + +$es= $dom->find('li'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); +assert($es[0]->outertext=='
                  • 0
                  • '); +assert($es[1]->outertext=='
                  • 1
                  • '); +assert($es[2]->outertext=='
                  • 2
                  • '); +assert($es[3]->outertext=='
                  • 3
                  • '); + +$counter = 0; +foreach($dom->find('ul') as $ul) { + foreach($ul->find('li') as $li) { + assert($li->innertext=="$counter"); + assert($li->outertext=="
                  • $counter
                  • "); + ++$counter; + } +} + +// ----------------------------------------------------------------------------- +// [attribute=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name=newsletter]'); +assert(count($es)==1); +assert($es[0]->name=='newsletter'); +assert($es[0]->value=='Hot Fuzz'); +assert($es[0]->outertext==''); + +$es = $dom->find('[name="newsletter"]'); +assert(count($es)==1); +assert($es[0]->name=='newsletter'); +assert($es[0]->value=='Hot Fuzz'); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute!=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name!=newsletter]'); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +$es = $dom->find('[name!="newsletter"]'); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +$es = $dom->find("[name!='newsletter']"); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute^=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name^=news]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='newsboy'); +assert($es[1]->outertext==''); + +$es = $dom->find('[name^="news"]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='newsboy'); +assert($es[1]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute$=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name$=letter]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='jobletter'); +assert($es[1]->outertext==''); + +$es = $dom->find('[name$="letter"]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='jobletter'); +assert($es[1]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute*=value] selector +$str = << + + + +
                    +
                    +
                    +HTML; +$dom->load($str); + +$es = $dom->find('[name*=man]'); +assert(count($es)==3); +assert($es[0]->name=='man-news'); +assert($es[0]->outertext==''); +assert($es[1]->name=='milkman'); +assert($es[1]->outertext==''); +assert($es[2]->name=='letterman2'); +assert($es[2]->outertext==''); + +$es = $dom->find('[name*="man"]'); +assert(count($es)==3); +assert($es[0]->name=='man-news'); +assert($es[0]->outertext==''); +assert($es[1]->name=='milkman'); +assert($es[1]->outertext==''); +assert($es[2]->name=='letterman2'); +assert($es[2]->outertext==''); + +$es = $dom->find('[class*=hello]'); +assert($es[0]->outertext=='
                    '); +assert($es[1]->outertext=='
                    '); +assert($es[2]->outertext=='
                    '); + +// ----------------------------------------------------------------------------- +// Testcase for '[]' names element +// normal checkbox +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('[name=news]'); +assert(count($es)==3); +assert($es[0]->name=='news'); +assert($es[0]->value=='foo'); +assert($es[1]->name=='news'); +assert($es[1]->value=='bar'); +assert($es[2]->name=='news'); +assert($es[2]->value=='baz'); + +// ----------------------------------------------------------------------------- +// with '[]' names checkbox +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('[name=news[]]'); +assert(count($es)==3); +assert($es[0]->name=='news[]'); +assert($es[0]->value=='foo'); +assert($es[1]->name=='news[]'); +assert($es[1]->value=='bar'); +assert($es[2]->name=='news[]'); +assert($es[2]->value=='baz'); + +// ----------------------------------------------------------------------------- +// with '[]' names checkbox 2 +$str = << + +HTML; +$dom->load($str); +$es = $dom->find('[name=news[foo]]'); +assert(count($es)==1); +assert($es[0]->name=='news[foo]'); +assert($es[0]->value=='foo'); + +// ----------------------------------------------------------------------------- +// regular expression syntax escaping +$str = << +one +two +three (text) + +HTML; +$dom->load($str); +assert(count($dom->find('a[href^="image/"]'))==2); +assert(count($dom->find('a[href*="/favorites/"]'))==1); + +// ----------------------------------------------------------------------------- +// multiple class test +$str = <<should verify +
                    should verify
                    +
                    should verify
                    +
                    should verify
                    +
                    should not verify
                    +
                    should not verify
                    +
                    should not verify
                    +HTML; + +$dom->load($str); +$es = $dom->find('[class="hello"],[class*="hello "],[class*=" hello"]'); +assert(count($es)==4); +assert($es[0]->class=='hello'); +assert($es[1]->class=='foo hello bar'); +assert($es[2]->class=='foo bar hello'); +assert($es[3]->class=='hello foo bar'); + +$es = $dom->find('.hello'); +assert(count($es)==4); +assert($es[0]->class=='hello'); +assert($es[1]->class=='foo hello bar'); +assert($es[2]->class=='foo bar hello'); +assert($es[3]->class=='hello foo bar'); + +// ----------------------------------------------------------------------------- +// multiple class test 2 +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('[class=aa]'))==1); +assert(count($dom->find('[class=bb]'))==1); +assert(count($dom->find('[class="aa bb"]'))==1); +assert(count($dom->find('[class=aa], [class=bb]'))==1); + +// ----------------------------------------------------------------------------- +// multiple selector test +$str = <<aaa

                    +bbb +ccc +HTML; +$dom->load($str); + +$es = $dom->find('p,b,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p, b, i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p, b , i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p ,b ,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('b,p,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('i,b,p'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p,b,i,p,b'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +// ----------------------------------------------------------------------------- +// multiple selector test 2 +$str = << + +HTML; +$dom->load($str); +assert(count($dom->find('a[title], img[title]'))==2); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/all_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/all_test.php new file mode 100644 index 0000000..bada360 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/all_test.php @@ -0,0 +1,12 @@ +isFile() && strpos($entry, '_testcase.')>0) { + echo basename($entry); + require_once($entry); + echo '
                    ...pass!

                    '; + } +} +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/element_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/element_testcase.php new file mode 100644 index 0000000..019f7b2 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/element_testcase.php @@ -0,0 +1,243 @@ +foo +HTML; +$dom->load($str); +assert($dom->find('div', 0)==$str); +// ----------------------------------------------- +$str = <<foo +HTML; +$dom->load($str); +assert($dom->find('div', 0)==$str); + +// ----------------------------------------------------------------------------- +// innertext test +$str = <<
                    foo +HTML; +$dom->load($str); +assert($dom==$str); +// ----------------------------------------------- +$str = <<
                    bar +HTML; +$dom->find('span', 0)->innertext = 'bar'; +assert($dom==$str); +// ----------------------------------------------- +$str = <<ok
                    bar +HTML; +$dom->find('head', 0)->innertext = 'ok'; +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// outertext test +$str = << +Head1Head2Head3 +123 + +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); +// ----------------------------------------------- +$str = <<Head1Head2Head3123 +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); + +// ----------------------------------------------- +$str = <<
                  • li11
                  • li12
                  • li21
                  • li22
                  +HTML; +$dom->load($str); +assert($dom->find('ul', 0)->outertext=='
                  • li11
                  • li12
                  '); +assert($dom->find('ul', 1)->outertext=='
                  • li21
                  • li22
                  '); + +// ----------------------------------------------- +$str = <<
                • li11
                • li12
                  • li21
                  • li22
                  • +HTML; +//$dom->load($str); +//assert($dom->find('ul', 0)->outertext=='
                    • li11
                    • li12
                    '); +//assert($dom->find('ul', 1)->outertext=='
                    • li21
                    • li22
                    '); + +// ----------------------------------------------- +$str = <<
                  • li11
                  • li12
                    • li21
                    • li22 +HTML; +//$dom->load($str); +//assert($dom->find('ul', 0)->outertext=='
                      • li11
                      • li12
                      • '); +//assert($dom->find('ul', 1)->outertext=='
                        • li21
                        • li22'); + +// ----------------------------------------------- +$str = << +Head1Head2Head3 +123 + +HTML; +$dom->load($str); +assert($dom->find('tr', 0)->outertext=='Head1Head2Head3'); +assert($dom->find('tr', 1)->outertext=='123'); + +// ----------------------------------------------------------------------------- +// replacement test +$str = <<
                          ok
                          +HTML; +$dom->load($str); +$es = $dom->find('div'); +assert(count($es)==2); +assert($es[0]->innertext=='
                          ok
                          '); +assert($es[0]->outertext=='
                          ok
                          '); + +// test isset +$es[0]->class = 'class_test'; +assert(isset($es[0]->class)===true); +assert(isset($es[0]->okok)===false); + +// test replacement +$es[0]->class = 'class_test'; +assert($es[0]->outertext=='
                          ok
                          '); + +// test replacement +//$es[0]->tag = 'span'; +//assert($es[0]->outertext=='
                          ok
                          '); + +// test unset (no more support...) +//$dom = str_get_dom($str); +//$es = $dom->find('div'); +//unset($es[0]->class); +//assert($es[0]->outertext=='
                          ok
                          '); + +//$dom->load($str); +//$es = $dom->find('div'); +//unset($es[0]->attr['class']); +//assert($es[0]->outertext=='
                          ok
                          '); + +// ----------------------------------------------- +$str = <<blahblah2 +HTML; +$dom->load($str); +$e = $dom->find('select[name=something]', 0); +$e->innertext = ''; +assert($e->outertext ==''); + +// ----------------------------------------------------------------------------- +// nested replacement test +$str = <<
                          ok
                          +HTML; +$dom->load($str); +$es = $dom->find('div'); +assert(count($es)==2); +assert($es[0]->innertext=='
                          ok
                          '); +assert($es[0]->outertext=='
                          ok
                          '); +assert($es[1]->innertext=='ok'); +assert($es[1]->outertext=='
                          ok
                          '); + +// test replacement +$es[1]->innertext = 'okok'; +assert($es[1]->outertext=='
                          okok
                          '); +assert($es[0]->outertext=='
                          okok
                          '); +//assert($dom=='
                          okok
                          '); + +$es[1]->class = 'class_test'; +assert($es[1]->outertext=='
                          okok
                          '); +assert($es[0]->outertext=='
                          okok
                          '); +//assert($dom=='
                          okok
                          '); + +$es[0]->class = 'class_test'; +assert($es[0]->outertext=='
                          okok
                          '); +//assert($dom=='
                          okok
                          '); + +$es[0]->innertext = 'okokok'; +assert($es[0]->outertext=='
                          okokok
                          '); +//assert($dom=='
                          okokok
                          '); + +// ----------------------------------------------------------------------------- +//

                          test +$str = <<

                          ok0link0

                          ok2link2

                          +HTML; +$dom->load($str); +$es = $dom->find('p'); +assert($es[0]->innertext=='ok0link0'); +assert($es[1]->innertext=='ok1link1'); +assert($es[2]->innertext=='ok2link2'); +assert($dom->find('p', 0)->plaintext=='ok0link0'); +assert($dom->find('p', 1)->plaintext=='ok1link1'); +assert($dom->find('p', 2)->plaintext=='ok2link2'); + +$count = 0; +foreach($dom->find('p') as $p) { + $a = $p->find('a'); + assert($a[0]->innertext=='link'.$count); + ++$count; +} + +$es = $dom->find('p a'); +assert($es[0]->innertext=='link0'); +assert($es[1]->innertext=='link1'); +assert($es[2]->innertext=='link2'); +assert($dom->find('p a', 0)->plaintext=='link0'); +assert($dom->find('p a', 1)->plaintext=='link1'); +assert($dom->find('p a', 2)->plaintext=='link2'); + +// ----------------------------------------------------------------------------- +// test +$str = << +HTML; +$dom->load($str); +$e = $dom->find('embed', 0); +assert($e->src=='../graphics/sounds/1812over.mid'); +assert($e->height=='60'); +assert($e->width=='144'); +assert($e==strtolower($str)); + +// ----------------------------------------------------------------------------- +//
                           test
                          +$str = <<
                          +    
                          +        
                          +    
                          + +HTML; +$dom->load($str); +//assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// test +$str = << + + + + +HTML; +$dom->load($str); +assert(count($dom->find('code'))==1); +//assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/memory_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/memory_test.php new file mode 100644 index 0000000..fa8fda5 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/memory_test.php @@ -0,0 +1,103 @@ +"; +} + +function stat_dom($dom) { + $count_text = 0; + $count_comm = 0; + $count_elem = 0; + $count_tag_end = 0; + + foreach($dom->nodes as $n) { + if ($n->nodetype==HDOM_TYPE_TEXT) + ++$count_text; + if ($n->nodetype==HDOM_TYPE_COMMENT) + ++$count_comm; + if ($n->nodetype==HDOM_TYPE_ELEMENT) + ++$count_elem; + if ($n->nodetype==HDOM_TYPE_ENDTAG) + ++$count_tag_end; + } + + echo 'Total: '. count($dom->nodes).', Text: '.$count_text.', Commnet: '.$count_comm.', Tag: '.$count_elem.', End Tag: '.$count_tag_end.'
                          '; +} + +echo 'init ' . number_format(memory_get_usage(), 0, '.', ',') . " bytes"; + + +echo '

                          [load file]
                          init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +echo '------------------------------------------
                          '; +flush(); +for($i=0; $i<3; ++$i) { + $str = file_get_contents($filename); + unset($str); + dump_memory(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +flush(); + + +$str = file_get_contents($filename); +echo '

                          [multi objects str_get_dom clear memory]
                          init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +echo '------------------------------------------
                          '; +flush(); +for($i=0; $i<3; ++$i) { + $dom = str_get_dom($str); + //stat_dom($dom); + $dom->clear(); + unset($dom); + dump_memory(); + flush(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +flush(); + +echo '

                          [multi objects file_get_dom clear memory]
                          init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +echo '------------------------------------------
                          '; +flush(); +for($i=0; $i<3; ++$i) { + $dom = file_get_dom($filename); + //stat_dom($dom); + $dom->clear(); + unset($dom); + dump_memory(); + flush(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +flush(); + + +echo '

                          [one object]
                          init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +echo '------------------------------------------
                          '; +flush(); +$dom = new simple_html_dom; +for($i=0; $i<3; ++$i) { + $dom->load_file($filename); + $dom->clear(); + dump_memory(); +} +unset($dom); +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +flush(); + + + +echo '

                          [multi objects without clear memory]
                          init memory: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +echo '------------------------------------------
                          '; +flush(); +for($i=0; $i<3; ++$i) { + $dom = file_get_dom($filename); + dump_memory(); +} +echo 'final: '.number_format(memory_get_usage(), 0, '.', ',').'
                          '; +flush(); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/performance_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/performance_test.php new file mode 100644 index 0000000..a4bbb75 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/performance_test.php @@ -0,0 +1,38 @@ +load($str, false); + list($eu, $es) = explode(' ', microtime()); + list($bu, $bs) = explode(' ', $start); + + if (((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000 > $max) + $max = ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + + if (((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000 < $min) + $min = ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + + $all += ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000; + echo sprintf('(%.1f)', ((float)$eu+(float)$es-(float)$bu-(float)$bs)*1000).'
                          '; + $dom->clear(); +} + +echo '
                          -------------------------
                          '; +echo 'min: ' . $min . '
                          '; +echo 'max: ' . $max . '
                          '; + +echo '
                          avg: ' . $all/$count . '
                          '; +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/selector_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/selector_testcase.php new file mode 100644 index 0000000..2dd3403 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/reader/selector_testcase.php @@ -0,0 +1,584 @@ + + + +HTML; +$dom->load($str); +$e = $dom->find('img'); +assert(count($e)==3); + +// ----------------------------------------------------------------------------- +// std selector test +$str = << + + +HTML; +$dom->load($str); + +// ----------------------------------------------- +// all +//$e = $dom->find('*'); +//assert(count($e)==3); + +// ----------------------------------------------- +// tag +assert(count($dom->find('img'))==3); + +// ----------------------------------------------- +// class +$es = $dom->find('img.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// id +$es = $dom->find('img#id1'); +assert(count($es)==1); +assert($es[0]->src=='src1'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('#id2'); +assert(count($es)==1); +assert($es[0]->src=='src2'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// attr +$es = $dom->find('img[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('img[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// text +$str = <<text1text2 +HTML; +$dom->load($str); +$es = $dom->find('text'); +assert(count($es)==2); +assert($es[0]->innertext=='text1'); +assert($es[0]->outertext=='text1'); +assert($es[0]->plaintext=='text1'); +assert($es[1]->innertext=='text2'); +assert($es[1]->outertext=='text2'); +assert($es[1]->plaintext=='text2'); + +$str = <<text1text2 +HTML; +$dom->load($str); +$es = $dom->find('b text'); +assert(count($es)==2); +assert($es[0]->innertext=='text1'); +assert($es[0]->outertext=='text1'); +assert($es[0]->plaintext=='text1'); +assert($es[1]->innertext=='text2'); +assert($es[1]->outertext=='text2'); +assert($es[1]->plaintext=='text2'); + + +// ----------------------------------------------- +// xml namespace test +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('bw:bizy'); +assert(count($es)==0); + +// ----------------------------------------------- +// user defined tag name test +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div_test'); +assert(count($es)==1); +assert($es[0]->id=='1'); +// ----------------------------------------------- +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div-test'); +assert(count($es)==1); +assert($es[0]->id=='1'); +// ----------------------------------------------- +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div::test'); +assert(count($es)==0); + +// ----------------------------------------------- +// find all occurrences of id="1" regardless of the tag +$str = << + +
                          ok
                          +HTML; +$dom->load($str); +$es = $dom->find('[id=1]'); +assert(count($es)==2); +assert($es[0]->tag=='img'); +assert($es[1]->tag=='div'); + +// ----------------------------------------------------------------------------- +// multiple selector test +$str = << +
                          +
                          ok
                          +
                          + +HTML; +$dom->load($str); + +$es = $dom->find('div'); +assert(count($es)==3); +assert($es[0]->id=='id0'); +assert($es[1]->id=='id1'); +assert($es[2]->id=='id2'); + +$es = $dom->find('div div'); +assert(count($es)==2); +assert($es[0]->id=='id1'); +assert($es[1]->id=='id2'); + +$es = $dom->find('div div div'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +// ----------------------------------------------------------------------------- +// multiple selector test 2 +$str = << + + 0 + 1 + + + + + + + +
                          23
                          +HTML; +$dom->load($str); +$es = $dom->find('table td'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); + +// ----------------------------------------------------------------------------- +// multiple selector test 3 +$str = << + + + + + + + +
                          01
                          + + + + + + + + +
                          23
                          +HTML; +$dom = str_get_dom($str); +$es = $dom->find('table.hello td'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); + +// ----------------------------------------------------------------------------- +// nested selector test +$str = << +
                        • 0
                        • +
                        • 1
                        • +
                        +
                          +
                        • 2
                        • +
                        • 3
                        • +
                        +HTML; +$dom = str_get_dom($str); +$es= $dom->find('ul'); +assert(count($es)==2); + +foreach($es as $n) { + $li = $n->find('li'); + assert(count($li)==2); +} + +$es= $dom->find('li'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); +assert($es[0]->outertext=='
                      • 0
                      • '); +assert($es[1]->outertext=='
                      • 1
                      • '); +assert($es[2]->outertext=='
                      • 2
                      • '); +assert($es[3]->outertext=='
                      • 3
                      • '); + +$counter = 0; +foreach($dom->find('ul') as $ul) { + foreach($ul->find('li') as $li) { + assert($li->innertext=="$counter"); + assert($li->outertext=="
                      • $counter
                      • "); + ++$counter; + } +} + +// ----------------------------------------------------------------------------- +// [attribute=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name=newsletter]'); +assert(count($es)==1); +assert($es[0]->name=='newsletter'); +assert($es[0]->value=='Hot Fuzz'); +assert($es[0]->outertext==''); + +$es = $dom->find('[name="newsletter"]'); +assert(count($es)==1); +assert($es[0]->name=='newsletter'); +assert($es[0]->value=='Hot Fuzz'); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute!=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name!=newsletter]'); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +$es = $dom->find('[name!="newsletter"]'); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +$es = $dom->find("[name!='newsletter']"); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute^=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name^=news]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='newsboy'); +assert($es[1]->outertext==''); + +$es = $dom->find('[name^="news"]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='newsboy'); +assert($es[1]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute$=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name$=letter]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='jobletter'); +assert($es[1]->outertext==''); + +$es = $dom->find('[name$="letter"]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='jobletter'); +assert($es[1]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute*=value] selector +$str = << + + + +
                        +
                        +
                        +HTML; +$dom->load($str); + +$es = $dom->find('[name*=man]'); +assert(count($es)==3); +assert($es[0]->name=='man-news'); +assert($es[0]->outertext==''); +assert($es[1]->name=='milkman'); +assert($es[1]->outertext==''); +assert($es[2]->name=='letterman2'); +assert($es[2]->outertext==''); + +$es = $dom->find('[name*="man"]'); +assert(count($es)==3); +assert($es[0]->name=='man-news'); +assert($es[0]->outertext==''); +assert($es[1]->name=='milkman'); +assert($es[1]->outertext==''); +assert($es[2]->name=='letterman2'); +assert($es[2]->outertext==''); + +$es = $dom->find('[class*=hello]'); +assert($es[0]->outertext=='
                        '); +assert($es[1]->outertext=='
                        '); +assert($es[2]->outertext=='
                        '); + +// ----------------------------------------------------------------------------- +// Testcase for '[]' names element +// normal checkbox +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('[name=news]'); +assert(count($es)==3); +assert($es[0]->name=='news'); +assert($es[0]->value=='foo'); +assert($es[1]->name=='news'); +assert($es[1]->value=='bar'); +assert($es[2]->name=='news'); +assert($es[2]->value=='baz'); + +// ----------------------------------------------------------------------------- +// with '[]' names checkbox +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('[name=news[]]'); +assert(count($es)==3); +assert($es[0]->name=='news[]'); +assert($es[0]->value=='foo'); +assert($es[1]->name=='news[]'); +assert($es[1]->value=='bar'); +assert($es[2]->name=='news[]'); +assert($es[2]->value=='baz'); + +// ----------------------------------------------------------------------------- +// with '[]' names checkbox 2 +$str = << + +HTML; +$dom->load($str); +$es = $dom->find('[name=news[foo]]'); +assert(count($es)==1); +assert($es[0]->name=='news[foo]'); +assert($es[0]->value=='foo'); + +// ----------------------------------------------------------------------------- +// regular expression syntax escaping +$str = << +one +two +three (text) + +HTML; +$dom->load($str); +assert(count($dom->find('a[href^="image/"]'))==2); +assert(count($dom->find('a[href*="/favorites/"]'))==1); + +// ----------------------------------------------------------------------------- +// multiple class test +$str = <<should verify +
                        should verify
                        +
                        should verify
                        +
                        should verify
                        +
                        should not verify
                        +
                        should not verify
                        +
                        should not verify
                        +HTML; + +$dom->load($str); +$es = $dom->find('[class="hello"],[class*="hello "],[class*=" hello"]'); +assert(count($es)==4); +assert($es[0]->class=='hello'); +assert($es[1]->class=='foo hello bar'); +assert($es[2]->class=='foo bar hello'); +assert($es[3]->class=='hello foo bar'); + +$es = $dom->find('.hello'); +assert(count($es)==4); +assert($es[0]->class=='hello'); +assert($es[1]->class=='foo hello bar'); +assert($es[2]->class=='foo bar hello'); +assert($es[3]->class=='hello foo bar'); + +// ----------------------------------------------------------------------------- +// multiple class test 2 +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('[class=aa]'))==1); +assert(count($dom->find('[class=bb]'))==1); +assert(count($dom->find('[class="aa bb"]'))==1); +assert(count($dom->find('[class=aa], [class=bb]'))==1); + +// ----------------------------------------------------------------------------- +// multiple selector test +$str = <<aaa

                        +bbb +ccc +HTML; +$dom->load($str); + +$es = $dom->find('p,b,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p, b, i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p, b , i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p ,b ,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('b,p,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('i,b,p'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p,b,i,p,b'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +// ----------------------------------------------------------------------------- +// multiple selector test 2 +$str = << + +HTML; +$dom->load($str); +assert(count($dom->find('a[title], img[title]'))==2); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/selector_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/selector_testcase.php new file mode 100644 index 0000000..de7e6a4 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/selector_testcase.php @@ -0,0 +1,742 @@ + + + +HTML; +$dom->load($str); +$e = $dom->find('img'); +assert(count($e)==3); + +// ----------------------------------------------------------------------------- +// std selector test +$str = << + + + + +HTML; +$dom->load($str); + +// ----------------------------------------------- +// wildcard +assert(count($dom->find('*'))==1); +assert(count($dom->find('div *'))==3); +assert(count($dom->find('div img *'))==0); + + +assert(count($dom->find(' * '))==1); +assert(count($dom->find(' div * '))==3); +assert(count($dom->find(' div img *'))==0); + +// ----------------------------------------------- +// tag +assert(count($dom->find('img'))==3); +assert(count($dom->find('text'))==4); + +// ----------------------------------------------- +// class +$es = $dom->find('img.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// index +assert($dom->find('img', 0)->src=='src0'); +assert($dom->find('img', 1)->src=='src1'); +assert($dom->find('img', 2)->src=='src2'); +assert($dom->find('img', -3)->src=='src0'); +assert($dom->find('img', -2)->src=='src1'); +assert($dom->find('img', -1)->src=='src2'); + +// ----------------------------------------------- +// id +$es = $dom->find('img#id1'); +assert(count($es)==1); +assert($es[0]->src=='src1'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('#id2'); +assert(count($es)==1); +assert($es[0]->src=='src2'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------- +// attr +$es = $dom->find('img[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('img[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// wildcard +$es = $dom->find('*[src]'); +assert(count($es)==3); + +$es = $dom->find('*[src=*]'); +assert(count($es)==3); + +$es = $dom->find('*[alt=*]'); +assert(count($es)==0); + +$es = $dom->find('*[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('*[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('[src=src0]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('[src="src0"]'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('*#id1'); +assert(count($es)==1); +assert($es[0]->src=='src1'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + +$es = $dom->find('*.class0'); +assert(count($es)==1); +assert($es[0]->src=='src0'); +assert($es[0]->innertext==''); +assert($es[0]->outertext==''); + + +// ----------------------------------------------------------------------------- +// text +$str = <<text1text2 +HTML; +$dom->load($str); +$es = $dom->find('text'); +assert(count($es)==2); +assert($es[0]->innertext=='text1'); +assert($es[0]->outertext=='text1'); +assert($es[0]->plaintext=='text1'); +assert($es[1]->innertext=='text2'); +assert($es[1]->outertext=='text2'); +assert($es[1]->plaintext=='text2'); + +$str = <<text1text2 +HTML; +$dom->load($str); +$es = $dom->find('b text'); +assert(count($es)==2); +assert($es[0]->innertext=='text1'); +assert($es[0]->outertext=='text1'); +assert($es[0]->plaintext=='text1'); +assert($es[1]->innertext=='text2'); +assert($es[1]->outertext=='text2'); +assert($es[1]->plaintext=='text2'); + + +// ----------------------------------------------------------------------------- +// xml namespace test +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('bw:bizy'); +assert(count($es)==1); +assert($es[0]->id=='date'); + +// ----------------------------------------------------------------------------- +// user defined tag name test +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div_test'); +assert(count($es)==1); +assert($es[0]->id=='1'); + +// ----------------------------------------------- +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div-test'); +assert(count($es)==1); +assert($es[0]->id=='1'); + +// ----------------------------------------------- +$str = <<text +HTML; +$dom->load($str); +$es = $dom->find('div::test'); +assert(count($es)==1); +assert($es[0]->id=='1'); + +// ----------------------------------------------- +// find all occurrences of id="1" regardless of the tag +$str = << + +
                        ok
                        +HTML; +$dom->load($str); +$es = $dom->find('[id=1]'); +assert(count($es)==2); +assert($es[0]->tag=='img'); +assert($es[1]->tag=='div'); + +// ----------------------------------------------------------------------------- +// multiple selector test +$str = <<
                        ok
                        ok
                        +HTML; +$dom->load($str); + +$es = $dom->find('div'); +assert(count($es)==4); +assert($es[0]->id=='id0'); +assert($es[1]->id=='id1'); +assert($es[2]->id=='id2'); + +$es = $dom->find('div div'); +assert(count($es)==3); +assert($es[0]->id=='id1'); +assert($es[1]->id=='id2'); + +$es = $dom->find('div div div'); +assert(count($es)==2); +assert($es[0]->id=='id2'); + +$es = $dom->find('.class0 .class1 .class2'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('#id0 #id1 #id2'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('div[id=id0] div[id=id1] div[id=id2]'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('div[id="id0"] div[id="id1"] div[id="id2"]'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('div[id=id0] div[id="id1"] div[id="id2"]'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('div[id="id0"] div[id=id1] div[id="id2"]'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('div[id="id0"] div[id="id1"] div[id=id2]'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find("div[id='id0'] div[id='id1'] div[id='id2']"); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('[id=id0] [id=id1] [id=id2]'); +assert(count($es)==1); +assert($es[0]->id=='id2'); + +$es = $dom->find('[id] [id] [id]'); +assert(count($es)==2); +assert($es[0]->id=='id2'); +assert($es[1]->id=='id3'); + +$es = $dom->find('[id=id0] [id=id1] [id=id3]'); +assert(count($es)==1); +assert($es[0]->id=='id3'); + +$es = $dom->find('[id=id0] [id=id1] [style="st1 st2"]'); +assert(count($es)==1); +assert($es[0]->id=='id3'); + +$es = $dom->find('[id=id0] [id=id1] [style=st1 st2]'); +assert(count($es)==1); +assert($es[0]->id=='id3'); + +$es = $dom->find('[id=id0] [id=id1] [style=st1 st2] span[class=id4]'); +assert(count($es)==1); +assert($es[0]->innertext=='ok'); + +$es = $dom->find('[id=id0] [id=id1] [style="st1 st2"] span[class="id4"]'); +assert(count($es)==1); +assert($es[0]->innertext=='ok'); + +// ----------------------------------------------- +$str = << + + 0 + 1 + + + + + + + +
                        23
                        +HTML; +$dom->load($str); +$es = $dom->find('table td'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); + +// ----------------------------------------------------------------------------- +// multiple selector test 3 +$str = << + + + + + + + +
                        01
                        + + + + + + + + +
                        23
                        +HTML; +$dom = str_get_html($str); +$es = $dom->find('table.hello td'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); + +// ----------------------------------------------------------------------------- +// nested selector test +$str = << +
                      • 0
                      • +
                      • 1
                      • +
                      +
                        +
                      • 2
                      • +
                      • 3
                      • +
                      +HTML; +$dom = str_get_html($str); +$es= $dom->find('ul'); +assert(count($es)==2); +foreach($es as $n) { + $li = $n->find('li'); + assert(count($li)==2); +} + +$es= $dom->find('li'); +assert(count($es)==4); +assert($es[0]->innertext=='0'); +assert($es[1]->innertext=='1'); +assert($es[2]->innertext=='2'); +assert($es[3]->innertext=='3'); +assert($es[0]->outertext=='
                    • 0
                    • '); +assert($es[1]->outertext=='
                    • 1
                    • '); +assert($es[2]->outertext=='
                    • 2
                    • '); +assert($es[3]->outertext=='
                    • 3
                    • '); + +$counter = 0; +foreach($dom->find('ul') as $ul) { + foreach($ul->find('li') as $li) { + assert($li->innertext=="$counter"); + assert($li->outertext=="
                    • $counter
                    • "); + ++$counter; + } +} + +// ----------------------------------------------------------------------------- +// [attribute=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name=newsletter]'); +assert(count($es)==1); +assert($es[0]->name=='newsletter'); +assert($es[0]->value=='Hot Fuzz'); +assert($es[0]->outertext==''); + +$es = $dom->find('[name="newsletter"]'); +assert(count($es)==1); +assert($es[0]->name=='newsletter'); +assert($es[0]->value=='Hot Fuzz'); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute!=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name!=newsletter]'); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +$es = $dom->find('[name!="newsletter"]'); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +$es = $dom->find("[name!='newsletter']"); +assert(count($es)==1); +assert($es[0]->name=='accept'); +assert($es[0]->value=='Evil Plans'); +assert($es[0]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute^=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name^=news]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='newsboy'); +assert($es[1]->outertext==''); + +$es = $dom->find('[name^="news"]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='newsboy'); +assert($es[1]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute$=value] selector +$str = << + + +HTML; +$dom->load($str); + +$es = $dom->find('[name$=letter]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='jobletter'); +assert($es[1]->outertext==''); + +$es = $dom->find('[name$="letter"]'); +assert(count($es)==2); +assert($es[0]->name=='newsletter'); +assert($es[0]->outertext==''); +assert($es[1]->name=='jobletter'); +assert($es[1]->outertext==''); + +// ----------------------------------------------------------------------------- +// [attribute*=value] selector +$str = << + + + +
                      +
                      +
                      +HTML; +$dom->load($str); + +$es = $dom->find('[name*=man]'); +assert(count($es)==3); +assert($es[0]->name=='man-news'); +assert($es[0]->outertext==''); +assert($es[1]->name=='milkman'); +assert($es[1]->outertext==''); +assert($es[2]->name=='letterman2'); +assert($es[2]->outertext==''); + +$es = $dom->find('[name*="man"]'); +assert(count($es)==3); +assert($es[0]->name=='man-news'); +assert($es[0]->outertext==''); +assert($es[1]->name=='milkman'); +assert($es[1]->outertext==''); +assert($es[2]->name=='letterman2'); +assert($es[2]->outertext==''); + +$es = $dom->find('[class*=hello]'); +assert($es[0]->outertext=='
                      '); +assert($es[1]->outertext=='
                      '); +assert($es[2]->outertext=='
                      '); + +// ----------------------------------------------------------------------------- +// Testcase for '[]' names element +// normal checkbox +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('[name=news]'); +assert(count($es)==3); +assert($es[0]->name=='news'); +assert($es[0]->value=='foo'); +assert($es[1]->name=='news'); +assert($es[1]->value=='bar'); +assert($es[2]->name=='news'); +assert($es[2]->value=='baz'); + +// ----------------------------------------------------------------------------- +// with '[]' names checkbox +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('[name=news[]]'); +assert(count($es)==3); +assert($es[0]->name=='news[]'); +assert($es[0]->value=='foo'); +assert($es[1]->name=='news[]'); +assert($es[1]->value=='bar'); +assert($es[2]->name=='news[]'); +assert($es[2]->value=='baz'); + +// ----------------------------------------------------------------------------- +// with '[]' names checkbox 2 +$str = << + +HTML; +$dom->load($str); +$es = $dom->find('[name=news[foo]]'); +assert(count($es)==1); +assert($es[0]->name=='news[foo]'); +assert($es[0]->value=='foo'); + +// ----------------------------------------------------------------------------- +// with '[]' names 3 +$str = << + + +HTML; +$dom->load($str); +$es = $dom->find('div[name=div[]] input[name=checkbox[]]'); +assert(count($es)==1); +assert($es[0]->value=='foo'); + +// ----------------------------------------------------------------------------- +// regular expression +$str = << +one +two +three (text) + +HTML; +$dom->load($str); +assert(count($dom->find('a[href^="image/"]'))==2); +assert(count($dom->find('a[href*="/favorites/"]'))==1); + +$str = << + +
                      okok
                      + + +HTML; +$dom->load($str); +assert(count($dom->find('div[id*=news-id-[0-9]+]'))==1); +assert(count($dom->find('div[id*=/news-id-[0-9]+/i]'))==1); + +// ----------------------------------------------------------------------------- +// multiple class test +$str = <<should verify +
                      should verify
                      +
                      should verify
                      +
                      should verify
                      +
                      should not verify
                      +
                      should not verify
                      +
                      should not verify
                      +HTML; + +$dom->load($str); +$es = $dom->find('[class="hello"],[class*="hello "],[class*=" hello"]'); +assert(count($es)==4); +assert($es[0]->class=='hello'); +assert($es[1]->class=='foo hello bar'); +assert($es[2]->class=='foo bar hello'); +assert($es[3]->class=='hello foo bar'); + +$es = $dom->find('.hello'); +assert(count($es)==4); +assert($es[0]->class=='hello'); +assert($es[1]->class=='foo hello bar'); +assert($es[2]->class=='foo bar hello'); +assert($es[3]->class=='hello foo bar'); + +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('[class=aa]'))==1); +assert(count($dom->find('[class=bb]'))==1); +assert(count($dom->find('[class="aa bb"]'))==1); +assert(count($dom->find('[class=aa], [class=bb]'))==1); + +// ----------------------------------------------------------------------------- +// multiple selector test +$str = <<aaa

                      +bbb +ccc +HTML; +$dom->load($str); + +$es = $dom->find('p,b,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p, b, i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p, b , i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p ,b ,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('b,p,i'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('i,b,p'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +$es = $dom->find('p,b,i,p,b'); +assert(count($es)==3); +assert($es[0]->tag=='p'); +assert($es[1]->tag=='b'); +assert($es[2]->tag=='i'); + +// ----------------------------------------------- +$str = << + +HTML; +$dom->load($str); +assert(count($dom->find('a[title], img[title]'))==2); + +// ----------------------------------------------------------------------------- +// elements that do NOT have the specified attribute +$str = << + +HTML; +$dom->load($str); +assert(count($dom->find('img[!id]'))==1); + +// ----------------------------------------------------------------------------- +//js test +$str = <<foo +HTML; +$dom->load($str); +assert($dom->find('a[onMouseover="dropdownmenu(this, event, \'messagesmenu\')"]',0)->innertext=='foo'); +assert($dom->find("a[onMouseover=dropdownmenu(this, event, 'messagesmenu')]",0)->innertext=='foo'); + +// ----------------------------------------------------------------------------- +//dash test +$str = ''; + +$dom->load($str); +assert($dom->find('meta[http-equiv=content-type]', 0)->content==='text/html; charset=utf-8'); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/slick_test.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/slick_test.php new file mode 100644 index 0000000..b3f2331 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/slick_test.php @@ -0,0 +1,27 @@ +
                      '; + +assert(count($html->find('#title'))==1); +assert(count($html->find('div'))==51); +assert(count($html->find('div[class]'))==51); +assert(count($html->find('div.example'))==43); +assert(count($html->find('div[class=example]'))==43); +assert(count($html->find('.note'))==14); + +assert(count($html->find('div[class^=exa]'))==43); +assert(count($html->find('div[class$=mple]'))==43); +assert(count($html->find('div[class*=e]'))==50); +assert(count($html->find('div[class!=made_up]'))==51); + +assert(count($html->find('p'))==324); + +echo 'All pass!
                      '; +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/slickspeed.htm b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/slickspeed.htm new file mode 100644 index 0000000..c7d96b9 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/slickspeed.htm @@ -0,0 +1,2888 @@ + + + + Selectors + + + + + + +
                      +

                      W3C + +

                      Selectors

                      + +

                      W3C Working Draft 15 December 2005

                      + +
                      + +
                      This version: + +
                      + http://www.w3.org/TR/2005/WD-css3-selectors-20051215 + +
                      Latest version: + +
                      + http://www.w3.org/TR/css3-selectors + +
                      Previous version: + +
                      + http://www.w3.org/TR/2001/CR-css3-selectors-20011113 + +
                      Editors: + +
                      Daniel Glazman (Invited Expert)
                      + +
                      Tantek Çelik (Invited Expert) + +
                      Ian Hickson (Google) + +
                      Peter Linss (former editor, Netscape/AOL) + +
                      John Williams (former editor, Quark, Inc.) + +
                      + +
                      + +
                      + +

                      Abstract

                      + +

                      Selectors are patterns that match against elements in a + tree. Selectors have been optimized for use with HTML and XML, and + are designed to be usable in performance-critical code.

                      + +

                      CSS (Cascading + Style Sheets) is a language for describing the rendering of HTML and XML documents on + screen, on paper, in speech, etc. CSS uses Selectors for binding + style properties to elements in the document. This document + describes extensions to the selectors defined in CSS level 2. These + extended selectors will be used by CSS level 3. + +

                      Selectors define the following function:

                      + +
                      expression ∗ element → boolean
                      + +

                      That is, given an element and a selector, this specification + defines whether that element matches the selector.

                      + +

                      These expressions can also be used, for instance, to select a set + of elements, or a single element from a set of elements, by + evaluating the expression across all the elements in a + subtree. STTS (Simple Tree Transformation Sheets), a + language for transforming XML trees, uses this mechanism. [STTS]

                      + +

                      Status of this document

                      + +

                      This section describes the status of this document at the + time of its publication. Other documents may supersede this + document. A list of current W3C publications and the latest revision + of this technical report can be found in the W3C technical reports index at + http://www.w3.org/TR/.

                      + +

                      This document describes the selectors that already exist in CSS1 and CSS2, and + also proposes new selectors for CSS3 and other languages that may need them.

                      + +

                      The CSS Working Group doesn't expect that all implementations of + CSS3 will have to implement all selectors. Instead, there will + probably be a small number of variants of CSS3, called profiles. For + example, it may be that only a profile for interactive user agents + will include all of the selectors.

                      + +

                      This specification is a last call working draft for the the CSS Working Group + (Style Activity). This + document is a revision of the Candidate + Recommendation dated 2001 November 13, and has incorporated + implementation feedback received in the past few years. It is + expected that this last call will proceed straight to Proposed + Recommendation stage since it is believed that interoperability will + be demonstrable.

                      + +

                      All persons are encouraged to review and implement this + specification and return comments to the (archived) + public mailing list www-style + (see instructions). W3C + Members can also send comments directly to the CSS Working + Group. + The deadline for comments is 14 January 2006.

                      + +

                      This is still a draft document and may be updated, replaced, or + obsoleted by other documents at any time. It is inappropriate to + cite a W3C Working Draft as other than "work in progress". + +

                      This document may be available in translation. + The English version of this specification is the only normative + version. + +

                      + +

                      Table of contents

                      + + + +
                      + +

                      1. Introduction

                      + +

                      1.1. Dependencies

                      + +

                      Some features of this specification are specific to CSS, or have + particular limitations or rules specific to CSS. In this + specification, these have been described in terms of CSS2.1. [CSS21]

                      + +

                      1.2. Terminology

                      + +

                      All of the text of this specification is normative except + examples, notes, and sections explicitly marked as + non-normative.

                      + +

                      1.3. Changes from CSS2

                      + +

                      This section is non-normative.

                      + +

                      The main differences between the selectors in CSS2 and those in + Selectors are: + +

                        + +
                      • the list of basic definitions (selector, group of selectors, + simple selector, etc.) has been changed; in particular, what was + referred to in CSS2 as a simple selector is now called a sequence + of simple selectors, and the term "simple selector" is now used for + the components of this sequence
                      • + +
                      • an optional namespace component is now allowed in type element + selectors, the universal selector and attribute selectors
                      • + +
                      • a new combinator has been introduced
                      • + +
                      • new simple selectors including substring matching attribute + selectors, and new pseudo-classes
                      • + +
                      • new pseudo-elements, and introduction of the "::" convention + for pseudo-elements
                      • + +
                      • the grammar has been rewritten
                      • + +
                      • profiles to be added to specifications integrating Selectors + and defining the set of selectors which is actually supported by + each specification
                      • + +
                      • Selectors are now a CSS3 Module and an independent + specification; other specifications can now refer to this document + independently of CSS
                      • + +
                      • the specification now has its own test suite
                      • + +
                      + +

                      2. Selectors

                      + +

                      This section is non-normative, as it merely summarizes the +following sections.

                      + +

                      A Selector represents a structure. This structure can be used as a +condition (e.g. in a CSS rule) that determines which elements a +selector matches in the document tree, or as a flat description of the +HTML or XML fragment corresponding to that structure.

                      + +

                      Selectors may range from simple element names to rich contextual +representations.

                      + +

                      The following table summarizes the Selector syntax:

                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      PatternMeaningDescribed in sectionFirst defined in CSS level
                      *any elementUniversal + selector2
                      Ean element of type EType selector1
                      E[foo]an E element with a "foo" attributeAttribute + selectors2
                      E[foo="bar"]an E element whose "foo" attribute value is exactly + equal to "bar"Attribute + selectors2
                      E[foo~="bar"]an E element whose "foo" attribute value is a list of + space-separated values, one of which is exactly equal to "bar"Attribute + selectors2
                      E[foo^="bar"]an E element whose "foo" attribute value begins exactly + with the string "bar"Attribute + selectors3
                      E[foo$="bar"]an E element whose "foo" attribute value ends exactly + with the string "bar"Attribute + selectors3
                      E[foo*="bar"]an E element whose "foo" attribute value contains the + substring "bar"Attribute + selectors3
                      E[hreflang|="en"]an E element whose "hreflang" attribute has a hyphen-separated + list of values beginning (from the left) with "en"Attribute + selectors2
                      E:rootan E element, root of the documentStructural + pseudo-classes3
                      E:nth-child(n)an E element, the n-th child of its parentStructural + pseudo-classes3
                      E:nth-last-child(n)an E element, the n-th child of its parent, counting + from the last oneStructural + pseudo-classes3
                      E:nth-of-type(n)an E element, the n-th sibling of its typeStructural + pseudo-classes3
                      E:nth-last-of-type(n)an E element, the n-th sibling of its type, counting + from the last oneStructural + pseudo-classes3
                      E:first-childan E element, first child of its parentStructural + pseudo-classes2
                      E:last-childan E element, last child of its parentStructural + pseudo-classes3
                      E:first-of-typean E element, first sibling of its typeStructural + pseudo-classes3
                      E:last-of-typean E element, last sibling of its typeStructural + pseudo-classes3
                      E:only-childan E element, only child of its parentStructural + pseudo-classes3
                      E:only-of-typean E element, only sibling of its typeStructural + pseudo-classes3
                      E:emptyan E element that has no children (including text + nodes)Structural + pseudo-classes3
                      E:link
                      E:visited
                      an E element being the source anchor of a hyperlink of + which the target is not yet visited (:link) or already visited + (:visited)The link + pseudo-classes1
                      E:active
                      E:hover
                      E:focus
                      an E element during certain user actionsThe user + action pseudo-classes1 and 2
                      E:targetan E element being the target of the referring URIThe target + pseudo-class3
                      E:lang(fr)an element of type E in language "fr" (the document + language specifies how language is determined)The :lang() + pseudo-class2
                      E:enabled
                      E:disabled
                      a user interface element E which is enabled or + disabledThe UI element states + pseudo-classes3
                      E:checkeda user interface element E which is checked (for instance a radio-button or checkbox)The UI element states + pseudo-classes3
                      E::first-linethe first formatted line of an E elementThe ::first-line + pseudo-element1
                      E::first-letterthe first formatted letter of an E elementThe ::first-letter + pseudo-element1
                      E::selectionthe portion of an E element that is currently + selected/highlighted by the userThe UI element + fragments pseudo-elements3
                      E::beforegenerated content before an E elementThe ::before + pseudo-element2
                      E::aftergenerated content after an E elementThe ::after + pseudo-element2
                      E.warningan E element whose class is +"warning" (the document language specifies how class is determined).Class + selectors1
                      E#myidan E element with ID equal to "myid".ID + selectors1
                      E:not(s)an E element that does not match simple selector sNegation + pseudo-class3
                      E Fan F element descendant of an E elementDescendant + combinator1
                      E > Fan F element child of an E elementChild + combinator2
                      E + Fan F element immediately preceded by an E elementAdjacent sibling combinator2
                      E ~ Fan F element preceded by an E elementGeneral sibling combinator3
                      + +

                      The meaning of each selector is derived from the table above by +prepending "matches" to the contents of each cell in the "Meaning" +column.

                      + +

                      3. Case sensitivity

                      + +

                      The case sensitivity of document language element names, attribute +names, and attribute values in selectors depends on the document +language. For example, in HTML, element names are case-insensitive, +but in XML, they are case-sensitive.

                      + +

                      4. Selector syntax

                      + +

                      A selector is a chain of one +or more sequences of simple selectors +separated by combinators.

                      + +

                      A sequence of simple selectors +is a chain of simple selectors +that are not separated by a combinator. It +always begins with a type selector or a +universal selector. No other type +selector or universal selector is allowed in the sequence.

                      + +

                      A simple selector is either a type selector, universal selector, attribute selector, class selector, ID selector, content selector, or pseudo-class. One pseudo-element may be appended to the last +sequence of simple selectors.

                      + +

                      Combinators are: white space, "greater-than +sign" (U+003E, >), "plus sign" (U+002B, ++) and "tilde" (U+007E, ~). White +space may appear between a combinator and the simple selectors around +it. Only the characters "space" (U+0020), "tab" +(U+0009), "line feed" (U+000A), "carriage return" (U+000D), and "form +feed" (U+000C) can occur in white space. Other space-like characters, +such as "em-space" (U+2003) and "ideographic space" (U+3000), are +never part of white space.

                      + +

                      The elements of a document tree that are represented by a selector +are the subjects of the selector. A +selector consisting of a single sequence of simple selectors +represents any element satisfying its requirements. Prepending another +sequence of simple selectors and a combinator to a sequence imposes +additional matching constraints, so the subjects of a selector are +always a subset of the elements represented by the last sequence of +simple selectors.

                      + +

                      An empty selector, containing no sequence of simple selectors and +no pseudo-element, is an invalid +selector.

                      + +

                      5. Groups of selectors

                      + +

                      When several selectors share the same declarations, they may be +grouped into a comma-separated list. (A comma is U+002C.)

                      + +
                      +

                      CSS examples:

                      +

                      In this example, we condense three rules with identical +declarations into one. Thus,

                      +
                      h1 { font-family: sans-serif }
                      +h2 { font-family: sans-serif }
                      +h3 { font-family: sans-serif }
                      +

                      is equivalent to:

                      +
                      h1, h2, h3 { font-family: sans-serif }
                      +
                      + +

                      Warning: the equivalence is true in this example +because all the selectors are valid selectors. If just one of these +selectors were invalid, the entire group of selectors would be +invalid. This would invalidate the rule for all three heading +elements, whereas in the former case only one of the three individual +heading rules would be invalidated.

                      + + +

                      6. Simple selectors

                      + +

                      6.1. Type selector

                      + +

                      A type selector is the name of a document language +element type. A type selector represents an instance of the element +type in the document tree.

                      + +
                      +

                      Example:

                      +

                      The following selector represents an h1 element in the document tree:

                      +
                      h1
                      +
                      + + +

                      6.1.1. Type selectors and namespaces

                      + +

                      Type selectors allow an optional namespace ([XMLNAMES]) component. A namespace prefix +that has been previously declared may be prepended to the element name +separated by the namespace separator "vertical bar" +(U+007C, |).

                      + +

                      The namespace component may be left empty to indicate that the +selector is only to represent elements with no declared namespace.

                      + +

                      An asterisk may be used for the namespace prefix, indicating that +the selector represents elements in any namespace (including elements +with no namespace).

                      + +

                      Element type selectors that have no namespace component (no +namespace separator), represent elements without regard to the +element's namespace (equivalent to "*|") unless a default +namespace has been declared. If a default namespace has been declared, +the selector will represent only elements in the default +namespace.

                      + +

                      A type selector containing a namespace prefix that has not been +previously declared is an invalid selector. +The mechanism for declaring a namespace prefix is left up to the +language implementing Selectors. In CSS, such a mechanism is defined +in the General Syntax module.

                      + +

                      In a namespace-aware client, element type selectors will only match +against the local part +of the element's qualified +name. See below for notes about matching +behaviors in down-level clients.

                      + +

                      In summary:

                      + +
                      +
                      ns|E
                      +
                      elements with name E in namespace ns
                      +
                      *|E
                      +
                      elements with name E in any namespace, including those without any + declared namespace
                      +
                      |E
                      +
                      elements with name E without any declared namespace
                      +
                      E
                      +
                      if no default namespace has been specified, this is equivalent to *|E. + Otherwise it is equivalent to ns|E where ns is the default namespace.
                      +
                      + +
                      +

                      CSS examples:

                      + +
                      @namespace foo url(http://www.example.com);
                      + foo|h1 { color: blue }
                      + foo|* { color: yellow }
                      + |h1 { color: red }
                      + *|h1 { color: green }
                      + h1 { color: green }
                      + +

                      The first rule will match only h1 elements in the + "http://www.example.com" namespace.

                      + +

                      The second rule will match all elements in the + "http://www.example.com" namespace.

                      + +

                      The third rule will match only h1 elements without + any declared namespace.

                      + +

                      The fourth rule will match h1 elements in any + namespace (including those without any declared namespace).

                      + +

                      The last rule is equivalent to the fourth rule because no default + namespace has been defined.

                      + +
                      + +

                      6.2. Universal selector

                      + +

                      The universal selector, written "asterisk" +(*), represents the qualified name of any element +type. It represents any single element in the document tree in any +namespace (including those without any declared namespace) if no +default namespace has been specified. If a default namespace has been +specified, see Universal selector and +Namespaces below.

                      + +

                      If the universal selector is not the only component of a sequence +of simple selectors, the * may be omitted.

                      + +
                      +

                      Examples:

                      +
                        +
                      • *[hreflang|=en] and [hreflang|=en] are equivalent,
                      • +
                      • *.warning and .warning are equivalent,
                      • +
                      • *#myid and #myid are equivalent.
                      • +
                      +
                      + +

                      Note: it is recommended that the +*, representing the universal selector, not be +omitted.

                      + +

                      6.2.1. Universal selector and namespaces

                      + +

                      The universal selector allows an optional namespace component. It +is used as follows:

                      + +
                      +
                      ns|*
                      +
                      all elements in namespace ns
                      +
                      *|*
                      +
                      all elements
                      +
                      |*
                      +
                      all elements without any declared namespace
                      +
                      *
                      +
                      if no default namespace has been specified, this is equivalent to *|*. + Otherwise it is equivalent to ns|* where ns is the default namespace.
                      +
                      + +

                      A universal selector containing a namespace prefix that has not +been previously declared is an invalid +selector. The mechanism for declaring a namespace prefix is left up +to the language implementing Selectors. In CSS, such a mechanism is +defined in the General Syntax module.

                      + + +

                      6.3. Attribute selectors

                      + +

                      Selectors allow the representation of an element's attributes. When +a selector is used as an expression to match against an element, +attribute selectors must be considered to match an element if that +element has an attribute that matches the attribute represented by the +attribute selector.

                      + +

                      6.3.1. Attribute presence and values +selectors

                      + +

                      CSS2 introduced four attribute selectors:

                      + +
                      +
                      [att] +
                      Represents an element with the att attribute, whatever the value of + the attribute.
                      +
                      [att=val]
                      +
                      Represents an element with the att attribute whose value is exactly + "val".
                      +
                      [att~=val]
                      +
                      Represents an element with the att attribute whose value is a whitespace-separated list of words, one of + which is exactly "val". If "val" contains whitespace, it will never + represent anything (since the words are separated by + spaces).
                      +
                      [att|=val] +
                      Represents an element with the att attribute, its value either + being exactly "val" or beginning with "val" immediately followed by + "-" (U+002D). This is primarily intended to allow language subcode + matches (e.g., the hreflang attribute on the + link element in HTML) as described in RFC 3066 ([RFC3066]). For lang (or + xml:lang) language subcode matching, please see the :lang pseudo-class.
                      +
                      + +

                      Attribute values must be identifiers or strings. The +case-sensitivity of attribute names and values in selectors depends on +the document language.

                      + +
                      + +

                      Examples:

                      + +

                      The following attribute selector represents an h1 + element that carries the title attribute, whatever its + value:

                      + +
                      h1[title]
                      + +

                      In the following example, the selector represents a + span element whose class attribute has + exactly the value "example":

                      + +
                      span[class="example"]
                      + +

                      Multiple attribute selectors can be used to represent several + attributes of an element, or several conditions on the same + attribute. Here, the selector represents a span element + whose hello attribute has exactly the value "Cleveland" + and whose goodbye attribute has exactly the value + "Columbus":

                      + +
                      span[hello="Cleveland"][goodbye="Columbus"]
                      + +

                      The following selectors illustrate the differences between "=" + and "~=". The first selector will represent, for example, the value + "copyright copyleft copyeditor" on a rel attribute. The + second selector will only represent an a element with + an href attribute having the exact value + "http://www.w3.org/".

                      + +
                      a[rel~="copyright"]
                      +a[href="http://www.w3.org/"]
                      + +

                      The following selector represents a link element + whose hreflang attribute is exactly "fr".

                      + +
                      link[hreflang=fr]
                      + +

                      The following selector represents a link element for + which the values of the hreflang attribute begins with + "en", including "en", "en-US", and "en-cockney":

                      + +
                      link[hreflang|="en"]
                      + +

                      Similarly, the following selectors represents a + DIALOGUE element whenever it has one of two different + values for an attribute character:

                      + +
                      DIALOGUE[character=romeo]
                      +DIALOGUE[character=juliet]
                      + +
                      + +

                      6.3.2. Substring matching attribute +selectors

                      + +

                      Three additional attribute selectors are provided for matching +substrings in the value of an attribute:

                      + +
                      +
                      [att^=val]
                      +
                      Represents an element with the att attribute whose value begins + with the prefix "val".
                      +
                      [att$=val] +
                      Represents an element with the att attribute whose value ends with + the suffix "val".
                      +
                      [att*=val] +
                      Represents an element with the att attribute whose value contains + at least one instance of the substring "val".
                      +
                      + +

                      Attribute values must be identifiers or strings. The +case-sensitivity of attribute names in selectors depends on the +document language.

                      + +
                      +

                      Examples:

                      +

                      The following selector represents an HTML object, referencing an + image:

                      +
                      object[type^="image/"]
                      +

                      The following selector represents an HTML anchor a with an + href attribute whose value ends with ".html".

                      +
                      a[href$=".html"]
                      +

                      The following selector represents an HTML paragraph with a title + attribute whose value contains the substring "hello"

                      +
                      p[title*="hello"]
                      +
                      + +

                      6.3.3. Attribute selectors and namespaces

                      + +

                      Attribute selectors allow an optional namespace component to the +attribute name. A namespace prefix that has been previously declared +may be prepended to the attribute name separated by the namespace +separator "vertical bar" (|). In keeping with +the Namespaces in the XML recommendation, default namespaces do not +apply to attributes, therefore attribute selectors without a namespace +component apply only to attributes that have no declared namespace +(equivalent to "|attr"). An asterisk may be used for the +namespace prefix indicating that the selector is to match all +attribute names without regard to the attribute's namespace. + +

                      An attribute selector with an attribute name containing a namespace +prefix that has not been previously declared is an invalid selector. The mechanism for declaring +a namespace prefix is left up to the language implementing Selectors. +In CSS, such a mechanism is defined in the General Syntax module. + +

                      +

                      CSS examples:

                      +
                      @namespace foo "http://www.example.com";
                      +[foo|att=val] { color: blue }
                      +[*|att] { color: yellow }
                      +[|att] { color: green }
                      +[att] { color: green }
                      + +

                      The first rule will match only elements with the attribute + att in the "http://www.example.com" namespace with the + value "val".

                      + +

                      The second rule will match only elements with the attribute + att regardless of the namespace of the attribute + (including no declared namespace).

                      + +

                      The last two rules are equivalent and will match only elements + with the attribute att where the attribute is not + declared to be in a namespace.

                      + +
                      + +

                      6.3.4. Default attribute values in DTDs

                      + +

                      Attribute selectors represent explicitly set attribute values in +the document tree. Default attribute values may be defined in a DTD or +elsewhere, but cannot always be selected by attribute +selectors. Selectors should be designed so that they work even if the +default values are not included in the document tree.

                      + +

                      More precisely, a UA is not required to read an "external +subset" of the DTD but is required to look for default +attribute values in the document's "internal subset." (See [XML10] for definitions of these subsets.)

                      + +

                      A UA that recognizes an XML namespace [XMLNAMES] is not required to use its +knowledge of that namespace to treat default attribute values as if +they were present in the document. (For example, an XHTML UA is not +required to use its built-in knowledge of the XHTML DTD.)

                      + +

                      Note: Typically, implementations +choose to ignore external subsets.

                      + +
                      +

                      Example:

                      + +

                      Consider an element EXAMPLE with an attribute "notation" that has a +default value of "decimal". The DTD fragment might be

                      + +
                      <!ATTLIST EXAMPLE notation (decimal,octal) "decimal">
                      + +

                      If the style sheet contains the rules

                      + +
                      EXAMPLE[notation=decimal] { /*... default property settings ...*/ }
                      +EXAMPLE[notation=octal]   { /*... other settings...*/ }
                      + +

                      the first rule will not match elements whose "notation" attribute +is set by default, i.e. not set explicitly. To catch all cases, the +attribute selector for the default value must be dropped:

                      + +
                      EXAMPLE                   { /*... default property settings ...*/ }
                      +EXAMPLE[notation=octal]   { /*... other settings...*/ }
                      + +

                      Here, because the selector EXAMPLE[notation=octal] is +more specific than the tag +selector alone, the style declarations in the second rule will override +those in the first for elements that have a "notation" attribute value +of "octal". Care has to be taken that all property declarations that +are to apply only to the default case are overridden in the non-default +cases' style rules.

                      + +
                      + +

                      6.4. Class selectors

                      + +

                      Working with HTML, authors may use the period (U+002E, +.) notation as an alternative to the ~= +notation when representing the class attribute. Thus, for +HTML, div.value and div[class~=value] have +the same meaning. The attribute value must immediately follow the +"period" (.).

                      + +

                      UAs may apply selectors using the period (.) notation in XML +documents if the UA has namespace-specific knowledge that allows it to +determine which attribute is the "class" attribute for the +respective namespace. One such example of namespace-specific knowledge +is the prose in the specification for a particular namespace (e.g. SVG +1.0 [SVG] describes the SVG +"class" attribute and how a UA should interpret it, and +similarly MathML 1.01 [MATH] describes the MathML +"class" attribute.)

                      + +
                      +

                      CSS examples:

                      + +

                      We can assign style information to all elements with + class~="pastoral" as follows:

                      + +
                      *.pastoral { color: green }  /* all elements with class~=pastoral */
                      + +

                      or just

                      + +
                      .pastoral { color: green }  /* all elements with class~=pastoral */
                      + +

                      The following assigns style only to H1 elements with + class~="pastoral":

                      + +
                      H1.pastoral { color: green }  /* H1 elements with class~=pastoral */
                      + +

                      Given these rules, the first H1 instance below would not have + green text, while the second would:

                      + +
                      <H1>Not green</H1>
                      +<H1 class="pastoral">Very green</H1>
                      + +
                      + +

                      To represent a subset of "class" values, each value must be preceded +by a ".", in any order.

                      + +
                      + +

                      CSS example:

                      + +

                      The following rule matches any P element whose "class" attribute + has been assigned a list of whitespace-separated values that includes + "pastoral" and "marine":

                      + +
                      p.pastoral.marine { color: green }
                      + +

                      This rule matches when class="pastoral blue aqua + marine" but does not match for class="pastoral + blue".

                      + +
                      + +

                      Note: Because CSS gives considerable +power to the "class" attribute, authors could conceivably design their +own "document language" based on elements with almost no associated +presentation (such as DIV and SPAN in HTML) and assigning style +information through the "class" attribute. Authors should avoid this +practice since the structural elements of a document language often +have recognized and accepted meanings and author-defined classes may +not.

                      + +

                      Note: If an element has multiple +class attributes, their values must be concatenated with spaces +between the values before searching for the class. As of this time the +working group is not aware of any manner in which this situation can +be reached, however, so this behavior is explicitly non-normative in +this specification.

                      + +

                      6.5. ID selectors

                      + +

                      Document languages may contain attributes that are declared to be +of type ID. What makes attributes of type ID special is that no two +such attributes can have the same value in a document, regardless of +the type of the elements that carry them; whatever the document +language, an ID typed attribute can be used to uniquely identify its +element. In HTML all ID attributes are named "id"; XML applications +may name ID attributes differently, but the same restriction +applies.

                      + +

                      An ID-typed attribute of a document language allows authors to +assign an identifier to one element instance in the document tree. W3C +ID selectors represent an element instance based on its identifier. An +ID selector contains a "number sign" (U+0023, +#) immediately followed by the ID value, which must be an +identifier.

                      + +

                      Selectors does not specify how a UA knows the ID-typed attribute of +an element. The UA may, e.g., read a document's DTD, have the +information hard-coded or ask the user. + +

                      +

                      Examples:

                      +

                      The following ID selector represents an h1 element + whose ID-typed attribute has the value "chapter1":

                      +
                      h1#chapter1
                      +

                      The following ID selector represents any element whose ID-typed + attribute has the value "chapter1":

                      +
                      #chapter1
                      +

                      The following selector represents any element whose ID-typed + attribute has the value "z98y".

                      +
                      *#z98y
                      +
                      + +

                      Note. In XML 1.0 [XML10], the information about which attribute +contains an element's IDs is contained in a DTD or a schema. When +parsing XML, UAs do not always read the DTD, and thus may not know +what the ID of an element is (though a UA may have namespace-specific +knowledge that allows it to determine which attribute is the ID +attribute for that namespace). If a style sheet designer knows or +suspects that a UA may not know what the ID of an element is, he +should use normal attribute selectors instead: +[name=p371] instead of #p371. Elements in +XML 1.0 documents without a DTD do not have IDs at all.

                      + +

                      If an element has multiple ID attributes, all of them must be +treated as IDs for that element for the purposes of the ID +selector. Such a situation could be reached using mixtures of xml:id, +DOM3 Core, XML DTDs, and namespace-specific knowledge.

                      + +

                      6.6. Pseudo-classes

                      + +

                      The pseudo-class concept is introduced to permit selection based on +information that lies outside of the document tree or that cannot be +expressed using the other simple selectors.

                      + +

                      A pseudo-class always consists of a "colon" +(:) followed by the name of the pseudo-class and +optionally by a value between parentheses.

                      + +

                      Pseudo-classes are allowed in all sequences of simple selectors +contained in a selector. Pseudo-classes are allowed anywhere in +sequences of simple selectors, after the leading type selector or +universal selector (possibly omitted). Pseudo-class names are +case-insensitive. Some pseudo-classes are mutually exclusive, while +others can be applied simultaneously to the same +element. Pseudo-classes may be dynamic, in the sense that an element +may acquire or lose a pseudo-class while a user interacts with the +document.

                      + + +

                      6.6.1. Dynamic pseudo-classes

                      + +

                      Dynamic pseudo-classes classify elements on characteristics other +than their name, attributes, or content, in principle characteristics +that cannot be deduced from the document tree.

                      + +

                      Dynamic pseudo-classes do not appear in the document source or +document tree.

                      + + +
                      The link pseudo-classes: :link and :visited
                      + +

                      User agents commonly display unvisited links differently from +previously visited ones. Selectors +provides the pseudo-classes :link and +:visited to distinguish them:

                      + +
                        +
                      • The :link pseudo-class applies to links that have + not yet been visited.
                      • +
                      • The :visited pseudo-class applies once the link has + been visited by the user.
                      • +
                      + +

                      After some amount of time, user agents may choose to return a +visited link to the (unvisited) ':link' state.

                      + +

                      The two states are mutually exclusive.

                      + +
                      + +

                      Example:

                      + +

                      The following selector represents links carrying class + external and already visited:

                      + +
                      a.external:visited
                      + +
                      + +

                      Note: It is possible for style sheet +authors to abuse the :link and :visited pseudo-classes to determine +which sites a user has visited without the user's consent. + +

                      UAs may therefore treat all links as unvisited links, or implement +other measures to preserve the user's privacy while rendering visited +and unvisited links differently.

                      + +
                      The user action pseudo-classes +:hover, :active, and :focus
                      + +

                      Interactive user agents sometimes change the rendering in response +to user actions. Selectors provides +three pseudo-classes for the selection of an element the user is +acting on.

                      + +
                        + +
                      • The :hover pseudo-class applies while the user + designates an element with a pointing device, but does not activate + it. For example, a visual user agent could apply this pseudo-class + when the cursor (mouse pointer) hovers over a box generated by the + element. User agents not that do not support interactive + media do not have to support this pseudo-class. Some conforming + user agents that support interactive + media may not be able to support this pseudo-class (e.g., a pen + device that does not detect hovering).
                      • + +
                      • The :active pseudo-class applies while an element + is being activated by the user. For example, between the times the + user presses the mouse button and releases it.
                      • + +
                      • The :focus pseudo-class applies while an element + has the focus (accepts keyboard or mouse events, or other forms of + input).
                      • + +
                      + +

                      There may be document language or implementation specific limits on +which elements can become :active or acquire +:focus.

                      + +

                      These pseudo-classes are not mutually exclusive. An element may +match several pseudo-classes at the same time.

                      + +

                      Selectors doesn't define if the parent of an element that is +':active' or ':hover' is also in that state.

                      + +
                      +

                      Examples:

                      +
                      a:link    /* unvisited links */
                      +a:visited /* visited links */
                      +a:hover   /* user hovers */
                      +a:active  /* active links */
                      +

                      An example of combining dynamic pseudo-classes:

                      +
                      a:focus
                      +a:focus:hover
                      +

                      The last selector matches a elements that are in + the pseudo-class :focus and in the pseudo-class :hover.

                      +
                      + +

                      Note: An element can be both ':visited' +and ':active' (or ':link' and ':active').

                      + +

                      6.6.2. The target pseudo-class :target

                      + +

                      Some URIs refer to a location within a resource. This kind of URI +ends with a "number sign" (#) followed by an anchor +identifier (called the fragment identifier).

                      + +

                      URIs with fragment identifiers link to a certain element within the +document, known as the target element. For instance, here is a URI +pointing to an anchor named section_2 in an HTML +document:

                      + +
                      http://example.com/html/top.html#section_2
                      + +

                      A target element can be represented by the :target +pseudo-class. If the document's URI has no fragment identifier, then +the document has no target element.

                      + +
                      +

                      Example:

                      +
                      p.note:target
                      +

                      This selector represents a p element of class + note that is the target element of the referring + URI.

                      +
                      + +
                      +

                      CSS example:

                      +

                      Here, the :target pseudo-class is used to make the + target element red and place an image before it, if there is one:

                      +
                      *:target { color : red }
                      +*:target::before { content : url(target.png) }
                      +
                      + +

                      6.6.3. The language pseudo-class :lang

                      + +

                      If the document language specifies how the human language of an +element is determined, it is possible to write selectors that +represent an element based on its language. For example, in HTML [HTML4], the language is determined by a +combination of the lang attribute, the meta +element, and possibly by information from the protocol (such as HTTP +headers). XML uses an attribute called xml:lang, and +there may be other document language-specific methods for determining +the language.

                      + +

                      The pseudo-class :lang(C) represents an element that +is in language C. Whether an element is represented by a +:lang() selector is based solely on the identifier C +being either equal to, or a hyphen-separated substring of, the +element's language value, in the same way as if performed by the '|=' operator in attribute +selectors. The identifier C does not have to be a valid language +name.

                      + +

                      C must not be empty. (If it is, the selector is invalid.)

                      + +

                      Note: It is recommended that +documents and protocols indicate language using codes from RFC 3066 [RFC3066] or its successor, and by means of +"xml:lang" attributes in the case of XML-based documents [XML10]. See +"FAQ: Two-letter or three-letter language codes."

                      + +
                      +

                      Examples:

                      +

                      The two following selectors represent an HTML document that is in + Belgian, French, or German. The two next selectors represent + q quotations in an arbitrary element in Belgian, French, + or German.

                      +
                      html:lang(fr-be)
                      +html:lang(de)
                      +:lang(fr-be) > q
                      +:lang(de) > q
                      +
                      + +

                      6.6.4. The UI element states pseudo-classes

                      + +
                      The :enabled and :disabled pseudo-classes
                      + +

                      The :enabled pseudo-class allows authors to customize +the look of user interface elements that are enabled — which the +user can select or activate in some fashion (e.g. clicking on a button +with a mouse). There is a need for such a pseudo-class because there +is no way to programmatically specify the default appearance of say, +an enabled input element without also specifying what it +would look like when it was disabled.

                      + +

                      Similar to :enabled, :disabled allows the +author to specify precisely how a disabled or inactive user interface +element should look.

                      + +

                      Most elements will be neither enabled nor disabled. An element is +enabled if the user can either activate it or transfer the focus to +it. An element is disabled if it could be enabled, but the user cannot +presently activate it or transfer focus to it.

                      + + +
                      The :checked pseudo-class
                      + +

                      Radio and checkbox elements can be toggled by the user. Some menu +items are "checked" when the user selects them. When such elements are +toggled "on" the :checked pseudo-class applies. The +:checked pseudo-class initially applies to such elements +that have the HTML4 selected and checked +attributes as described in Section +17.2.1 of HTML4, but of course the user can toggle "off" such +elements in which case the :checked pseudo-class would no +longer apply. While the :checked pseudo-class is dynamic +in nature, and is altered by user action, since it can also be based +on the presence of the semantic HTML4 selected and +checked attributes, it applies to all media. + + +

                      The :indeterminate pseudo-class
                      + +
                      + +

                      Radio and checkbox elements can be toggled by the user, but are +sometimes in an indeterminate state, neither checked nor unchecked. +This can be due to an element attribute, or DOM manipulation.

                      + +

                      A future version of this specification may introduce an +:indeterminate pseudo-class that applies to such elements. +

                      + +
                      + + +

                      6.6.5. Structural pseudo-classes

                      + +

                      Selectors introduces the concept of structural +pseudo-classes to permit selection based on extra information that lies in +the document tree but cannot be represented by other simple selectors or +combinators. + +

                      Note that standalone pieces of PCDATA (text nodes in the DOM) are +not counted when calculating the position of an element in the list of +children of its parent. When calculating the position of an element in +the list of children of its parent, the index numbering starts at 1. + + +

                      :root pseudo-class
                      + +

                      The :root pseudo-class represents an element that is +the root of the document. In HTML 4, this is always the +HTML element. + + +

                      :nth-child() pseudo-class
                      + +

                      The +:nth-child(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings +before it in the document tree, for a given positive +integer or zero value of n, and has a parent element. In +other words, this matches the bth child of an element after +all the children have been split into groups of a elements +each. For example, this allows the selectors to address every other +row in a table, and could be used to alternate the color +of paragraph text in a cycle of four. The a and +b values must be zero, negative integers or positive +integers. The index of the first child of an element is 1. + +

                      In addition to this, :nth-child() can take +'odd' and 'even' as arguments instead. +'odd' has the same signification as 2n+1, +and 'even' has the same signification as 2n. + + +

                      +

                      Examples:

                      +
                      tr:nth-child(2n+1) /* represents every odd row of an HTML table */
                      +tr:nth-child(odd)  /* same */
                      +tr:nth-child(2n)   /* represents every even row of an HTML table */
                      +tr:nth-child(even) /* same */
                      +
                      +/* Alternate paragraph colours in CSS */
                      +p:nth-child(4n+1) { color: navy; }
                      +p:nth-child(4n+2) { color: green; }
                      +p:nth-child(4n+3) { color: maroon; }
                      +p:nth-child(4n+4) { color: purple; }
                      +
                      + +

                      When a=0, no repeating is used, so for example +:nth-child(0n+5) matches only the fifth child. When +a=0, the an part need not be +included, so the syntax simplifies to +:nth-child(b) and the last example simplifies +to :nth-child(5). + +

                      +

                      Examples:

                      +
                      foo:nth-child(0n+1)   /* represents an element foo, first child of its parent element */
                      +foo:nth-child(1)      /* same */
                      +
                      + +

                      When a=1, the number may be omitted from the rule. + +

                      +

                      Examples:

                      +

                      The following selectors are therefore equivalent:

                      +
                      bar:nth-child(1n+0)   /* represents all bar elements, specificity (0,1,1) */
                      +bar:nth-child(n+0)    /* same */
                      +bar:nth-child(n)      /* same */
                      +bar                   /* same but lower specificity (0,0,1) */
                      +
                      + +

                      If b=0, then every ath element is picked. In +such a case, the b part may be omitted. + +

                      +

                      Examples:

                      +
                      tr:nth-child(2n+0) /* represents every even row of an HTML table */
                      +tr:nth-child(2n) /* same */
                      +
                      + +

                      If both a and b are equal to zero, the +pseudo-class represents no element in the document tree.

                      + +

                      The value a can be negative, but only the positive +values of an+b, for +n≥0, may represent an element in the document +tree.

                      + +
                      +

                      Example:

                      +
                      html|tr:nth-child(-n+6)  /* represents the 6 first rows of XHTML tables */
                      +
                      + +

                      When the value b is negative, the "+" character in the +expression must be removed (it is effectively replaced by the "-" +character indicating the negative value of b).

                      + +
                      +

                      Examples:

                      +
                      :nth-child(10n-1)  /* represents the 9th, 19th, 29th, etc, element */
                      +:nth-child(10n+9)  /* Same */
                      +:nth-child(10n+-1) /* Syntactically invalid, and would be ignored */
                      +
                      + + +
                      :nth-last-child() pseudo-class
                      + +

                      The :nth-last-child(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings +after it in the document tree, for a given positive +integer or zero value of n, and has a parent element. See +:nth-child() pseudo-class for the syntax of its argument. +It also accepts the 'even' and 'odd' values +as arguments. + + +

                      +

                      Examples:

                      +
                      tr:nth-last-child(-n+2)    /* represents the two last rows of an HTML table */
                      +
                      +foo:nth-last-child(odd)    /* represents all odd foo elements in their parent element,
                      +                              counting from the last one */
                      +
                      + + +
                      :nth-of-type() pseudo-class
                      + +

                      The :nth-of-type(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings with the same +element name before it in the document tree, for a +given zero or positive integer value of n, and has a +parent element. In other words, this matches the bth child +of that type after all the children of that type have been split into +groups of a elements each. See :nth-child() pseudo-class +for the syntax of its argument. It also accepts the +'even' and 'odd' values. + + +

                      +

                      CSS example:

                      +

                      This allows an author to alternate the position of floated images:

                      +
                      img:nth-of-type(2n+1) { float: right; }
                      +img:nth-of-type(2n) { float: left; }
                      +
                      + + +
                      :nth-last-of-type() pseudo-class
                      + +

                      The :nth-last-of-type(an+b) +pseudo-class notation represents an element that has +an+b-1 siblings with the same +element name after it in the document tree, for a +given zero or positive integer value of n, and has a +parent element. See :nth-child() pseudo-class for the +syntax of its argument. It also accepts the 'even' and 'odd' values. + + +

                      +

                      Example:

                      +

                      To represent all h2 children of an XHTML + body except the first and last, one could use the + following selector:

                      +
                      body > h2:nth-of-type(n+2):nth-last-of-type(n+2)
                      +

                      In this case, one could also use :not(), although the + selector ends up being just as long:

                      +
                      body > h2:not(:first-of-type):not(:last-of-type)
                      +
                      + + +
                      :first-child pseudo-class
                      + +

                      Same as :nth-child(1). The :first-child pseudo-class +represents an element that is the first child of some other element. + + +

                      +

                      Examples:

                      +

                      The following selector represents a p element that is + the first child of a div element:

                      +
                      div > p:first-child
                      +

                      This selector can represent the p inside the + div of the following fragment:

                      +
                      <p> The last P before the note.</p>
                      +<div class="note">
                      +   <p> The first P inside the note.</p>
                      +</div>
                      but cannot represent the second p in the following +fragment: +
                      <p> The last P before the note.</p>
                      +<div class="note">
                      +   <h2> Note </h2>
                      +   <p> The first P inside the note.</p>
                      +</div>
                      +

                      The following two selectors are usually equivalent:

                      +
                      * > a:first-child /* a is first child of any element */
                      +a:first-child /* Same (assuming a is not the root element) */
                      +
                      + +
                      :last-child pseudo-class
                      + +

                      Same as :nth-last-child(1). The :last-child pseudo-class +represents an element that is the last child of some other element. + +

                      +

                      Example:

                      +

                      The following selector represents a list item li that + is the last child of an ordered list ol. +

                      ol > li:last-child
                      +
                      + +
                      :first-of-type pseudo-class
                      + +

                      Same as :nth-of-type(1). The :first-of-type pseudo-class +represents an element that is the first sibling of its type in the list of +children of its parent element. + +

                      +

                      Example:

                      +

                      The following selector represents a definition title +dt inside a definition list dl, this +dt being the first of its type in the list of children of +its parent element.

                      +
                      dl dt:first-of-type
                      +

                      It is a valid description for the first two dt +elements in the following example but not for the third one:

                      +
                      <dl>
                      + <dt>gigogne</dt>
                      + <dd>
                      +  <dl>
                      +   <dt>fusée</dt>
                      +   <dd>multistage rocket</dd>
                      +   <dt>table</dt>
                      +   <dd>nest of tables</dd>
                      +  </dl>
                      + </dd>
                      +</dl>
                      +
                      + +
                      :last-of-type pseudo-class
                      + +

                      Same as :nth-last-of-type(1). The +:last-of-type pseudo-class represents an element that is +the last sibling of its type in the list of children of its parent +element.

                      + +
                      +

                      Example:

                      +

                      The following selector represents the last data cell + td of a table row.

                      +
                      tr > td:last-of-type
                      +
                      + +
                      :only-child pseudo-class
                      + +

                      Represents an element that has a parent element and whose parent +element has no other element children. Same as +:first-child:last-child or +:nth-child(1):nth-last-child(1), but with a lower +specificity.

                      + +
                      :only-of-type pseudo-class
                      + +

                      Represents an element that has a parent element and whose parent +element has no other element children with the same element name. Same +as :first-of-type:last-of-type or +:nth-of-type(1):nth-last-of-type(1), but with a lower +specificity.

                      + + +
                      :empty pseudo-class
                      + +

                      The :empty pseudo-class represents an element that has +no children at all. In terms of the DOM, only element nodes and text +nodes (including CDATA nodes and entity references) whose data has a +non-zero length must be considered as affecting emptiness; comments, +PIs, and other nodes must not affect whether an element is considered +empty or not.

                      + +
                      +

                      Examples:

                      +

                      p:empty is a valid representation of the following fragment:

                      +
                      <p></p>
                      +

                      foo:empty is not a valid representation for the + following fragments:

                      +
                      <foo>bar</foo>
                      +
                      <foo><bar>bla</bar></foo>
                      +
                      <foo>this is not <bar>:empty</bar></foo>
                      +
                      + +

                      6.6.6. Blank

                      + +

                      This section intentionally left blank.

                      + + +

                      6.6.7. The negation pseudo-class

                      + +

                      The negation pseudo-class, :not(X), is a +functional notation taking a simple +selector (excluding the negation pseudo-class itself and +pseudo-elements) as an argument. It represents an element that is not +represented by the argument. + + + +

                      +

                      Examples:

                      +

                      The following CSS selector matches all button + elements in an HTML document that are not disabled.

                      +
                      button:not([DISABLED])
                      +

                      The following selector represents all but FOO + elements.

                      +
                      *:not(FOO)
                      +

                      The following group of selectors represents all HTML elements + except links.

                      +
                      html|*:not(:link):not(:visited)
                      +
                      + +

                      Default namespace declarations do not affect the argument of the +negation pseudo-class unless the argument is a universal selector or a +type selector.

                      + +
                      +

                      Examples:

                      +

                      Assuming that the default namespace is bound to + "http://example.com/", the following selector represents all + elements that are not in that namespace:

                      +
                      *|*:not(*)
                      +

                      The following CSS selector matches any element being hovered, + regardless of its namespace. In particular, it is not limited to + only matching elements in the default namespace that are not being + hovered, and elements not in the default namespace don't match the + rule when they are being hovered.

                      +
                      *|*:not(:hover)
                      +
                      + +

                      Note: the :not() pseudo allows +useless selectors to be written. For instance :not(*|*), +which represents no element at all, or foo:not(bar), +which is equivalent to foo but with a higher +specificity.

                      + +

                      7. Pseudo-elements

                      + +

                      Pseudo-elements create abstractions about the document tree beyond +those specified by the document language. For instance, document +languages do not offer mechanisms to access the first letter or first +line of an element's content. Pseudo-elements allow designers to refer +to this otherwise inaccessible information. Pseudo-elements may also +provide designers a way to refer to content that does not exist in the +source document (e.g., the ::before and +::after pseudo-elements give access to generated +content).

                      + +

                      A pseudo-element is made of two colons (::) followed +by the name of the pseudo-element.

                      + +

                      This :: notation is introduced by the current document +in order to establish a discrimination between pseudo-classes and +pseudo-elements. For compatibility with existing style sheets, user +agents must also accept the previous one-colon notation for +pseudo-elements introduced in CSS levels 1 and 2 (namely, +:first-line, :first-letter, +:before and :after). This compatibility is +not allowed for the new pseudo-elements introduced in CSS level 3.

                      + +

                      Only one pseudo-element may appear per selector, and if present it +must appear after the sequence of simple selectors that represents the +subjects of the selector. A +future version of this specification may allow multiple +pesudo-elements per selector.

                      + +

                      7.1. The ::first-line pseudo-element

                      + +

                      The ::first-line pseudo-element describes the contents +of the first formatted line of an element. + +

                      +

                      CSS example:

                      +
                      p::first-line { text-transform: uppercase }
                      +

                      The above rule means "change the letters of the first line of every +paragraph to uppercase".

                      +
                      + +

                      The selector p::first-line does not match any real +HTML element. It does match a pseudo-element that conforming user +agents will insert at the beginning of every paragraph.

                      + +

                      Note that the length of the first line depends on a number of +factors, including the width of the page, the font size, etc. Thus, +an ordinary HTML paragraph such as:

                      + +
                      +<P>This is a somewhat long HTML 
                      +paragraph that will be broken into several 
                      +lines. The first line will be identified
                      +by a fictional tag sequence. The other lines 
                      +will be treated as ordinary lines in the 
                      +paragraph.</P>
                      +
                      + +

                      the lines of which happen to be broken as follows: + +

                      +THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT
                      +will be broken into several lines. The first
                      +line will be identified by a fictional tag 
                      +sequence. The other lines will be treated as 
                      +ordinary lines in the paragraph.
                      +
                      + +

                      This paragraph might be "rewritten" by user agents to include the +fictional tag sequence for ::first-line. This +fictional tag sequence helps to show how properties are inherited.

                      + +
                      +<P><P::first-line> This is a somewhat long HTML 
                      +paragraph that </P::first-line> will be broken into several
                      +lines. The first line will be identified 
                      +by a fictional tag sequence. The other lines 
                      +will be treated as ordinary lines in the 
                      +paragraph.</P>
                      +
                      + +

                      If a pseudo-element breaks up a real element, the desired effect +can often be described by a fictional tag sequence that closes and +then re-opens the element. Thus, if we mark up the previous paragraph +with a span element:

                      + +
                      +<P><SPAN class="test"> This is a somewhat long HTML
                      +paragraph that will be broken into several
                      +lines.</SPAN> The first line will be identified
                      +by a fictional tag sequence. The other lines 
                      +will be treated as ordinary lines in the 
                      +paragraph.</P>
                      +
                      + +

                      the user agent could simulate start and end tags for +span when inserting the fictional tag sequence for +::first-line. + +

                      +<P><P::first-line><SPAN class="test"> This is a
                      +somewhat long HTML
                      +paragraph that will </SPAN></P::first-line><SPAN class="test"> be
                      +broken into several
                      +lines.</SPAN> The first line will be identified
                      +by a fictional tag sequence. The other lines
                      +will be treated as ordinary lines in the 
                      +paragraph.</P>
                      +
                      + +

                      In CSS, the ::first-line pseudo-element can only be +attached to a block-level element, an inline-block, a table-caption, +or a table-cell.

                      + +

                      The "first formatted line" of an +element may occur inside a +block-level descendant in the same flow (i.e., a block-level +descendant that is not positioned and not a float). E.g., the first +line of the div in <DIV><P>This +line...</P></DIV> is the first line of the p (assuming +that both p and div are block-level). + +

                      The first line of a table-cell or inline-block cannot be the first +formatted line of an ancestor element. Thus, in <DIV><P +STYLE="display: inline-block">Hello<BR>Goodbye</P> +etcetera</DIV> the first formatted line of the +div is not the line "Hello". + +

                      Note that the first line of the p in this +fragment: <p><br>First... doesn't contain any +letters (assuming the default style for br in HTML +4). The word "First" is not on the first formatted line. + +

                      A UA should act as if the fictional start tags of the +::first-line pseudo-elements were nested just inside the +innermost enclosing block-level element. (Since CSS1 and CSS2 were +silent on this case, authors should not rely on this behavior.) Here +is an example. The fictional tag sequence for

                      + +
                      +<DIV>
                      +  <P>First paragraph</P>
                      +  <P>Second paragraph</P>
                      +</DIV>
                      +
                      + +

                      is

                      + +
                      +<DIV>
                      +  <P><DIV::first-line><P::first-line>First paragraph</P::first-line></DIV::first-line></P>
                      +  <P><P::first-line>Second paragraph</P::first-line></P>
                      +</DIV>
                      +
                      + +

                      The ::first-line pseudo-element is similar to an +inline-level element, but with certain restrictions. In CSS, the +following properties apply to a ::first-line +pseudo-element: font properties, color property, background +properties, 'word-spacing', 'letter-spacing', 'text-decoration', +'vertical-align', 'text-transform', 'line-height'. UAs may apply other +properties as well.

                      + + +

                      7.2. The ::first-letter pseudo-element

                      + +

                      The ::first-letter pseudo-element represents the first +letter of the first line of a block, if it is not preceded by any +other content (such as images or inline tables) on its line. The +::first-letter pseudo-element may be used for "initial caps" and "drop +caps", which are common typographical effects. This type of initial +letter is similar to an inline-level element if its 'float' property +is 'none'; otherwise, it is similar to a floated element.

                      + +

                      In CSS, these are the properties that apply to ::first-letter +pseudo-elements: font properties, 'text-decoration', 'text-transform', +'letter-spacing', 'word-spacing' (when appropriate), 'line-height', +'float', 'vertical-align' (only if 'float' is 'none'), margin +properties, padding properties, border properties, color property, +background properties. UAs may apply other properties as well. To +allow UAs to render a typographically correct drop cap or initial cap, +the UA may choose a line-height, width and height based on the shape +of the letter, unlike for normal elements.

                      + +
                      +

                      Example:

                      +

                      This example shows a possible rendering of an initial cap. Note +that the 'line-height' that is inherited by the ::first-letter +pseudo-element is 1.1, but the UA in this example has computed the +height of the first letter differently, so that it doesn't cause any +unnecessary space between the first two lines. Also note that the +fictional start tag of the first letter is inside the span, and thus +the font weight of the first letter is normal, not bold as the span: +

                      +p { line-height: 1.1 }
                      +p::first-letter { font-size: 3em; font-weight: normal }
                      +span { font-weight: bold }
                      +...
                      +<p><span>Het hemelsche</span> gerecht heeft zich ten lange lesten<br>
                      +Erbarremt over my en mijn benaeuwde vesten<br>
                      +En arme burgery, en op mijn volcx gebed<br>
                      +En dagelix geschrey de bange stad ontzet.
                      +
                      +
                      +

                      Image illustrating the ::first-letter pseudo-element +

                      +
                      + +
                      +

                      The following CSS will make a drop cap initial letter span about two lines:

                      + +
                      +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
                      +<HTML>
                      + <HEAD>
                      +  <TITLE>Drop cap initial letter</TITLE>
                      +  <STYLE type="text/css">
                      +   P               { font-size: 12pt; line-height: 1.2 }
                      +   P::first-letter { font-size: 200%; font-weight: bold; float: left }
                      +   SPAN            { text-transform: uppercase }
                      +  </STYLE>
                      + </HEAD>
                      + <BODY>
                      +  <P><SPAN>The first</SPAN> few words of an article
                      +    in The Economist.</P>
                      + </BODY>
                      +</HTML>
                      +
                      + +

                      This example might be formatted as follows:

                      + +
                      +

                      Image illustrating the combined effect of the ::first-letter and ::first-line pseudo-elements

                      +
                      + +

                      The fictional tag sequence is:

                      + +
                      +<P>
                      +<SPAN>
                      +<P::first-letter>
                      +T
                      +</P::first-letter>he first
                      +</SPAN> 
                      +few words of an article in the Economist.
                      +</P>
                      +
                      + +

                      Note that the ::first-letter pseudo-element tags abut +the content (i.e., the initial character), while the ::first-line +pseudo-element start tag is inserted right after the start tag of the +block element.

                      + +

                      In order to achieve traditional drop caps formatting, user agents +may approximate font sizes, for example to align baselines. Also, the +glyph outline may be taken into account when formatting.

                      + +

                      Punctuation (i.e, characters defined in Unicode in the "open" (Ps), +"close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po) +punctuation classes), that precedes or follows the first letter should +be included. [UNICODE]

                      + +
                      +

                      Quotes that precede the
+first letter should be included.

                      +
                      + +

                      The ::first-letter also applies if the first letter is +in fact a digit, e.g., the "6" in "67 million dollars is a lot of +money."

                      + +

                      In CSS, the ::first-letter pseudo-element applies to +block, list-item, table-cell, table-caption, and inline-block +elements. A future version of this specification +may allow this pesudo-element to apply to more element +types.

                      + +

                      The ::first-letter pseudo-element can be used with all +such elements that contain text, or that have a descendant in the same +flow that contains text. A UA should act as if the fictional start tag +of the ::first-letter pseudo-element is just before the first text of +the element, even if that first text is in a descendant.

                      + +
                      +

                      Example:

                      +

                      The fictional tag sequence for this HTMLfragment: +

                      <div>
                      +<p>The first text.
                      +

                      is: +

                      <div>
                      +<p><div::first-letter><p::first-letter>T</...></...>he first text.
                      +
                      + +

                      The first letter of a table-cell or inline-block cannot be the +first letter of an ancestor element. Thus, in <DIV><P +STYLE="display: inline-block">Hello<BR>Goodbye</P> +etcetera</DIV> the first letter of the div is not the +letter "H". In fact, the div doesn't have a first letter. + +

                      The first letter must occur on the first formatted line. For example, in +this fragment: <p><br>First... the first line +doesn't contain any letters and ::first-letter doesn't +match anything (assuming the default style for br in HTML +4). In particular, it does not match the "F" of "First." + +

                      In CSS, if an element is a list item ('display: list-item'), the +::first-letter applies to the first letter in the +principal box after the marker. UAs may ignore +::first-letter on list items with 'list-style-position: +inside'. If an element has ::before or +::after content, the ::first-letter applies +to the first letter of the element including that content. + +

                      +

                      Example:

                      +

                      After the rule 'p::before {content: "Note: "}', the selector +'p::first-letter' matches the "N" of "Note".

                      +
                      + +

                      Some languages may have specific rules about how to treat certain +letter combinations. In Dutch, for example, if the letter combination +"ij" appears at the beginning of a word, both letters should be +considered within the ::first-letter pseudo-element. + +

                      If the letters that would form the ::first-letter are not in the +same element, such as "'T" in <p>'<em>T..., the UA +may create a ::first-letter pseudo-element from one of the elements, +both elements, or simply not create a pseudo-element.

                      + +

                      Similarly, if the first letter(s) of the block are not at the start +of the line (for example due to bidirectional reordering), then the UA +need not create the pseudo-element(s). + +

                      +

                      Example:

                      +

                      The following example illustrates +how overlapping pseudo-elements may interact. The first letter of +each P element will be green with a font size of '24pt'. The rest of +the first formatted line will be 'blue' while the rest of the +paragraph will be 'red'.

                      + +
                      p { color: red; font-size: 12pt }
                      +p::first-letter { color: green; font-size: 200% }
                      +p::first-line { color: blue }
                      +
                      +<P>Some text that ends up on two lines</P>
                      + +

                      Assuming that a line break will occur before the word "ends", the +fictional tag +sequence for this fragment might be:

                      + +
                      <P>
                      +<P::first-line>
                      +<P::first-letter> 
                      +S 
                      +</P::first-letter>ome text that 
                      +</P::first-line> 
                      +ends up on two lines 
                      +</P>
                      + +

                      Note that the ::first-letter element is inside the ::first-line +element. Properties set on ::first-line are inherited by +::first-letter, but are overridden if the same property is set on +::first-letter.

                      +
                      + + +

                      7.3. The ::selection pseudo-element

                      + +

                      The ::selection pseudo-element applies to the portion +of a document that has been highlighted by the user. This also +applies, for example, to selected text within an editable text +field. This pseudo-element should not be confused with the :checked pseudo-class (which used to be +named :selected) + +

                      Although the ::selection pseudo-element is dynamic in +nature, and is altered by user action, it is reasonable to expect that +when a UA re-renders to a static medium (such as a printed page, see +[CSS21]) which was originally rendered to a +dynamic medium (like screen), the UA may wish to transfer the current +::selection state to that other medium, and have all the +appropriate formatting and rendering take effect as well. This is not +required — UAs may omit the ::selection +pseudo-element for static media. + +

                      These are the CSS properties that apply to ::selection +pseudo-elements: color, background, cursor (optional), outline +(optional). The computed value of the 'background-image' property on +::selection may be ignored. + + +

                      7.4. The ::before and ::after pseudo-elements

                      + +

                      The ::before and ::after pseudo-elements +can be used to describe generated content before or after an element's +content. They are explained in CSS 2.1 [CSS21].

                      + +

                      When the ::first-letter and ::first-line +pseudo-elements are combined with ::before and +::after, they apply to the first letter or line of the +element including the inserted text.

                      + +

                      8. Combinators

                      + +

                      8.1. Descendant combinator

                      + +

                      At times, authors may want selectors to describe an element that is +the descendant of another element in the document tree (e.g., "an +EM element that is contained within an H1 +element"). Descendant combinators express such a relationship. A +descendant combinator is white space that +separates two sequences of simple selectors. A selector of the form +"A B" represents an element B that is an +arbitrary descendant of some ancestor element A. + +

                      +

                      Examples:

                      +

                      For example, consider the following selector:

                      +
                      h1 em
                      +

                      It represents an em element being the descendant of + an h1 element. It is a correct and valid, but partial, + description of the following fragment:

                      +
                      <h1>This <span class="myclass">headline
                      +is <em>very</em> important</span></h1>
                      +

                      The following selector:

                      +
                      div * p
                      +

                      represents a p element that is a grandchild or later + descendant of a div element. Note the whitespace on + either side of the "*" is not part of the universal selector; the + whitespace is a combinator indicating that the DIV must be the + ancestor of some element, and that that element must be an ancestor + of the P.

                      +

                      The following selector, which combines descendant combinators and + attribute selectors, represents an + element that (1) has the href attribute set and (2) is + inside a p that is itself inside a div:

                      +
                      div p *[href]
                      +
                      + +

                      8.2. Child combinators

                      + +

                      A child combinator describes a childhood relationship +between two elements. A child combinator is made of the +"greater-than sign" (>) character and +separates two sequences of simple selectors. + + +

                      +

                      Examples:

                      +

                      The following selector represents a p element that is + child of body:

                      +
                      body > p
                      +

                      The following example combines descendant combinators and child + combinators.

                      +
                      div ol>li p
                      +

                      It represents a p element that is a descendant of an + li element; the li element must be the + child of an ol element; the ol element must + be a descendant of a div. Notice that the optional white + space around the ">" combinator has been left out.

                      +
                      + +

                      For information on selecting the first child of an element, please +see the section on the :first-child pseudo-class +above.

                      + +

                      8.3. Sibling combinators

                      + +

                      There are two different sibling combinators: the adjacent sibling +combinator and the general sibling combinator. In both cases, +non-element nodes (e.g. text between elements) are ignored when +considering adjacency of elements.

                      + +

                      8.3.1. Adjacent sibling combinator

                      + +

                      The adjacent sibling combinator is made of the "plus +sign" (U+002B, +) character that separates two +sequences of simple selectors. The elements represented by the two +sequences share the same parent in the document tree and the element +represented by the first sequence immediately precedes the element +represented by the second one.

                      + +
                      +

                      Examples:

                      +

                      The following selector represents a p element + immediately following a math element:

                      +
                      math + p
                      +

                      The following selector is conceptually similar to the one in the + previous example, except that it adds an attribute selector — it + adds a constraint to the h1 element, that it must have + class="opener":

                      +
                      h1.opener + h2
                      +
                      + + +

                      8.3.2. General sibling combinator

                      + +

                      The general sibling combinator is made of the "tilde" +(U+007E, ~) character that separates two sequences of +simple selectors. The elements represented by the two sequences share +the same parent in the document tree and the element represented by +the first sequence precedes (not necessarily immediately) the element +represented by the second one.

                      + +
                      +

                      Example:

                      +
                      h1 ~ pre
                      +

                      represents a pre element following an h1. It + is a correct and valid, but partial, description of:

                      +
                      <h1>Definition of the function a</h1>
                      +<p>Function a(x) has to be applied to all figures in the table.</p>
                      +<pre>function a(x) = 12x/13.5</pre>
                      +
                      + +

                      9. Calculating a selector's specificity

                      + +

                      A selector's specificity is calculated as follows:

                      + +
                        +
                      • count the number of ID selectors in the selector (= a)
                      • +
                      • count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b)
                      • +
                      • count the number of element names in the selector (= c)
                      • +
                      • ignore pseudo-elements
                      • +
                      + +

                      Selectors inside the negation pseudo-class +are counted like any other, but the negation itself does not count as +a pseudo-class.

                      + +

                      Concatenating the three numbers a-b-c (in a number system with a +large base) gives the specificity.

                      + +
                      +

                      Examples:

                      +
                      *               /* a=0 b=0 c=0 -> specificity =   0 */
                      +LI              /* a=0 b=0 c=1 -> specificity =   1 */
                      +UL LI           /* a=0 b=0 c=2 -> specificity =   2 */
                      +UL OL+LI        /* a=0 b=0 c=3 -> specificity =   3 */
                      +H1 + *[REL=up]  /* a=0 b=1 c=1 -> specificity =  11 */
                      +UL OL LI.red    /* a=0 b=1 c=3 -> specificity =  13 */
                      +LI.red.level    /* a=0 b=2 c=1 -> specificity =  21 */
                      +#x34y           /* a=1 b=0 c=0 -> specificity = 100 */
                      +#s12:not(FOO)   /* a=1 b=0 c=1 -> specificity = 101 */
                      +
                      +
                      + +

                      Note: the specificity of the styles +specified in an HTML style attribute is described in CSS +2.1. [CSS21].

                      + +

                      10. The grammar of Selectors

                      + +

                      10.1. Grammar

                      + +

                      The grammar below defines the syntax of Selectors. It is globally +LL(1) and can be locally LL(2) (but note that most UA's should not use +it directly, since it doesn't express the parsing conventions). The +format of the productions is optimized for human consumption and some +shorthand notations beyond Yacc (see [YACC]) +are used:

                      + +
                        +
                      • *: 0 or more +
                      • +: 1 or more +
                      • ?: 0 or 1 +
                      • |: separates alternatives +
                      • [ ]: grouping
                      • +
                      + +

                      The productions are:

                      + +
                      selectors_group
                      +  : selector [ COMMA S* selector ]*
                      +  ;
                      +
                      +selector
                      +  : simple_selector_sequence [ combinator simple_selector_sequence ]*
                      +  ;
                      +
                      +combinator
                      +  /* combinators can be surrounded by white space */
                      +  : PLUS S* | GREATER S* | TILDE S* | S+
                      +  ;
                      +
                      +simple_selector_sequence
                      +  : [ type_selector | universal ]
                      +    [ HASH | class | attrib | pseudo | negation ]*
                      +  | [ HASH | class | attrib | pseudo | negation ]+
                      +  ;
                      +
                      +type_selector
                      +  : [ namespace_prefix ]? element_name
                      +  ;
                      +
                      +namespace_prefix
                      +  : [ IDENT | '*' ]? '|'
                      +  ;
                      +
                      +element_name
                      +  : IDENT
                      +  ;
                      +
                      +universal
                      +  : [ namespace_prefix ]? '*'
                      +  ;
                      +
                      +class
                      +  : '.' IDENT
                      +  ;
                      +
                      +attrib
                      +  : '[' S* [ namespace_prefix ]? IDENT S*
                      +        [ [ PREFIXMATCH |
                      +            SUFFIXMATCH |
                      +            SUBSTRINGMATCH |
                      +            '=' |
                      +            INCLUDES |
                      +            DASHMATCH ] S* [ IDENT | STRING ] S*
                      +        ]? ']'
                      +  ;
                      +
                      +pseudo
                      +  /* '::' starts a pseudo-element, ':' a pseudo-class */
                      +  /* Exceptions: :first-line, :first-letter, :before and :after. */
                      +  /* Note that pseudo-elements are restricted to one per selector and */
                      +  /* occur only in the last simple_selector_sequence. */
                      +  : ':' ':'? [ IDENT | functional_pseudo ]
                      +  ;
                      +
                      +functional_pseudo
                      +  : FUNCTION S* expression ')'
                      +  ;
                      +
                      +expression
                      +  /* In CSS3, the expressions are identifiers, strings, */
                      +  /* or of the form "an+b" */
                      +  : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
                      +  ;
                      +
                      +negation
                      +  : NOT S* negation_arg S* ')'
                      +  ;
                      +
                      +negation_arg
                      +  : type_selector | universal | HASH | class | attrib | pseudo
                      +  ;
                      + + +

                      10.2. Lexical scanner

                      + +

                      The following is the tokenizer, written in Flex (see +[FLEX]) notation. The tokenizer is +case-insensitive.

                      + +

                      The two occurrences of "\377" represent the highest character +number that current versions of Flex can deal with (decimal 255). They +should be read as "\4177777" (decimal 1114111), which is the highest +possible code point in Unicode/ISO-10646. [UNICODE]

                      + +
                      %option case-insensitive
                      +
                      +ident     [-]?{nmstart}{nmchar}*
                      +name      {nmchar}+
                      +nmstart   [_a-z]|{nonascii}|{escape}
                      +nonascii  [^\0-\177]
                      +unicode   \\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?
                      +escape    {unicode}|\\[^\n\r\f0-9a-f]
                      +nmchar    [_a-z0-9-]|{nonascii}|{escape}
                      +num       [0-9]+|[0-9]*\.[0-9]+
                      +string    {string1}|{string2}
                      +string1   \"([^\n\r\f\\"]|\\{nl}|{nonascii}|{escape})*\"
                      +string2   \'([^\n\r\f\\']|\\{nl}|{nonascii}|{escape})*\'
                      +invalid   {invalid1}|{invalid2}
                      +invalid1  \"([^\n\r\f\\"]|\\{nl}|{nonascii}|{escape})*
                      +invalid2  \'([^\n\r\f\\']|\\{nl}|{nonascii}|{escape})*
                      +nl        \n|\r\n|\r|\f
                      +w         [ \t\r\n\f]*
                      +
                      +%%
                      +
                      +[ \t\r\n\f]+     return S;
                      +
                      +"~="             return INCLUDES;
                      +"|="             return DASHMATCH;
                      +"^="             return PREFIXMATCH;
                      +"$="             return SUFFIXMATCH;
                      +"*="             return SUBSTRINGMATCH;
                      +{ident}          return IDENT;
                      +{string}         return STRING;
                      +{ident}"("       return FUNCTION;
                      +{num}            return NUMBER;
                      +"#"{name}        return HASH;
                      +{w}"+"           return PLUS;
                      +{w}">"           return GREATER;
                      +{w}","           return COMMA;
                      +{w}"~"           return TILDE;
                      +":not("          return NOT;
                      +@{ident}         return ATKEYWORD;
                      +{invalid}        return INVALID;
                      +{num}%           return PERCENTAGE;
                      +{num}{ident}     return DIMENSION;
                      +"<!--"           return CDO;
                      +"-->"            return CDC;
                      +
                      +"url("{w}{string}{w}")"                           return URI;
                      +"url("{w}([!#$%&*-~]|{nonascii}|{escape})*{w}")"  return URI;
                      +U\+[0-9a-f?]{1,6}(-[0-9a-f]{1,6})?                return UNICODE_RANGE;
                      +
                      +\/\*[^*]*\*+([^/*][^*]*\*+)*\/                    /* ignore comments */
                      +
                      +.                return *yytext;
                      + + + +

                      11. Namespaces and down-level clients

                      + +

                      An important issue is the interaction of CSS selectors with XML +documents in web clients that were produced prior to this +document. Unfortunately, due to the fact that namespaces must be +matched based on the URI which identifies the namespace, not the +namespace prefix, some mechanism is required to identify namespaces in +CSS by their URI as well. Without such a mechanism, it is impossible +to construct a CSS style sheet which will properly match selectors in +all cases against a random set of XML documents. However, given +complete knowledge of the XML document to which a style sheet is to be +applied, and a limited use of namespaces within the XML document, it +is possible to construct a style sheet in which selectors would match +elements and attributes correctly.

                      + +

                      It should be noted that a down-level CSS client will (if it +properly conforms to CSS forward compatible parsing rules) ignore all +@namespace at-rules, as well as all style rules that make +use of namespace qualified element type or attribute selectors. The +syntax of delimiting namespace prefixes in CSS was deliberately chosen +so that down-level CSS clients would ignore the style rules rather +than possibly match them incorrectly.

                      + +

                      The use of default namespaces in CSS makes it possible to write +element type selectors that will function in both namespace aware CSS +clients as well as down-level clients. It should be noted that +down-level clients may incorrectly match selectors against XML +elements in other namespaces.

                      + +

                      The following are scenarios and examples in which it is possible to +construct style sheets which would function properly in web clients +that do not implement this proposal.

                      + +
                        +
                      1. + +

                        The XML document does not use namespaces.

                        + +
                          + +
                        • In this case, it is obviously not necessary to declare or use + namespaces in the style sheet. Standard CSS element type and + attribute selectors will function adequately in a down-level + client.
                        • + +
                        • In a CSS namespace aware client, the default behavior of + element selectors matching without regard to namespace will + function properly against all elements, since no namespaces are + present. However, the use of specific element type selectors that + match only elements that have no namespace ("|name") + will guarantee that selectors will match only XML elements that do + not have a declared namespace.
                        • + +
                        + +
                      2. + +
                      3. + +

                        The XML document defines a single, default namespace used + throughout the document. No namespace prefixes are used in element + names.

                        + +
                          + +
                        • In this case, a down-level client will function as if + namespaces were not used in the XML document at all. Standard CSS + element type and attribute selectors will match against all + elements.
                        • + +
                        + +
                      4. + +
                      5. + +

                        The XML document does not use a default namespace, all + namespace prefixes used are known to the style sheet author, and + there is a direct mapping between namespace prefixes and namespace + URIs. (A given prefix may only be mapped to one namespace URI + throughout the XML document; there may be multiple prefixes mapped + to the same URI).

                        + +
                          + +
                        • In this case, the down-level client will view and match + element type and attribute selectors based on their fully + qualified name, not the local part as outlined in the Type selectors and Namespaces section. CSS + selectors may be declared using an escaped colon "\:" + to describe the fully qualified names, e.g. + "html\:h1" will match + <html:h1>. Selectors using the qualified name + will only match XML elements that use the same prefix. Other + namespace prefixes used in the XML that are mapped to the same URI + will not match as expected unless additional CSS style rules are + declared for them.
                        • + +
                        • Note that selectors declared in this fashion will + only match in down-level clients. A CSS namespace aware + client will match element type and attribute selectors based on + the name's local part. Selectors declared with the fully + qualified name will not match (unless there is no namespace prefix + in the fully qualified name).
                        • + +
                        + +
                      6. + +
                      + +

                      In other scenarios: when the namespace prefixes used in the XML are +not known in advance by the style sheet author; or a combination of +elements with no namespace are used in conjunction with elements using +a default namespace; or the same namespace prefix is mapped to +different namespace URIs within the same document, or in +different documents; it is impossible to construct a CSS style sheet +that will function properly against all elements in those documents, +unless, the style sheet is written using a namespace URI syntax (as +outlined in this document or similar) and the document is processed by +a CSS and XML namespace aware client.

                      + +

                      12. Profiles

                      + +

                      Each specification using Selectors must define the subset of W3C +Selectors it allows and excludes, and describe the local meaning of +all the components of that subset.

                      + +

                      Non normative examples: + +

                      + + + + + + + + + + + + + + + +
                      Selectors profile
                      SpecificationCSS level 1
                      Acceptstype selectors
                      class selectors
                      ID selectors
                      :link, + :visited and :active pseudo-classes
                      descendant combinator +
                      ::first-line and ::first-letter pseudo-elements
                      Excludes + +

                      universal selector
                      attribute selectors
                      :hover and :focus + pseudo-classes
                      :target pseudo-class
                      :lang() pseudo-class
                      all UI + element states pseudo-classes
                      all structural + pseudo-classes
                      negation pseudo-class
                      all + UI element fragments pseudo-elements
                      ::before and ::after + pseudo-elements
                      child combinators
                      sibling combinators + +

                      namespaces

                      Extra constraintsonly one class selector allowed per sequence of simple + selectors


                      + + + + + + + + + + + + + + + +
                      Selectors profile
                      SpecificationCSS level 2
                      Acceptstype selectors
                      universal selector
                      attribute presence and + values selectors
                      class selectors
                      ID selectors
                      :link, :visited, + :active, :hover, :focus, :lang() and :first-child pseudo-classes +
                      descendant combinator
                      child combinator
                      adjacent sibling + combinator
                      ::first-line and ::first-letter pseudo-elements
                      ::before + and ::after pseudo-elements
                      Excludes + +

                      content selectors
                      substring matching attribute + selectors
                      :target pseudo-classes
                      all UI element + states pseudo-classes
                      all structural pseudo-classes other + than :first-child
                      negation pseudo-class
                      all UI element + fragments pseudo-elements
                      general sibling combinators + +

                      namespaces

                      Extra constraintsmore than one class selector per sequence of simple selectors (CSS1 + constraint) allowed
                      + +

                      In CSS, selectors express pattern matching rules that determine which style +rules apply to elements in the document tree. + +

                      The following selector (CSS level 2) will match all anchors a +with attribute name set inside a section 1 header h1: +

                      h1 a[name]
                      + +

                      All CSS declarations attached to such a selector are applied to elements +matching it.

                      + +
                      + + + + + + + + + + + + + + + + +
                      Selectors profile
                      SpecificationSTTS 3
                      Accepts + +

                      type selectors
                      universal selectors
                      attribute selectors
                      class + selectors
                      ID selectors
                      all structural pseudo-classes
                      + all combinators + +

                      namespaces

                      Excludesnon-accepted pseudo-classes
                      pseudo-elements
                      Extra constraintssome selectors and combinators are not allowed in fragment + descriptions on the right side of STTS declarations.
                      + +

                      Selectors can be used in STTS 3 in two different + manners: +

                        +
                      1. a selection mechanism equivalent to CSS selection mechanism: declarations + attached to a given selector are applied to elements matching that selector, +
                      2. fragment descriptions that appear on the right side of declarations. +
                      + +

                      13. Conformance and requirements

                      + +

                      This section defines conformance with the present specification only. + +

                      The inability of a user agent to implement part of this specification due to +the limitations of a particular device (e.g., non interactive user agents will +probably not implement dynamic pseudo-classes because they make no sense without +interactivity) does not imply non-conformance. + +

                      All specifications reusing Selectors must contain a Profile listing the +subset of Selectors it accepts or excludes, and describing the constraints +it adds to the current specification. + +

                      Invalidity is caused by a parsing error, e.g. an unrecognized token or a token +which is not allowed at the current parsing point. + +

                      User agents must observe the rules for handling parsing errors: +

                        +
                      • a simple selector containing an undeclared namespace prefix is invalid
                      • +
                      • a selector containing an invalid simple selector, an invalid combinator + or an invalid token is invalid.
                      • +
                      • a group of selectors containing an invalid selector is invalid.
                      • +
                      + +

                      Specifications reusing Selectors must define how to handle parsing +errors. (In the case of CSS, the entire rule in which the selector is +used is dropped.)

                      + + + +

                      14. Tests

                      + +

                      This specification has a test +suite allowing user agents to verify their basic conformance to +the specification. This test suite does not pretend to be exhaustive +and does not cover all possible combined cases of Selectors.

                      + +

                      15. Acknowledgements

                      + +

                      The CSS working group would like to thank everyone who has sent +comments on this specification over the years.

                      + +

                      The working group would like to extend special thanks to Donna +McManus, Justin Baker, Joel Sklar, and Molly Ives Brower who perfermed +the final editorial review.

                      + +

                      16. References

                      + +
                      + +
                      [CSS1] +
                      Bert Bos, Håkon Wium Lie; "Cascading Style Sheets, level 1", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999 +
                      (http://www.w3.org/TR/REC-CSS1) + +
                      [CSS21] +
                      Bert Bos, Tantek Çelik, Ian Hickson, Håkon Wium Lie, editors; "Cascading Style Sheets, level 2 revision 1", W3C Working Draft, 13 June 2005 +
                      (http://www.w3.org/TR/CSS21) + +
                      [CWWW] +
                      Martin J. Dürst, François Yergeau, Misha Wolf, Asmus Freytag, Tex Texin, editors; "Character Model for the World Wide Web", W3C Recommendation, 15 February 2005 +
                      (http://www.w3.org/TR/charmod/) + +
                      [FLEX] +
                      "Flex: The Lexical Scanner Generator", Version 2.3.7, ISBN 1882114213 + +
                      [HTML4] +
                      Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "HTML 4.01 Specification", W3C Recommendation, 24 December 1999 +
                      (http://www.w3.org/TR/html4/) + +
                      [MATH] +
                      Patrick Ion, Robert Miner, editors; "Mathematical Markup Language (MathML) 1.01", W3C Recommendation, revision of 7 July 1999 +
                      (http://www.w3.org/TR/REC-MathML/) + +
                      [RFC3066] +
                      H. Alvestrand; "Tags for the Identification of Languages", Request for Comments 3066, January 2001 +
                      (http://www.ietf.org/rfc/rfc3066.txt) + +
                      [STTS] +
                      Daniel Glazman; "Simple Tree Transformation Sheets 3", Electricité de France, submission to the W3C, 11 November 1998 +
                      (http://www.w3.org/TR/NOTE-STTS3) + +
                      [SVG] +
                      Jon Ferraiolo, 藤沢 淳, Dean Jackson, editors; "Scalable Vector Graphics (SVG) 1.1 Specification", W3C Recommendation, 14 January 2003 +
                      (http://www.w3.org/TR/SVG/) + +
                      [UNICODE]
                      +
                      The Unicode Standard, Version 4.1, The Unicode Consortium. Boston, MA, Addison-Wesley, March 2005. ISBN 0-321-18578-1, as amended by Unicode 4.0.1 and Unicode 4.1.0. +
                      (http://www.unicode.org/versions/)
                      + +
                      [XML10] +
                      Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, François Yergeau, editors; "Extensible Markup Language (XML) 1.0 (Third Edition)", W3C Recommendation, 4 February 2004 +
                      (http://www.w3.org/TR/REC-xml/) + +
                      [XMLNAMES] +
                      Tim Bray, Dave Hollander, Andrew Layman, editors; "Namespaces in XML", W3C Recommendation, 14 January 1999 +
                      (http://www.w3.org/TR/REC-xml-names/) + +
                      [YACC] +
                      S. C. Johnson; "YACC — Yet another compiler compiler", Technical Report, Murray Hill, 1975 + +
                      + + diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/std_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/std_testcase.php new file mode 100644 index 0000000..57d9f10 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/std_testcase.php @@ -0,0 +1,243 @@ +load($str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = null; +$dom->load($str); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// text test +$str = << + +HTML; +$dom->load($str); +assert(count($dom->find('unknown'))==1); +assert(count($dom->find('text'))==1); + +// ----------------------------------------------------------------------------- +// string quote test +$str = << + okok
                      + +
                      +
                      + +
                      +
                      + +HTML; +$dom->load($str); +$es = $dom->find('input'); +assert(count($es)==4); +assert($es[0]->onclick=='goto("url0")'); +assert($es[1]->onclick=="goto('url1'+'\'')"); +assert($es[2]->onclick=="goto('url2')"); +assert($es[3]->onclick=='goto("url4"+"\"")'); + +// ----------------------------------------------------------------------------- +// clone test +$str = << + okok
                      + +
                      +
                      + +
                      +
                      + +HTML; +$dom->load($str); +$es = $dom->find('input'); +assert(count($es)==4); +assert($es[0]->onclick=='goto("url0")'); +assert($es[1]->onclick=="goto('url1'+'\'')"); +assert($es[2]->onclick=="goto('url2')"); +assert($es[3]->onclick=='goto("url4"+"\"")'); + +unset($es); +$dom2 = clone($dom); +$es = $dom2->find('input'); +assert(count($es)==4); +assert($es[0]->onclick=='goto("url0")'); +assert($es[1]->onclick=="goto('url1'+'\'')"); +assert($es[2]->onclick=="goto('url2')"); +assert($es[3]->onclick=='goto("url4"+"\"")'); + +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert($dom==$str); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// monkey test +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<<<>ab +HTML; +$dom->load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert($dom==$str); +assert($dom->save()==$str); +// ----------------------------------------------- +// $str = <<load($str); +// echo $dom; +// assert($dom==$str); +// assert($dom->save()==$str); +// ----------------------------------------------- +$str = <<load($str); +assert($dom==$str); +assert($dom->save()==$str); + +// ----------------------------------------------------------------------------- +// rnadom string test +function str_random($length) +{ + $str = ""; + srand((double)microtime()*1000000); + $char_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + $char_list .= "abcdefghijklmnopqrstuvwxyz"; + $char_list .= "1234567890"; + $char_list .= "<>!?[]%^&*()"; + for($i=0; $i<$length; ++$i) + $str .= substr($char_list,(rand()%(strlen($char_list))), 1); + return $str; +} + +for($i=0; $i<60; ++$i) { + $str = str_random($i); + //echo $str."\n
                      "; + $dom->load($str, false); + //echo $dom->save()."\n
                      "; + assert($dom==$str); +} + +// ----------------------------------------------------------------------------- +// lowercase test +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('img'))==1); +assert(count($dom->find('IMG'))==1); +assert(isset($dom->find('img', 0)->class)); +assert(!isset($dom->find('img', 0)->CLASS)); +assert($dom->find('img', 0)->class=='class0'); +assert($dom==$str); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str); +assert(count($dom->find('img'))==1); +assert(count($dom->find('IMG'))==1); +assert(isset($dom->find('img', 0)->class)); +assert(!isset($dom->find('img', 0)->CLASS)); +assert($dom->find('img', 0)->class=='class0'); +assert($dom==strtolower($str)); +// ----------------------------------------------- +$str = << +HTML; +$dom->load($str, false); +assert(count($dom->find('img'))==0); +assert(count($dom->find('IMG'))==1); +assert(isset($dom->find('IMG', 0)->CLASS)); +assert(!isset($dom->find('IMG', 0)->class)); +assert($dom->find('IMG', 0)->CLASS=='class0'); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/strip_testcase.php b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/strip_testcase.php new file mode 100644 index 0000000..66a45f6 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/testcase/strip_testcase.php @@ -0,0 +1,137 @@ + + + +HTML; +$dom->load($str); +assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// test +$str = << + + + + +HTML; +$dom->load($str); +assert(count($dom->find('code'))==1); +assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +//
                       &  test
                      +$str = <<
                      +    
                      +
                      +HTML; +$dom->load($str); +assert(count($dom->find('pre'))==1); +assert(count($dom->find('input'))==0); + +// ----------------------------------------------------------------------------- +// + +HTML; +$dom->load($str); +assert(count($dom->find('style'))==1); +assert(count($dom->find('script'))==3); + +// ----------------------------------------------------------------------------- +// php short tag test +$str = <<hello + +HTML; +$dom->load($str); +assert($dom->find('a', 0)->href===""); +assert($dom->find('input', 0)->value===""); + +// ----------------------------------------------------------------------------- +// noise stripping test +$str = <<--> + + +HTML; +$dom->load($str); +assert(count($dom->find('img'))==1); +assert($dom==$str); +// ----------------------------------------------- +$str = <<ss + + + + + + + + + + + + + +HTML; +$dom->load($str); +assert(count($dom->find('script'))==8); +assert(count($dom->find('style'))==3); +//echo "\n\n\n\n".$dom->save(); +assert($dom==$str); + +// ----------------------------------------------------------------------------- +// tear down +$dom->clear(); +unset($dom); +?> \ No newline at end of file diff --git a/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/composer.json b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/composer.json new file mode 100644 index 0000000..6d21ae1 --- /dev/null +++ b/scripts/autonomias_provincias/vendor/sunra/php-simple-html-dom-parser/composer.json @@ -0,0 +1,24 @@ +{ + "name": "sunra/php-simple-html-dom-parser", + "type": "library", + "description": "Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.", + "keywords": ["html", "dom", "parser"], + "homepage": "https://github.com/sunra/php-simple-html-dom-parser", + "license": "MIT", + "authors": [ + { + "homepage": "http://sourceforge.net/projects/simplehtmldom/" + }, + { + "name": "Sunra", + "email": "sunra@yandex.ru", + "homepage": "https://github.com/sunra" + } + ], + "require": { + "php": ">=5.3.2" + }, + "autoload": { + "psr-0": { "Sunra\\PhpSimple\\HtmlDomParser": "Src/" } + } +} \ No newline at end of file diff --git a/scripts/municipios/Readme.md b/scripts/municipios/Readme.md index 2682fe1..0d85d6b 100644 --- a/scripts/municipios/Readme.md +++ b/scripts/municipios/Readme.md @@ -1,6 +1,6 @@ # Municipios -Procesa los archivos fuente de municipios que publica el INE todos los años, y que están alojados en ../archive. +Procesa los archivos fuente de municipios que publica el INE todos los años, y que están alojados en `../../archive`. Si no los encuentra, los descarga. @@ -12,9 +12,9 @@ Si no los encuentra, los descarga. ### opciones - -h muestra esta ayuda y termina - -d fuerza la descarga de los ficheros fuente aunque ya existan - -v modo verbose + -h Muestra ayuda y termina + -d Fuerza la descarga de los ficheros fuente aunque ya existan + -v Modo verbose ## Requisitos diff --git a/scripts/municipios/process.sh b/scripts/municipios/process.sh index 2e77350..16a9232 100755 --- a/scripts/municipios/process.sh +++ b/scripts/municipios/process.sh @@ -28,7 +28,7 @@ function log () { function show_help() { cat << EOF Uso: ${0##*/} [-hvd] -Procesa los archivos fuente de municipios que publica el INE todos los años, y que están alojados en ../archive. +Procesa los archivos fuente de municipios que publica el INE todos los años, y que están alojados en ../../archive. Si no los encuentra, los descarga. -h muestra esta ayuda y termina @@ -115,8 +115,8 @@ done log Creamos symlinks \(último procesado\)\\n -echo ln -rfs $HISTORICAL_DATA/$CSVFILE $DATA/municipios.csv -echo ln -rfs $HISTORICAL_DATA/$JSONFILE $DATA/municipios.json +echo ln -f $HISTORICAL_DATA/$CSVFILE $DATA/municipios.csv +echo ln -f $HISTORICAL_DATA/$JSONFILE $DATA/municipios.json ln -f $HISTORICAL_DATA/$CSVFILE $DATA/municipios.csv ln -f $HISTORICAL_DATA/$JSONFILE $DATA/municipios.json