2018-07-04 09:06:45 +00:00
|
|
|
|
# Copyright (C) 2001-2018, Python Software Foundation
|
2018-07-04 09:08:42 +00:00
|
|
|
|
# For licence information, see README file.
|
2016-10-30 09:46:26 +00:00
|
|
|
|
#
|
|
|
|
|
msgid ""
|
|
|
|
|
msgstr ""
|
2019-12-05 22:15:54 +00:00
|
|
|
|
"Project-Id-Version: Python 3\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"Report-Msgid-Bugs-To: \n"
|
2023-01-15 21:42:07 +00:00
|
|
|
|
"POT-Creation-Date: 2023-01-15 22:33+0100\n"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"PO-Revision-Date: 2022-05-08 09:48+0200\n"
|
2023-01-15 21:42:07 +00:00
|
|
|
|
"Last-Translator: Thierry Pellé <abonnements+afpytrad@thierry-pelle.eu>\n"
|
2018-07-04 09:14:25 +00:00
|
|
|
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
2017-05-23 22:40:56 +00:00
|
|
|
|
"Language: fr\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"MIME-Version: 1.0\n"
|
|
|
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
|
|
|
"Content-Transfer-Encoding: 8bit\n"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"X-Generator: Poedit 2.2.1\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:2
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":mod:`html.parser` --- Simple HTML and XHTML parser"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr ":mod:`html.parser`— Un analyseur syntaxique simple pour HTML et XHTML"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:7
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "**Source code:** :source:`Lib/html/parser.py`"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "**Code source :** :source:`Lib/html/parser.py`"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:15
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This module defines a class :class:`HTMLParser` which serves as the basis "
|
|
|
|
|
"for parsing text files formatted in HTML (HyperText Mark-up Language) and "
|
|
|
|
|
"XHTML."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Ce module définit une classe :class:`HTMLParser` qui sert de base pour "
|
|
|
|
|
"l'analyse syntaxique de fichiers texte formatés HTML (*HyperText Mark-up "
|
|
|
|
|
"Language*, le « langage de balisage hypertexte ») et XHTML (*EXtensible "
|
|
|
|
|
"HyperText Markup Language*, le « langage extensible de balisage "
|
|
|
|
|
"hypertexte »)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:20
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Create a parser instance able to parse invalid markup."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Crée une instance d'analyseur capable de traiter tout balisage, même "
|
|
|
|
|
"invalide."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:22
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If *convert_charrefs* is ``True`` (the default), all character references "
|
|
|
|
|
"(except the ones in ``script``/``style`` elements) are automatically "
|
|
|
|
|
"converted to the corresponding Unicode characters."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Si *convert_charrefs* est ``True`` (valeur par défaut), toute référence de "
|
|
|
|
|
"caractère (sauf ceux enchâssés dans des éléments ``script``/``style``) est "
|
|
|
|
|
"automatiquement convertie en son caractère Unicode."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:26
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"An :class:`.HTMLParser` instance is fed HTML data and calls handler methods "
|
|
|
|
|
"when start tags, end tags, text, comments, and other markup elements are "
|
|
|
|
|
"encountered. The user should subclass :class:`.HTMLParser` and override its "
|
|
|
|
|
"methods to implement the desired behavior."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Une instance de :class:`.HTMLParser` est alimentée par des données HTML. "
|
|
|
|
|
"Elle fait appel à des méthodes offrant un traitement spécifique quand est "
|
|
|
|
|
"rencontré un élément de balisage : balise ouvrante ou fermante, textes, "
|
|
|
|
|
"commentaires… Pour implémenter le comportement désiré, l'utilisateur crée "
|
|
|
|
|
"une sous-classe de :class:`.HTMLParser` en surchargeant ses méthodes."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:31
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This parser does not check that end tags match start tags or call the end-"
|
|
|
|
|
"tag handler for elements which are closed implicitly by closing an outer "
|
|
|
|
|
"element."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cet analyseur ne vérifie ni que les balises fermantes correspondent aux "
|
|
|
|
|
"balises ouvrantes, ni n'invoque le gestionnaire de balises fermantes pour "
|
|
|
|
|
"les éléments implicitement fermés par un élément extérieur."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:34
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "*convert_charrefs* keyword argument added."
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "L'argument *convert_charrefs* a été ajouté."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:37
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The default value for argument *convert_charrefs* is now ``True``."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"La valeur par défaut de l'argument *convert_charrefs* est désormais ``True``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:42
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Example HTML Parser Application"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "Exemple d'application de l'analyseur HTML"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:44
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"As a basic example, below is a simple HTML parser that uses the :class:"
|
|
|
|
|
"`HTMLParser` class to print out start tags, end tags, and data as they are "
|
|
|
|
|
"encountered::"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Comme exemple simple, un analyseur HTML minimal qui utilise la classe :class:"
|
|
|
|
|
"`HTMLParser` pour afficher les balises ouvrantes, les balises fermantes "
|
|
|
|
|
"ainsi que les données quand elles apparaissent ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:64
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The output will then be:"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "La sortie est alors :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:83
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`.HTMLParser` Methods"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "Méthodes de la classe :class:`.HTMLParser`"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:85
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`HTMLParser` instances have the following methods:"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Les instances de :class:`HTMLParser` disposent des méthodes suivantes :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:90
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Feed some text to the parser. It is processed insofar as it consists of "
|
|
|
|
|
"complete elements; incomplete data is buffered until more data is fed or :"
|
|
|
|
|
"meth:`close` is called. *data* must be :class:`str`."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Alimente l'analyseur avec du texte. Ce texte est traité dans la mesure où il "
|
|
|
|
|
"constitue des éléments complets ; les données incomplètes sont mises dans un "
|
|
|
|
|
"tampon jusqu'à ce que d'autres données soient fournies ou que la méthode :"
|
|
|
|
|
"meth:`close` soit appelée. L'argument *data* doit être de classe :class:"
|
|
|
|
|
"`str`."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:97
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Force processing of all buffered data as if it were followed by an end-of-"
|
|
|
|
|
"file mark. This method may be redefined by a derived class to define "
|
|
|
|
|
"additional processing at the end of the input, but the redefined version "
|
|
|
|
|
"should always call the :class:`HTMLParser` base class method :meth:`close`."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Force le traitement de toutes les données du tampon comme si elles étaient "
|
|
|
|
|
"suivies par un caractère *fin de fichier*. Cette méthode peut-être redéfinie "
|
|
|
|
|
"par une classe dérivée pour ajouter des traitements supplémentaires à la fin "
|
|
|
|
|
"de l'entrée, mais la version redéfinie devra impérativement appeler la "
|
|
|
|
|
"méthode :meth:`close` de la classe de base :class:`HTMLParser`."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:105
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Reset the instance. Loses all unprocessed data. This is called implicitly "
|
|
|
|
|
"at instantiation time."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Réinitialise l'instance. Toutes les données non traitées sont perdues. Cette "
|
|
|
|
|
"méthode est appelée implicitement lors de l'instanciation."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:111
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Return current line number and offset."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Renvoie le numéro de ligne et le numéro du caractère dans la ligne où le "
|
|
|
|
|
"curseur est positionné."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:116
|
2022-05-08 07:58:49 +00:00
|
|
|
|
#, fuzzy
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Return the text of the most recently opened start tag. This should not "
|
|
|
|
|
"normally be needed for structured processing, but may be useful in dealing "
|
|
|
|
|
"with HTML \"as deployed\" or for re-generating input with minimal changes "
|
|
|
|
|
"(whitespace between attributes can be preserved, etc.)."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Renvoie le texte de la dernière balise ouverte. Pour un traitement "
|
|
|
|
|
"structuré, ce ne devrait jamais être nécessaire, mais peut s'avérer utile "
|
|
|
|
|
"pour traiter un code HTML de mauvaise qualité (tel qu'on en trouve souvent) "
|
|
|
|
|
"ou pour ré-générer la balise avec des changements mineurs (les espaces entre "
|
|
|
|
|
"les attributs pouvant être préservés, etc. …)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:122
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The following methods are called when data or markup elements are "
|
|
|
|
|
"encountered and they are meant to be overridden in a subclass. The base "
|
|
|
|
|
"class implementations do nothing (except for :meth:`~HTMLParser."
|
|
|
|
|
"handle_startendtag`):"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Les méthodes suivantes sont appelées lors de la rencontre de données ou "
|
|
|
|
|
"d'éléments de balisage ; elles sont destinées à être surchargées par la sous-"
|
|
|
|
|
"classe. L'implémentation de la classe de base ne fait rien (sauf pour ce qui "
|
|
|
|
|
"est de :meth:`~HTMLParser.handle_startendtag`) :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:129
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2023-01-15 21:42:07 +00:00
|
|
|
|
"This method is called to handle the start tag of an element (e.g. ``<div "
|
|
|
|
|
"id=\"main\">``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée pour traiter une balise ouvrante (p. ex. ``<div "
|
|
|
|
|
"id=\"main\">``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:131
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The *tag* argument is the name of the tag converted to lower case. The "
|
|
|
|
|
"*attrs* argument is a list of ``(name, value)`` pairs containing the "
|
|
|
|
|
"attributes found inside the tag's ``<>`` brackets. The *name* will be "
|
|
|
|
|
"translated to lower case, and quotes in the *value* have been removed, and "
|
|
|
|
|
"character and entity references have been replaced."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"L'argument *tag* contient le nom de la balise en minuscules. L'argument "
|
|
|
|
|
"*attrs* contient une liste de *n-uplets* ``(name, value)`` regroupant les "
|
|
|
|
|
"attributs présents entre les symboles ``<`` et ``>`` de la balise. Le "
|
|
|
|
|
"paramètre *name* est converti en minuscule ; les guillemets sont supprimés "
|
|
|
|
|
"du paramètre *value* et toute entité de référence ou de caractère est "
|
|
|
|
|
"remplacée."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:137
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"For instance, for the tag ``<A HREF=\"https://www.cwi.nl/\">``, this method "
|
|
|
|
|
"would be called as ``handle_starttag('a', [('href', 'https://www.cwi."
|
|
|
|
|
"nl/')])``."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Par exemple, pour la balise ``<A HREF=\"https://www.cwi.nl/\">``, cette "
|
|
|
|
|
"méthode est appelée par ``handle_starttag('a', [('href', 'https://www.cwi."
|
|
|
|
|
"nl/')])``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:140
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"All entity references from :mod:`html.entities` are replaced in the "
|
|
|
|
|
"attribute values."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Toute référence d'entité présente dans :mod:`html.entities` est remplacée "
|
|
|
|
|
"dans la valeur des attributs."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:146
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called to handle the end tag of an element (e.g. ``</div>``)."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée pour traiter les balises fermantes (p. ex. ``</"
|
|
|
|
|
"div>``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:148
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The *tag* argument is the name of the tag converted to lower case."
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "L'argument *tag* est le nom de la balise en minuscules."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:153
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Similar to :meth:`handle_starttag`, but called when the parser encounters an "
|
|
|
|
|
"XHTML-style empty tag (``<img ... />``). This method may be overridden by "
|
|
|
|
|
"subclasses which require this particular lexical information; the default "
|
|
|
|
|
"implementation simply calls :meth:`handle_starttag` and :meth:"
|
|
|
|
|
"`handle_endtag`."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Traitée de façon similaire à :meth:`handle_starttag`, mais appelée quand "
|
|
|
|
|
"l'analyseur rencontre une balise vide de type *XHTML* (p. ex. ``<img ... /"
|
|
|
|
|
">``). Cette méthode peut-être surchargée par les sous-classes demandant "
|
|
|
|
|
"cette information lexicale ; l'implémentation par défaut appelle simplement :"
|
|
|
|
|
"meth:`handle_starttag` et :meth:`handle_endtag`."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:161
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called to process arbitrary data (e.g. text nodes and the "
|
|
|
|
|
"content of ``<script>...</script>`` and ``<style>...</style>``)."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée pour traiter toute donnée arbitraire (p. ex. les "
|
|
|
|
|
"nœuds textuels ou les contenus de ``<script>...</script>`` et ``<style>...</"
|
|
|
|
|
"style>``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:167
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called to process a named character reference of the form "
|
|
|
|
|
"``&name;`` (e.g. ``>``), where *name* is a general entity reference (e.g. "
|
|
|
|
|
"``'gt'``). This method is never called if *convert_charrefs* is ``True``."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée pour traiter les références nommées de caractères "
|
|
|
|
|
"de la forme ``&name;`` (p. ex. ``>``), où *name* est une référence à une "
|
|
|
|
|
"entité générique (p. ex. ``'gt'``). Cette méthode n'est jamais appelée si "
|
|
|
|
|
"*convert_charrefs* vaut ``True``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:175
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called to process decimal and hexadecimal numeric character "
|
|
|
|
|
"references of the form ``&#NNN;`` and ``&#xNNN;``. For example, the decimal "
|
|
|
|
|
"equivalent for ``>`` is ``>``, whereas the hexadecimal is ``>``; "
|
|
|
|
|
"in this case the method will receive ``'62'`` or ``'x3E'``. This method is "
|
|
|
|
|
"never called if *convert_charrefs* is ``True``."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée pour traiter les références de caractères "
|
|
|
|
|
"décimales et hexadécimales de la forme ``&#NNN;`` et ``&#xNNN;``. Par "
|
|
|
|
|
"exemple, l'équivalent décimal de ``>`` est ``>``, son équivalent "
|
|
|
|
|
"hexadécimal étant ``>`` ; dans ce cas, la méthode reçoit ``'62'`` or "
|
|
|
|
|
"``'x3E'``. Cette méthode n'est jamais appelée si *convert_charrefs* est "
|
|
|
|
|
"``True``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:184
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called when a comment is encountered (e.g. ``<!--comment--"
|
|
|
|
|
">``)."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée quand un commentaire (p. ex. ``<!--commentaire--"
|
|
|
|
|
">``) est rencontré."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:186
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"For example, the comment ``<!-- comment -->`` will cause this method to be "
|
|
|
|
|
"called with the argument ``' comment '``."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Par exemple, le commentaire ``<!-- commentaire -->`` provoque l'appel de "
|
|
|
|
|
"cette méthode avec l'argument ``' commentaire '``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:189
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The content of Internet Explorer conditional comments (condcoms) will also "
|
|
|
|
|
"be sent to this method, so, for ``<!--[if IE 9]>IE9-specific content<!"
|
|
|
|
|
"[endif]-->``, this method will receive ``'[if IE 9]>IE9-specific content<!"
|
|
|
|
|
"[endif]'``."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Le contenu des commentaires conditionnels d'Internet Explorer (*condcoms*) "
|
|
|
|
|
"ne sont pas traités de manière particulière par l'analyseur. Ils sont "
|
|
|
|
|
"passés à cette méthode comme tous les autres commentaires. Ainsi, pour ``<!--"
|
|
|
|
|
"[if IE 9]>Contenu spécifique à IE9<![endif]-->``, cette méthode sera appelée "
|
|
|
|
|
"avec ``'[if IE 9]>Contenu spécifique à IE9<![endif]'``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:196
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called to handle an HTML doctype declaration (e.g. ``<!"
|
|
|
|
|
"DOCTYPE html>``)."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée pour traiter la déclaration *doctype* de HTML (p. "
|
|
|
|
|
"ex. ``<!DOCTYPE html>``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:199
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The *decl* parameter will be the entire contents of the declaration inside "
|
|
|
|
|
"the ``<!...>`` markup (e.g. ``'DOCTYPE html'``)."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Le paramètre *decl* contient la totalité de la déclaration contenue dans le "
|
|
|
|
|
"balisage ``<!...>`` (p. ex. ``'DOCTYPE html'``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:205
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Method called when a processing instruction is encountered. The *data* "
|
|
|
|
|
"parameter will contain the entire processing instruction. For example, for "
|
|
|
|
|
"the processing instruction ``<?proc color='red'>``, this method would be "
|
|
|
|
|
"called as ``handle_pi(\"proc color='red'\")``. It is intended to be "
|
|
|
|
|
"overridden by a derived class; the base class implementation does nothing."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Méthode appelée quand une instruction de traitement est rencontrée. Le "
|
|
|
|
|
"paramètre *data* contient la totalité de l'instruction de traitement. Par "
|
|
|
|
|
"exemple, pour l'instruction de traitement ``<?proc color='rouge'>``, cette "
|
|
|
|
|
"méthode est appelée par ``handle_pi(\"proc color='rouge'\")``. Elle est "
|
|
|
|
|
"destinée à être surchargée dans une classe dérivée ; la classe de base ne "
|
|
|
|
|
"réalise aucun traitement."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:213
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The :class:`HTMLParser` class uses the SGML syntactic rules for processing "
|
|
|
|
|
"instructions. An XHTML processing instruction using the trailing ``'?'`` "
|
|
|
|
|
"will cause the ``'?'`` to be included in *data*."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"La classe :class:`HTMLParser` utilise les règles syntaxiques de **SGML** "
|
|
|
|
|
"pour traiter les instructions de traitement. Une instruction de traitement "
|
|
|
|
|
"*XHTML* utilisant une terminaison en ``'?'`` se traduit par l'inclusion de "
|
|
|
|
|
"ce ``'?'`` dans *data*."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:220
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method is called when an unrecognized declaration is read by the parser."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Cette méthode est appelée quand une déclaration non reconnue est lue par "
|
|
|
|
|
"l'analyseur."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:222
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The *data* parameter will be the entire contents of the declaration inside "
|
|
|
|
|
"the ``<![...]>`` markup. It is sometimes useful to be overridden by a "
|
|
|
|
|
"derived class. The base class implementation does nothing."
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Le paramètre *data* contient toute la déclaration enchâssée dans le balisage "
|
|
|
|
|
"``<![...]>``. Il est parfois utile de le surcharger dans une classe dérivée. "
|
|
|
|
|
"L'implémentation de la classe de base ne réalise aucune opération."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:230
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Examples"
|
|
|
|
|
msgstr "Exemples"
|
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:232
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The following class implements a parser that will be used to illustrate more "
|
|
|
|
|
"examples::"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"La classe suivante implémente un analyseur qui est utilisé dans les exemples "
|
|
|
|
|
"ci-dessous ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:269
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Parsing a doctype::"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "Traitement du *doctype* ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:275
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Parsing an element with a few attributes and a title::"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "Analyse d'un élément avec un titre et des attributs ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:287
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The content of ``script`` and ``style`` elements is returned as is, without "
|
|
|
|
|
"further parsing::"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Le contenu des éléments ``script`` et ``style`` est renvoyé tel quel (sans "
|
|
|
|
|
"autre traitement) ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:303
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Parsing comments::"
|
2022-05-08 07:58:49 +00:00
|
|
|
|
msgstr "Traitement des commentaires ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:310
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Parsing named and numeric character references and converting them to the "
|
|
|
|
|
"correct char (note: these 3 references are all equivalent to ``'>'``)::"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"L'analyse des caractères nommés et des références numériques de caractères "
|
|
|
|
|
"et leur conversion en leur caractère correct (note : ces trois références "
|
|
|
|
|
"sont équivalentes à ``'>'``) ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:318
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Feeding incomplete chunks to :meth:`~HTMLParser.feed` works, but :meth:"
|
|
|
|
|
"`~HTMLParser.handle_data` might be called more than once (unless "
|
|
|
|
|
"*convert_charrefs* is set to ``True``)::"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"Il est possible de fournir des portions de code incomplètes à :meth:"
|
|
|
|
|
"`~HTMLParser.feed`, mais alors il est possible que :meth:`~HTMLParser."
|
|
|
|
|
"handle_data` soit appelée plusieurs fois, à moins que *convert_charrefs* "
|
|
|
|
|
"soit ``True`` ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2020-07-20 08:45:25 +00:00
|
|
|
|
#: library/html.parser.rst:331
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Parsing invalid HTML (e.g. unquoted attributes) also works::"
|
|
|
|
|
msgstr ""
|
2022-05-08 07:58:49 +00:00
|
|
|
|
"L'analyse de code *HTML* non valide (p. ex. des attributs sans guillemets) "
|
|
|
|
|
"fonctionne également ::"
|