| 1 |
# SOME DESCRIPTIVE TITLE. |
| 2 |
# Copyright (C) Kovid Goyal |
| 3 |
# This file is distributed under the same license as the calibre package. |
| 4 |
# |
| 5 |
# Translators: |
| 6 |
# Cinzia De Paola <[email protected]>, 2015 |
| 7 |
# Lehti <[email protected]>, 2014 |
| 8 |
# demetrio <[email protected]>, 2020 |
| 9 |
# Michele Galimberti <[email protected]>, 2021 |
| 10 |
# Vincenzo Reale <[email protected]>, 2014 |
| 11 |
msgid "" |
| 12 |
msgstr "" |
| 13 |
"Project-Id-Version: calibre\n" |
| 14 |
"Report-Msgid-Bugs-To: \n" |
| 15 |
"POT-Creation-Date: 2026-02-17 16:44+0000\n" |
| 16 |
"PO-Revision-Date: 2014-06-17 08:35+0000\n" |
| 17 |
"Last-Translator: Michele Galimberti <[email protected]>, 2021\n" |
| 18 |
"Language-Team: Italian (http://app.transifex.com/calibre/calibre/language/it/)\n" |
| 19 |
"MIME-Version: 1.0\n" |
| 20 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 21 |
"Content-Transfer-Encoding: 8bit\n" |
| 22 |
"Language: it\n" |
| 23 |
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" |
| 24 |
|
| 25 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:4 |
| 26 |
msgid "XPath tutorial" |
| 27 |
msgstr "Guida di XPath" |
| 28 |
|
| 29 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:6 |
| 30 |
msgid "" |
| 31 |
"In this tutorial, you will be given a gentle introduction to `XPath " |
| 32 |
"<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used " |
| 33 |
"to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ " |
| 34 |
"documents in calibre. XPath is a widely used standard, and googling it will " |
| 35 |
"yield a ton of information. This tutorial, however, focuses on using XPath " |
| 36 |
"for e-book related tasks like finding chapter headings in an unstructured " |
| 37 |
"HTML document." |
| 38 |
msgstr "In questa guida ti sarà fornita un'introduzione graduale a `XPath <https://en.wikipedia.org/wiki/XPath>`_, un linguaggio per query che può essere utilizzato per selezionare parti arbitrarie di documenti `HTML <https://en.wikipedia.org/wiki/HTML>`_ in calibre. XPath è uno standard ampiamente utilizzato e una ricerca su Google rivelerà parecchie informazioni. Questa guida, tuttavia, si concentra sull'utilizzo di XPath per compiti relativi agli e-book, come trovare le intestazioni dei capitoli in un documento HTML non strutturato." |
| 39 |
|
| 40 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:16 |
| 41 |
msgid "Contents" |
| 42 |
msgstr "Contenuti" |
| 43 |
|
| 44 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:19 |
| 45 |
msgid "Selecting by tag name" |
| 46 |
msgstr "Selezione per nome del tag" |
| 47 |
|
| 48 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:21 |
| 49 |
msgid "" |
| 50 |
"The simplest form of selection is to select tags by name. For example, " |
| 51 |
"suppose you want to select all the ``<h2>`` tags in a document. The XPath " |
| 52 |
"query for this is simply::" |
| 53 |
msgstr "La forma più semplice di selezione è selezionare i tag per nome. Ad esempio, immagina di voler selezionare tutti i tag \"<h2>\" in un documento. La query di XPath per farlo è semplicemente::" |
| 54 |
|
| 55 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:27 |
| 56 |
msgid "" |
| 57 |
"The prefix `//` means *search at any level of the document*. Now suppose you" |
| 58 |
" want to search for ``<span>`` tags that are inside ``<a>`` tags. That can " |
| 59 |
"be achieved with::" |
| 60 |
msgstr "Il prefisso `//` significa *cerca ad ogni livello del documento*. Adesso immagina di dover cercare dei tag ``<span>`` che si trovano dentro tag ``<a>``. Ciò si può ottenere con::" |
| 61 |
|
| 62 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:33 |
| 63 |
msgid "" |
| 64 |
"If you want to search for tags at a particular level in the document, change" |
| 65 |
" the prefix::" |
| 66 |
msgstr "Se vuoi cercare dei tag in un livello particolare del documento, modifica il prefisso:" |
| 67 |
|
| 68 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:39 |
| 69 |
msgid "" |
| 70 |
"This will match only ``<p>A very short e-book to demonstrate the use of " |
| 71 |
"XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` " |
| 72 |
"tags. The ``h:`` prefix in the above examples is needed to match XHTML tags." |
| 73 |
" This is because internally, calibre represents all content as XHTML. In " |
| 74 |
"XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML " |
| 75 |
"tags." |
| 76 |
msgstr "Questo troverà solo ``<p>A very short e-book to demonstrate the use of XPath.</p>`` nel :ref:`sample_ebook`, ma nessuno degli altri tag ``<p>``. Il prefisso ``h:`` negli esempi precedenti è richiesto per trovare i tag XHTML. Ciò è necessario perché, internamente, calibre rappresenta tutti i contenuti come XHTML. In XHTML i tag hanno un *namespace* e ``h:`` è il prefisso di namespace per i tag HTML." |
| 77 |
|
| 78 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:45 |
| 79 |
msgid "" |
| 80 |
"Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, " |
| 81 |
"we need an XPath construct called *predicate*. A :dfn:`predicate` is simply " |
| 82 |
"a test that is used to select tags. Tests can be arbitrarily powerful and as" |
| 83 |
" this tutorial progresses, you will see more powerful examples. A predicate " |
| 84 |
"is created by enclosing the test expression in square brackets::" |
| 85 |
msgstr "" |
| 86 |
|
| 87 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:53 |
| 88 |
msgid "" |
| 89 |
"There are several new features in this XPath expression. The first is the " |
| 90 |
"use of the wildcard ``*``. It means *match any tag*. Now look at the test " |
| 91 |
"expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a" |
| 92 |
" *built-in function*. It simply evaluates to the name of the tag. So by " |
| 93 |
"using it, we can select tags whose names are either `h1` or `h2`. Note that " |
| 94 |
"the :term:`name()` function ignores namespaces so that there is no need for " |
| 95 |
"the ``h:`` prefix. XPath has several useful built-in functions. A few more " |
| 96 |
"will be introduced in this tutorial." |
| 97 |
msgstr "Ci sono diverse nuove funzionalità in questa espressione XPath. La prima è l'uso del carattere jolly ``*``. Significa *trova qualsiasi tag*. Ora dai un'occhiata all'espressione di test ``name()='h1' or name()='h2'``. :term:`name()` è un esempio di *funzione interna*. Essa valuta semplicemente il nome del tag. Quindi, usandola, possiamo selezionare tag i cui nomi sono `h1` o `h2`. Tieni presente che la funzione :term:`name()` ignora gli spazi di nomi in modo che non sia necessario il prefisso ``h:``. XPath ha diverse utili funzioni interne. Alcune di loro saranno introdotte in questa guida." |
| 98 |
|
| 99 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:62 |
| 100 |
msgid "Selecting by attributes" |
| 101 |
msgstr "Selezione per attributi" |
| 102 |
|
| 103 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:64 |
| 104 |
msgid "" |
| 105 |
"To select tags based on their attributes, the use of predicates is " |
| 106 |
"required::" |
| 107 |
msgstr "Per selezionare i tag in base alle loro caratteristiche, è richiesto l'uso di predicati " |
| 108 |
|
| 109 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:70 |
| 110 |
msgid "" |
| 111 |
"Here, the ``@`` operator refers to the attributes of the tag. You can use " |
| 112 |
"some of the `XPath built-in functions`_ to perform more sophisticated " |
| 113 |
"matching on attribute values." |
| 114 |
msgstr "Qui, l'operatore ``@`` si riferisce agli attributi del tag. È possibile utilizzare alcune delle `funzioni incorporate di XPath` per eseguire una corrispondenza più sofisticata sui valori degli attributi." |
| 115 |
|
| 116 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:76 |
| 117 |
msgid "Selecting by tag content" |
| 118 |
msgstr "Selezione per contenuto del tag" |
| 119 |
|
| 120 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:78 |
| 121 |
msgid "" |
| 122 |
"Using XPath, you can even select tags based on the text they contain. The " |
| 123 |
"best way to do this is to use the power of *regular expressions* via the " |
| 124 |
"built-in function :term:`re:test()`::" |
| 125 |
msgstr "Usando XPath, puoi persino selezionare i tag in base al testo che contengono. Il modo migliore per farlo è usare la potenza delle *espressioni regolari* tramite la funzione integrata :term:`re: test()`::" |
| 126 |
|
| 127 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:84 |
| 128 |
msgid "" |
| 129 |
"Here the ``.`` operator refers to the contents of the tag, just as the ``@``" |
| 130 |
" operator referred to its attributes." |
| 131 |
msgstr "Qui l'operatore ``.`` si riferisce al contenuto del tag, proprio come l'operatore ``@`` si riferiva ai suoi attributi." |
| 132 |
|
| 133 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:90 |
| 134 |
msgid "Sample e-book" |
| 135 |
msgstr "Libro di esempio" |
| 136 |
|
| 137 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:96 |
| 138 |
msgid "XPath built-in functions" |
| 139 |
msgstr "Funzioni interne di XPath" |
| 140 |
|
| 141 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:99 |
| 142 |
msgid "name()" |
| 143 |
msgstr "name()" |
| 144 |
|
| 145 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:101 |
| 146 |
msgid "The name of the current tag." |
| 147 |
msgstr "Il nome del tag attuale" |
| 148 |
|
| 149 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:102 |
| 150 |
msgid "contains()" |
| 151 |
msgstr "contains()" |
| 152 |
|
| 153 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:104 |
| 154 |
msgid "``contains(s1, s2)`` returns `true` if s1 contains s2." |
| 155 |
msgstr "``contains(s1, s2)`` restituisce `true` se s1 contiene s2." |
| 156 |
|
| 157 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:105 |
| 158 |
msgid "re:test()" |
| 159 |
msgstr "re:test()" |
| 160 |
|
| 161 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:107 |
| 162 |
msgid "" |
| 163 |
"``re:test(src, pattern, flags)`` returns `true` if the string `src` matches " |
| 164 |
"the regular expression `pattern`. A particularly useful flag is ``i``, it " |
| 165 |
"makes matching case insensitive. A good primer on the syntax for regular " |
| 166 |
"expressions can be found at `regexp syntax " |
| 167 |
"<https://docs.python.org/library/re.html>`_" |
| 168 |
msgstr "```re:test(src, pattern, flags)`` restituisce `true` se la stringa `src` corrisponde all'espressione regolare `pattern`. Un flag particolarmente utile è ``i``, che non considera la differenza MAIUSCOLE/minuscole. Un primo aiuto sulla sintassi per le espressioni regolari è disponibile in `sintassi delle regexp<https://docs.python.org/2.7/library/re.html>` _" |