From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/it/xml_in_mozilla/index.html | 283 +++++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 files/it/xml_in_mozilla/index.html (limited to 'files/it/xml_in_mozilla/index.html') diff --git a/files/it/xml_in_mozilla/index.html b/files/it/xml_in_mozilla/index.html new file mode 100644 index 0000000000..b710d649e6 --- /dev/null +++ b/files/it/xml_in_mozilla/index.html @@ -0,0 +1,283 @@ +--- +title: XML in Mozilla +slug: XML_in_Mozilla +tags: + - NeedsUpdate + - Tutte_le_categorie + - XML +translation_of: Archive/Mozilla/XML_in_Mozilla +--- +

Mozilla gestisce ampiamente XML. Sono gestite diverse Raccomandazioni e bozze del World Wide Web Consortium (W3C) per la famiglia XML, così come altre tecnologie relative.

+ +

Supporto principale alle Raccomandazioni W3C per l'XML

+ +

Il supporto principale ad XML include: il parsing senza validazione (utilizzando Expat parser), la visualizzazione di XML con CSS, la manipolazione di documenti XML con script che utilizzano la tecnologia DOM, l'associazione dei fogli di stile ai documenti XML, e i namespace. Il supporto principale è buono, ma ha ancora qualche bug.

+ +

DTD e altre entità esterne

+ +

Mozilla non utilizza entità esterne prese dalla rete.

+ +

Mozilla può caricare entità esterne solamente se l'identificatore di sistema utilizza il protocollo chrome. Questa caratteristica viene usata principalmente per regionalizzare Mozilla in lingue diverse dall'Inglese (le stringhe UI vengono mantenute in file DTD esterni). Mozilla carica entità esterne in un altro caso: se l'identificatore di sistema ha un percorso relativo, e se la dichiarazione XML definisce il documento come non autonomo (standalone), che è l'attributo di default. In questo caso Mozilla proverà a cercare l'entità nella cartella <bin>/res/dtd.

+ +

Mozilla può fare eccezioni sulle entità esterne anche per documenti XHTML. Si veda sotto.

+ +

Mozilla leggerà i subset interni (DTD), e in casi speciali anche le DTD esterne (come è stato spiegato sopra) e utilizzarà queste informazioni per riconoscere gli attributi di tipo ID, i valori di default per gli attributi e le entità generali.

+ +

Altre note

+ +

Gran parte del Document Object Model (DOM, Raccomandazioni e bozze W3C) si applica ad XML. Per esempio il linguaggio Cascading Style Sheets (CSS, Raccomandazioni e bozze W3C) può essere utilizzato per formattare documenti XML.

+ +

Il codice per il supporto principale ad XML può essere trovato nelle seguenti cartelle presenti sul server CVS di Mozilla: content/xml/, parser/expat/, e parser/htmlparser/.

+ +

La scelta del newsgroup dove discutere (in Inglese) sul supporto di XML in Mozilla, dipende dalla natura della domanda. Per esempio, le domande su DOM dovrebbero essere discusse sul newsgroup mozilla.dev.tech.dom, mentre le discussioni sullo stile dovrebbero essere svolte su mozilla.dev.tech.css e così via. Le discussioni di carattere generale su XML si trovano su mozilla.dev.tech.xml.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Specificazione o tecnologiaStatus e/o maggiore documentazione
XMLW3C Recommendation
Namespace in XMLW3C Recommendation
Associare i fogli di stile ai documenti XMLW3C Recommendation
Formattare documenti XML con CSS 
Manipolare documenti XML con script che usano DOM 
Convertire un albero DOM di un foglio XML in un albero di oggetti Javascript (JXON) 
+ +

Altre Raccomandazioni XML del W3C gestite

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Specificazione o TechnologiaDocumentazione
XHTMLW3C Recommendation
XML Base (solo per collegamenti, non per :visited ecc. Proprietà CSS)W3C Recommendation
XLink (solo XLinks semplici)W3C Recommendation
FIXptrW3C "proposal"
XPointer FrameworkW3C Recommendation
XPointer element() schemeW3C Recommendation
XPointer xmlns() schemeW3C Recommendation
XPointer fixptr() schemeQuesto schema è solo un wrapper per FIXptr
XPointer xpath1() schemeInternet-Draft
document.load(), document.asyncPart of DOM Level 3 Load & Save module, a W3C Working Draft
+ +

XHTML

+ +

XHTML è ampiamente supportato, la maggior parte delle cose dovrebbero funzionare. I documenti XHTML vengo trattati in maniera differente a seconda del mime type (o a seconda dei suffissi dei file se vengono caricati da dischi locali). Per i file che passano attraverso il code path HTML non si controlla se sono ben formati. E' possibile inoltre notare che non tutte le caratteristiche di XHTML vengono supportate se passano con il code path HTML.

+ + + + + + + + + + + + + + + + + + + +
MIME TypeSuffisso del fileCode Path
text/xml
+ application/xml
+ application/xhtml+xml
xml
+ xht
+ xhtml
XML
text/htmlhtml
+ htm
HTML
+ +

L'intero documento deve essere XHTML. Possono essere utilizzati elementi XHTML all'interno di documenti XML specificando il namespace XHTML. Per degli esempi si veda la sezione Testing and QA. Il namespace corretto per XHTML è http://www.w3.org/1999/xhtml

+ +

Si noti che le entità XHTML, come &auml;, funzionano solo in conformità ai documenti XHTML che hanno un XHTML Formal Public Identifier valido (cioè, in parole povere, una sezione DOCTYPE con un identificatore PUBLIC). Le entità XHTML non funzioneranno in documenti XML, neanche se viene specificato il namespace XHTML. Gli identificatori pubblici riconosciuti sono:

+ +
-//W3C//DTD XHTML 1.0 Transitional//EN
+-//W3C//DTD XHTML 1.1//EN
+-//W3C//DTD XHTML 1.0 Strict//EN
+-//W3C//DTD XHTML 1.0 Frameset//EN
+-//W3C//DTD XHTML Basic 1.0//EN
+-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN
+-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN
+-//W3C//DTD SVG 20001102//EN
+-//WAPFORUM//DTD XHTML Mobile 1.0//EN
+
+ +

XML Linking e Pointing

+ +

Il supporto per XML Linking include XML Base (utilizzato solamente quando il mouse è posizionato sopra un collegamente o quando viene cliccato)) e semplici XLinks. Si può traformare qualsiasi elemento XML in un XLink utilizzando il namespace XLink http://www.w3.org/1999/xlink. Si possono anche utilizzare gli elementi di collegamento del namespace XHTML. Per degli esempi si veda la sezione Testing and QA.

+ +

Per il puntamento a risorse all'interno di documenti XML, Mozilla supporta anche FIXptr, una versione semplificata e non compatibile di XPointer. Oltre a poter utilizzare FIXptr nei collegamenti, è posibile utilizzarlo negli script. Si veda l'interfaccia proprietaria dom/public/idl/core/nsIDOMXMLDocument.idl. E' possibile trovare un test per FIXptr links e un esempio di script.

+ +

A partire dalla versione 1.4alpha, Mozilla supporta anche XPointer Framework, XPointer element() scheme, XPointer xmlns() scheme, XPointer fixptr() scheme e XPointer xpath1() scheme. Il processore XPointer è estensibile ed è semplice implentare supporto per altri schemi. Si veda l'API. L'xpath1() scheme è stato implementato utilizzando questo meccanismo estensibile. E' inoltre possibile trovare API proprietari per il processore XPointer. Inoltre si potrebbe considerare di visionare anche il

+ +

test per XPointers.

+ +

Infine, è disponibile uno script predefinito (molto utile con FIXptr) che seleziona il target del collegamento passandoci sopra con il mouse. Non c'è ancora un UI per impostare questo script predefinito, quindi sarà necessario modificare manualmente il file delle preferenze. Si aggiunga questa linea.

+ +
pref("layout.selectanchor", true);
+
+ +

DOM Load and Save Methods

+ +

document.load() is a part of an old version of the W3C DOM Level 3 Load & Save module. Mozilla currently implements only the load() method and the async property. Since 1.4alpha it has been possible to load documents synchronously, before that it was only asynchronous. See the load sample in the XML tests directory. (Loading the load.html file from the LXR generated page will not work because LXR will munge the test.xml file into HTML and serve it as HTML. To test this functionality, create the files on your local disk or on a webserver.)

+ +

Outside Supported XML W3C Recommendations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Specification or TechnologyDocumentationMozilla Project
XSLTW3C RecommendationXSLT
XPathW3C RecommendationXSLT
XMLHttpRequestW3C DraftXML Extras
DOMParser and XMLSerializerMozillaXML Extras
SAXhttp://www.saxproject.org/ 
SOAPW3C NoteWeb Services
XML-RPCUserLand SoftwareXML-RPC
RDFW3C RecommendationsRDF
SVGW3C Proposed RecommendationSVG
MathMLW3C RecommendationMathML
P3PW3C RecommendationP3P
WSDLW3C NoteWeb Services
XBLMozilla's XBL reference 
XULMozilla's XUL reference 
+ +

Roadmap

+ +

Next big tasks would include support for XPointer xpointer() scheme (bug 32832), XInclude, XML Catalogs (bug 98413), XForms (bug 97806; work being done on implementing this as an extension), validating parser (bug 196355), XML Schemas, and incremental layout of XML document (bug 18333).

+ +

To fully implement XLink, we need something called a link manager. See some initial design documents.

+ +

Testing and QA

+ +

We have a lot of testcases linked to from the browser standards compliance QA page.

+ +

Most of the core XML test documents on the CVS server are located in content/xml/tests. We also have a couple online: the books demo and the IRS table of contents demo. Both of them demonstrate XML, Associating stylesheets with XML, displaying XML with CSS, Namespaces in XML, XHTML, simple XLinks, and manipulation of XML with scripts via DOM.

+ +

There is an XML component in Bugzilla.

+ +

We also have the "xhtml" keyword for XHTML bugs (these tend to be scattered across components).

+ +

How can I help?

+ +

If you can code, look for helpwanted keyword in XML bugs. We don't use that always, so if you want to avoid doing duplicate work you could start working on bugs that have Future milestone, or otherwise have a milestone that is set way into the future.

+ +

You can always test our XML support. We'd really like to get tests that can be run automatically (this would require knowledge of web development; document.load() and/or XML Extras might be needed), but probably most of the bugs we get have just been found by normal people trying to do something that works in some other browser and does not work in Mozilla.

-- cgit v1.2.3-54-g00ecf