Document Object Model (DOM) Level 3 XPath Spezifikation

Version 1.0

Kommentierte Übersetzung ins Deutsche

10.Dezember 2003

Das ist die deutsche Übersetzung der W3C-Kandidat-Empfehlung "Document Object Model (DOM) Level 3 XPath Spezifikation, Version 1.0" vom 31. März 2003. Beachten Sie bitte, dass dieses Dokument kein normatives Dokument ist und Übersetzungsfehler beinhalten kann. Es ersetzt das Originaldokument in keiner Weise. Das Originaldokument ist zu finden unter http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331

Falls Sie Übersetzungsfehler sehen, bestimmte Passagen anders übersetzen würden oder Verbesserungsvorschläge haben, dann teilen Sie die Details doch bitte dem Übersetzer mit: standard(at-Zeichen)wbock-privat.de.

Diese Version der Übersetzung:
http://www.wbock-privat.de/start/DOM3-XPath-20031210.html
Die aktuelle Version:
http://www.wbock-privat.de/start/DOM3-XPath.html
Der Übersetzer:
Wolfgang Bock standard(at-Zeichen)wbock-privat.de

Dieses Dokument ist urheberrechtlich geschützt, Copyright ©2003 W3C® (MIT, ERCIM, Keio), Alle Rechte vorbehalten. Die Rechte an der Übersetzung liegen beim Übersetzer, Copyright © 2003 Wolfgang Bock

Bemerkungen zur Übersetzung

Diese Version wird vom Übersetzer noch als Rohübersetzung betrachtet. Der Inhalt des Originaldokuments der Form "Single HTML File" ist vollständig enthalten. Jedem originalen Abschnitt folgt ein übersetzter Abschnitt mit derselben Hintergrundfarbe wie in diesem Abschnitt. Kommentare und Hinzufügungen wurden zusätzlich in geschweifte Klammern {} gesetzt. Umgekehrt sind Texte in geschweiften Klammern in jedem Fall Anmerkungen des Übersetzers. So wurden an bestimmten Stellen übersetzten Fachbegriffen das Original in geschweiften Klammern nachgesetzt, oder bei freier Übersetzung bestimmter Passagen die Originalpassage. Im allgemeinen wurde versucht, möglichst wortgetreu zu übersetzen.

Eine verbesserte Übersetzung ist in Arbeit. Jede folgende Übersetzung wird immer die des neuesten Stands des Originaldokuments sein.

W3C

Document Object Model (DOM) Level 3 XPath Specification

Version 1.0

W3C Candidate Recommendation 31 March 2003

This version:
http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331
Latest version:
http://www.w3.org/TR/DOM-Level-3-XPath
Previous version:
http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020328
Editor:
Ray Whitmer, Netscape/AOL

This document is also available in these non-normative formats: XML file, plain text, PostScript file, PDF file, single HTML file, and ZIP file.

Dokument Objekt Modell (DOM) Level 3 XPath Spezifikation

Version 1.0

W3C Kandidat-Empfehlung vom 31 März 2003

Diese Version:
http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331
Letzte Version:
http://www.w3.org/TR/DOM-Level-3-XPath
Vorhergehende Version:
http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020328
Herausgeber:
Ray Whitmer, Netscape/AOL

Dieses Dokument ist auch in folgenden nichtnormativen Formaten verfügbar: XML-Datei, Nur Text, PostScript-Datei, PDF-Datei, als einzige HTML-Datei, und als ZIP-Datei.


Abstract

This specification defines the Document Object Model Level 3 XPath. It provides simple functionalities to access a DOM tree using [XPath 1.0].

Zusammenfassung

Diese Spezifikation definiert "Document Object Model Level 3 XPath". Sie stellt einfache Funktionalitäten zum Zugriff auf den DOM-Baum unter Verwendung von [XPath 1.0] bereit.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.

This is a Candidate Recommendation of "DOM Level 3 XPath" and is based on the feedback received during the Last Call period. The DOM Working Group expects to request that the Director advance this specification to Proposed Recommendation after the DOM Working Group documents two interoperable implementations of at least one normative binding. Basic tests of features of this specification will be produced and used in this effort. The two implementations must be produced by different organizations. The Working Group expects to satisfy those requirements by 26 May 2003 and afterwards submit the tests to the DOM Test Suite. Please send reviews before the review period ends to the public mailing list www-dom@w3.org. An archive is available at http://lists.w3.org/Archives/Public/www-dom/.

Individuals or organizations are also invited to send a message to the public mailing list if they intend to produce an implementation of this module.

It is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". This is work in progress and does not imply endorsement by, or the consensus of, W3C.

This document has been produced as part of the W3C DOM Activity. The authors of this document are the DOM Working Group members.

An implementation report is also available.

Patent disclosures relevant to this specification may be found on the Working Group's patent disclosure page.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

Status dieses Dokuments

Dieser Abschnitt beschreibt den Status des Dokuments zum Zeitpunkt seiner Veröffentlichung. Andere Dokumente können dieses Dokument ersetzen. Der neueste Status dieser Dokumentserie liegt in der Hand des W3C.

Dieses Dokument ist eine Kandidat-Empfehlung zu DOM Level 3 XPath" und beruht auf eingegangene Rückmeldungen während des Last-Call-Zeitraums. Die DOM-Arbeitsgruppe sieht dem Ersuchen entgegen, dass der Direktor diese Spezifikation weiterführt, nachdem die DOM-Arbeitsgruppe zwei betriebsfähige Implementierungen von mindestens einer normativen Bindung dokumentiert hat. In diesem Rahmen werden grundlegende Tests der Eigenschaften dieser Spezifikation angewendet. Die zwei Implementierungen müssen von verschiedenen Organisationen durchgeführt werden. Die Arbeitsgruppe hofft diesen Anforderungen bis zum 26 Mai 2003 gerecht zu werden und anschließend die Tests der DOM-Test-Suite hinzuzufügen. Bitte senden Sie Berichte vor dem Ende des Prüfzeitraums zur öffentlichen Mailing-Liste www-dom@w3.org. Ein Archiv ist unter http://lists.w3.org/Archives/Public/www-dom/ verfügbar.

Einzelpersonen oder Organisationen werden ebenfalls gebeten, eine Nachricht an die öffentliche Mailing-Liste zu senden, wenn sie eine Implementierung dieses Moduls beabsichtigen.

Es {dieses Dokument} ist ein Entwurfsdokument und kann jederzeit überarbeitet, ausgetauscht oder aufgrund eines anderen Dokuments als veraltet eingestuft werden. Es ist nicht angebracht, einen W3C-Arbeitsentwurf als Referenzmaterial zu verwenden oder anders als "noch in Arbeit" zu zitieren. Dieses Dokument ist in Arbeit und impliziert keine {weitergehende} Bestätigung durch oder in Übereinstimmung mit dem W3C.

Dieses Dokument wurde als Teil der W3C-DOM-Aktivitäten erstellt. Die Autoren dieses Dokuments sind die Mitglieder der DOM-Arbeitsgruppe.

Ein Implementierungsbericht ist ebenfalls vorhanden.

Patentoffenlegungen {patent disclosures}, die relevant für diese Spezifikation sind, können auf der Seite für Patentoffenlegungen der Arbeitsgruppe gefunden werden.

Eine Liste der aktuellen W3C Empfehlungen und anderer technischer Dokumente sind zu finden unter http://www.w3.org/TR.

Table of contents

Inhaltsverzeichnis

31 March 2003

Expanded Table of Contents

31 März 2003

Erweitertes Inhaltsverzeichnis

31 March 2003

W3C Copyright Notices and Licenses

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved.

This document is published under the W3C® Document Copyright Notice and License. The bindings within this document are published under the W3C® Software Copyright Notice and License. The software license requires "Notice of any changes or modifications to the W3C files, including the date changes were made." Consequently, modified versions of the DOM bindings must document that they do not conform to the W3C standard; in the case of the IDL definitions, the pragma prefix can no longer be 'w3c.org'; in the case of the Java language binding, the package names can no longer be in the 'org.w3c' package.

31 März 2003

W3C Copyright-Hinweise und Lizenzierung

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). Alle Rechte vorbehalten.

Dieses Dokument wurde unter W3C® Dokument-Copyright-Hinweise und Lizenzierung veröffentlicht. Die Sprachbindungen im Dokument wurden unter W3C® Software-Copyright-Hinweise und Lizenzierung veröffentlicht. Die Softwarelizenz erfordert "Notizen über beliebige Änderungen und Modifizierungen an den W3C-Dateien, einschließlich des Datums der Veränderungen." In dieser Konsequenz müssen modifizierte Versionen der DOM-Bindungen, die nicht konform zum W3C-Standard sind, dokumentiert werden; im Fall der IDL-Definitionen kann das Pragma-Präfix nicht mehr 'w3c.org' lauten; im Fall der Java-Sprachbindung können die Package-Namen nicht mehr im 'org.w3c'-Package enthalten sein.


Note: This section is a copy of the W3C® Document Notice and License and could be found at http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231.

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved.

http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231

Public documents on the W3C site are provided by the copyright holders under the following license. By using and/or copying this document, or the W3C document from which this statement is linked, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:

Permission to copy, and distribute the contents of this document, or the W3C document from which this statement is linked, in any medium for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the document, or portions thereof, that you use:

  1. A link or URL to the original W3C document.
  2. The pre-existing copyright notice of the original author, or if it doesn't exist, a notice (hypertext is preferred, but a textual representation is permitted) of the form: "Copyright © [$date-of-document] World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
  3. If it exists, the STATUS of the W3C document.

When space permits, inclusion of the full text of this NOTICE should be provided. We request that authorship attribution be provided in any software, documents, or other items or products that you create pursuant to the implementation of the contents of this document, or any portion thereof.

No right to create modifications or derivatives of W3C documents is granted pursuant to this license. However, if additional requirements (documented in the Copyright FAQ) are satisfied, the right to create modifications or derivatives is sometimes granted by the W3C to individuals complying with those requirements.

THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders.

W3C® Dokument-Copyright-Hinweise und Lizenzierung

Hinweis: Dieser Abschnitt ist eine Kopie von "W3C® Document Notice and License" und ist zu finden unter http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231.

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). Alle Rechte vorbehalten.

http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231

Öffentliche Dokumente auf der W3C-Site werden von den Copyright-Inhabern bereitgestellt unter der folgenden Lizenz. Zum Verwenden und/oder Kopieren des W3C-Dokuments mit dem diese Aussage verbunden ist, pflichtest Du (der Lizenznehmer) bei, dass Du die folgenden Begriffe und Bedingungen gelesen, verstanden und eingewilligt hast:

Das Recht zum Kopieren und Verteilen des Inhalts dieses Dokuments, oder des W3C-Dokuments, mit dem diese Aussage verbunden ist, in irgendeinem Medium für irgendeinen Zweck und ohne Gebühren oder Abgaben wird hiermit bewilligt, vorausgesetzt dass Du das Folgende in ALLE Kopien dieses Dokuments oder Teilen davon einfügst, die verwendest:

  1. Ein Link oder URL zum originalen W3C Dokument.
  2. Den bereits vorhandenen Copyright-Hinweis des originalen Autors, oder, wenn es ihn nicht gibt, einen Hinweis (Hypertext wird bevorzugt, aber eine Textdarstellung ist erlaubt) der Form: "Copyright © [$date-of-document] World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
  3. Wenn es ihn gibt, der STATUS des W3C-Dokuments.

Wenn es der Platz erlaubt, sollte der volle Text dieser NOTIZ {NOTICE} mit eingeschlossen sein. Wir verlangen, dass Autorenverweise enthalten sein müssen {, und zwar} in jeder Software, jedem Dokument oder anderen Teilen oder Produkten, die Du gemäß der Implementierung des Inhalts von diesem Dokument oder Teilen davon erzeugst.

Es wird kein Recht gewährt Änderungen oder Ableitungen von W3C-Dokumenten gemäß dieser Lizenz zu erzeugen. Jedoch wenn zusätzliche Anforderungen (dokumentiert in Copyright FAQ) erfüllt werden, so wird das Recht zum Erzeugen von Änderungen oder Ableitungen manchmal einzelnen Personen gewährt, die in diese {zusätzlichen} Anforderungen einwilligen.

DIESES DOKUMENT WIRD ZUR VERFÜGUNG GESTELLT, "WIE ES IST", UND DIE COPYRIGHT-INHABER MACHEN KEINE ANGABEN ODER GEBEN GARANTIEN, WEDER AUSDRÜCKLICH NOCH IMPLIZIT, EINSCHLIESSLICH UND NICHT BEGRENZT AUF GARANTIEN ZUR MARKTREIFE, DER EIGNUNG ZU EINEM BESTIMMTEN ZWECK, NICHT-RECHTSVERLETZUNG ODER ANKÜNDIGUNG {TITEL}; DASS DER INHALT DES DOKUMENTES ZU IRGENDEINEM ZWECK VERWENDBAR IST; NOCH DASS DIE IMPLEMENTIERUNG SOLCHEN INHALTS KEINE PATENTE, COPYRIGHTS, EINGETRAGENE WARENZEICHEN ODER ANDERE RECHTE DRITTER VERLETZT.

DIE COPYRIGHT-INHABER SIND NICHT FÜR IRGENDWELCHE DIREKTEN, INDIREKTEN, SPEZIELLEN ODER FOLGESCHÄDEN VERANTWORTLICH, DIE AUS IRGENDEINEM GEBRAUCH DES DOKUMENTS ODER DER LEISTUNG ODER IMPLEMENTIERUNG DES INHALTS HERAUS DAVON ENTSTEHEN.

Der Name und die eingetragenen Warenzeichen der Copyright-Inhaber kann man NICHT in Werbung oder Annoncen zu diesem Dokument oder zu seinem Inhalt verwenden ohne besondere vorher gegebene schriftliche Genehmigung. Die Ankündigung zum Copyright in diesem Dokument verbleibt immer bei der Copyright-Inhabern.


Note: This section is a copy of the W3C® Software Copyright Notice and License and could be found at http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved.

http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.

Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:

  1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
  2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C® Short Software Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
  3. Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.

The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.

W3C® Software-Copyright-Hinweise und Lizenzen

Hinweis:Dieser Abschnitt ist eine Kopie von "W3C® Software Copyright Notice and License" und ist zu finden unter http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). Alle Rechte vorbehalten.

http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

Diese Arbeit (und die enthaltene Software, Dokumentationen wie READMEs und andere anhängende Einträge) sind von den Copyright-Inhabern unter folgender Lizenz bereitgestellt. Bei Erhalt, Verwendung und/oder dem Kopieren dieser Arbeit pflichtest Du (der Lizenznehmer) bei, dass Du die folgenden Begriffe und Bedingungen gelesen, verstanden und eingewilligt hast.

Das Recht zum Kopieren, Verändern und Verteilen dieser Software und seiner Dokumentation, mit oder ohne Veränderungen für irgendeinen Zweck und ohne Gebühren oder Abgaben wird hiermit bewilligt, vorausgesetzt, dass Du das Folgende in ALLE Kopien der Software und Dokumentation oder Teilen davon einfügst, einschließlich der Veränderungen:

  1. Den vollständigen Text dieser NOTIZ {NOTICE} in sichtbarer Position für den Anwender der neuverteilten oder abgeleiteten Arbeit.
  2. Alle bereits vorhandenen Verzichte {disclaimers}, Hinweise oder Begriffe und Bedingungen. Gibt es das nicht, dann sollte die "W3C® Short Software Notice" eingeschlossen werden (Hypertext wird bevorzugt, aber eine Textdarstellung ist erlaubt) inmitten des Körpers oder jedes neuverteilten oder abgeleiteten Kodes.
  3. Hinweise über irgendwelche Änderungen oder Modifizierungen der Dateien, einschließlich Datumsänderungen sind zu machen {were made}. (Wir empfehlen Dir, URIs von der Quelle {location} bereitzustellen, von der der Kode abgeleitet wird.)

DIESE SOFTWARE UND DOKUMENTATION WIRD ZUR VERFÜGUNG GESTELLT, "WIE SIE IST", UND DIE COPYRIGHT-INHABER MACHEN KEINE ANGABEN ODER GEBEN GARANTIEN, WEDER AUSDRÜCKLICH NOCH IMPLIZIT, EINSCHLIESSLICH UND NICHT BEGRENZT AUF GARANTIEN ZUR MARKTREIFE, DER EIGNUNG ZU EINEM BESTIMMTEN ZWECK, NOCH DASS DIE VERWENDUNG VON SOFTWARE ODER DOKUMENTATION KEINE PATENTE, COPYRIGHTS, EINGETRAGENE WARENZEICHEN ODER ANDERE RECHTE DRITTER VERLETZT.

DIE COPYRIGHT-INHABER SIND NICHT FÜR IRGENDWELCHE DIREKTEN, INDIREKTEN, SPEZIELLEN ODER FOLGESCHÄDEN VERANTWORTLICH, DIE AUS IRGENDEINEM GEBRAUCH VON SOFTWARE ODER DOKUMENTATION ENTSTEHEN.

Der Name und die eingetragenen Warenzeichen der Copyright-Inhaber kann man NICHT in Werbung oder Annoncen zu dieser Software verwenden ohne besondere vorher gegebene schriftliche Genehmigung. Die Ankündigung zum Copyright in dieser Software und der damit verbundenen Dokumention verbleibt immer bei der Copyright-Inhabern.

Note: This section is a copy of the W3C® Short Software Notice and could be found at http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved.

Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. This work is distributed under the W3C® Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

W3C® Kurzfassung Software-Hinweis

Hinweis: Dieser Abschnitt ist eine Kopie von "W3C® Short Software Notice" und ist zu finden unter http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231

Copyright © 2003 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). Alle Rechte vorbehalten.

Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). Alle Rechte vorbehalten. Diese Arbeit wird unter der "W3C® Software License [1]" vertrieben in der Hoffnung, dass dies nützlich ist, aber OHNE IRGENDWELCHE GARANTIEN; {und} ohne gleichsam einer impliziten Garantie zu MARKTREIFE oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK.

[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

31 March 2003

1. Document Object Model XPath

Editor:
Ray Whitmer, Netscape/AOL

Table of contents

31 März 2003

1. Document-Objekt-Modell XPath

Herausgeber {Editor}:
Ray Whitmer, Netscape/AOL

1.1. Introduction

XPath 1.0 [XPath 1.0] is becoming an important part of a variety of many specifications including XForms, XPointer, XSL, XML Query, and so on. It is also a clear advantage for user applications which use DOM to be able to use XPath expressions to locate nodes automatically and declaratively.

This specification was created to map between the Document Object Model's representation of the W3C Information Set and XPath's model to permit XPath functions to be supplied and results returned within the framework of DOM APIs in a standard, interoperable way, allowing also for liveness of data, which is not addressed by the XPath specification but is present in results coming from the DOM hierarchy.

1.1. Einführung

XPath 1.0 [XPath 1.0] ist ein wichtiger Teil einer Vielzahl von Spezifikationen geworden, einschließlich XForms, XPointer, XSL, XML Query, und so weiter. Es ist auch ein klarer Vorteil für Anwendungsapplikationen die DOM verwenden, nun mit {Hilfe von} XPath-Ausdrücken Knoten automatisch oder deklarativ zu lokalisieren.

Diese Spezifikation wurde erstellt, um zwischen dem W3C-Information-Set des Dokument-Objekt-Modells, und dem Modell {model} von Xpath zu verbinden; zuzulassen, dass XPath-Funktionen unterstützt werden und die Ergebnisse in den Arbeitsraum des DOM-API nach einem standardisierten Verfahren zurückgeben werden, sowie den Erhalt {liveness} von Daten gestattet, die nicht durch die XPath-Spezifikation beschrieben werden, sondern von der DOM-Hierarchie selbst stammen.

1.2. Mapping DOM to XPath

This section presents a mapping between the Document Object Model [DOM Level 2 Core] and the XPath 1.0 [XPath 1.0] model for the purposes of implementing the APIs.

1.2.1. Element Nodes

The DOM model uses Element nodes to represent Element Information Items. These nodes of a document are directly used to represent the elements of an XPath result.

1.2. Überführung zwischen DOM und XPath

Dieser Abschnitt zeigt eine Überführung zwischen dem Dokument-Objekt-Modell [DOM Level 2 Core] und dem Modell von XPath 1.0 [XPath 1.0] für Zwecke der Implementierung der APIs.

1.2.1. Elementknoten

Das DOM-Modell verwendet Knoten vom Typ Element zur Repräsentierung von Element-Informationseinheiten {Element Information Items}. Solche Knoten werden im Dokument direkt verwendet, um die Elemente eines XPath-Resultats zu repräsentieren.

1.2.2. Attribute Nodes

The DOM model uses Attr nodes to represent Attribute Information Items of attribute and namespace attribute properties of Element Information Item. These nodes have no parent, but have an ownerElement which can be used as XPath defines an attribute's parent.

XPath 1.0 does not make available the namespace attributes of an element. The DOM implementation of XPath 1.0 using these defined interfaces never directly returns Attr nodes of namespace attributes, but returned Element nodes still contain them.

1.2.2. Attributknoten

Das DOM-Modell verwendet Knoten vom Typ Attr zur Repräsentierung von Attribut-Informationseinheiten {Attribute Information Items} von Attributen und Namensraumattribut-Eigenschaften von Element-Informationseinheiten {Element Information Item}. Solche Knoten haben kein Elternteil, haben aber ein ownerElement {besitzendes Element} das so verwendet werden kann, wie XPath die Attribut-Elternknoten definiert.

XPath 1.0 stellt die Namensraum-Attribute eines Elements nicht zur Verfügung. Die DOM-Implementierung von XPath 1.0 verwendet diese definierte Schnittstellen niemals direkt zur Rückgabe von Attr-Knoten der Namensraum-Attribute, sondern gibt die noch enthaltenen Element-Knoten zurück.

1.2.3. Namespace Nodes

The XPath model expects namespace nodes for each in-scope namespace to be attached to each element. DOM only maintains the namespace attributes instead of replicating in-scope namespaces on each Element where they are in-scope. The DOM implementation of XPath produces a new node of type XPATH_NAMESPACE_NODE, defined in the XPathNamespace interface, to properly preserve identity and ordering in a way that is compatible with XPath. This node type is only visible using the XPath evaluation methods.

The set of in-scope namespaces of an element is the default xml namespace combined with the contributions of namespace attributes of the current and all ancestor elements. In addition to explicit namespace attributes, any element has an implicit declaration of its own prefix, if any, or if no prefix then of the default namespace, which is enforced during namespace serialization, fixup, and lookup, which must be added to the set of in-scope namespaces when generating namespace nodes for an element. This causes the set of namespace nodes to be consistent with serialization, fixup, and lookup of namespaces in DOM Level 3.

1.2.3. Namensraum-Knoten

Das XPath-Modell erwartet für jeden im Bereich gültigen Namensraum einen Namensraum-Knoten, der mit jedem Element {element} verbunden ist. DOM verwaltet lediglich {only maintains} die Namensraum-Attribute anstelle einer Replizierung des Namensraums jedes Element-Knotens, der im Bereich liegt. Die DOM-Implementierung von XPath erzeugt einen neuen Knoten vom Typ XPATH_NAMESPACE_NODE, definiert in der XPathNamespace-Schnittstelle {interface}, zur vollständigen vorgegebenen Identität und Reihenfolge in einer Art und Weise, die mit XPath kompatibel ist. Dieser Knotentyp ist nur bei Verwendung der XPath-Evaluierungsmethoden sichtbar.

Das Set der im Bereich liegenden Namensräume eines Elements ist {zum einen} der vorgegebene xml-Namensraum und zum anderen {combined with} die beigefügten Namensraum-Attribute des aktuellen {Elements} und aller Vorfahren-Elemente {ancestor elements}. Zusätzlich zu den expliziten Namensraumattributen kann jedes Element eine implizite Deklaration {eines Namensraums} durch einen eigenen Präfix enthalten, oder, wenn kein Präfix vorhanden ist, den vorgegeben Namensraum enthalten, der durch die Namensraum-Serialisierung, -Feststellung, und -Erkennung {namespace serialization, fixup, and lookup} herbeigeführt wird, und die zum Set der im Bereich liegenden Namensräume hinzugefügt werden müssen wenn die Namesnraumknoten für ein Element erzeugt werden. Diese Fälle von Namensraum-Knotensets sind konsistent zur Namensraum-Serialisierung, -Feststellung, und -Erkennung {namespace serialization, fixup, and lookup} in DOM Level 3.

1.2.4. Text Nodes

The XPath model relies on the XML Information Set [XML Information set] ands represents Character Information Items in a single logical text node where DOM may have multiple fragmented Text nodes due to cdata sections, entity references, etc. Instead of returning multiple nodes where XPath sees a single logical text node, only the first non-empty DOM Text or CDATASection node of any logical XPath text will be returned in the node set. Applications using XPath in an environment with fragmented text nodes must manually gather the text of a single logical text node possibly from multiple nodes beginning with the first Text node or CDATASection node returned by the implementation.

Note: In an attempt to better implement the XML Information Set, DOM Level 3 Core [DOM Level 3 Core] adds the attribute wholeText on the Text interface for retrieving the whole text for logically-adjacent Text nodes and the method replaceWholeText for replacing those nodes.

1.2.4. Textknoten

Das XPath-Modell verlässt sich auf das XML-Informations-Set [XML Information set] und repräsentiert Zeichen-Informationseinheiten {Character Information Items} in einem einzigen logischen Textknoten, während DOM mehrere geteilte Text-Knoten infolge von Cdata-Abschnitten, Entity-Referenzen, und so weiter haben kann. Anstelle der Rückgabe mehrerer Knoten, bei denen XPath einen einzigen logischen Knoten vom Typ Text sieht, wird nur der erste nichtleere DOM-Text- oder CDATASection-Knoten jedes logischen XPath-Textknotens in das Knotenset zurückgegeben. Anwendungen, die XPath in einer Umgebung mit geteilten Textknoten verwenden, müssen den Text zu einem einzigen logischen Textknotens manuell zusammenführen, möglicherweise beginnend beim ersten Knoten vom Typ Text oder CDATASection-Knoten, der von der Implementierung zurückgegeben wird.

Hinweis: Im Versuch {in an attempt} einer besseren Implementierung des XML-Informations-Sets {XML Information set}, fügt DOM Level 3 Core [DOM Level 3 Core] das Attribut wholeText zur Text-Schnittstelle hinzu zwecks Wiederherstellung des gesamten Textes von logisch angrenzenden Textknoten {logically-adjacent Text nodes} sowie die Methode replaceWholeText zum Ersetzen dieser Knoten.

1.2.5. Entity Reference Nodes

The DOM model may represent Unexpanded Entity Reference Information Items or may provide the position and URI of expanded entity hierarchies by using EntityReference nodes. XPath 1.0 does not preserve corresponding information.

Where the node represents an unexpanded entity reference, it is skipped as dictated by the XPath specifications for all infoset items besides those specifically processed.

Where there is a hierarchy underneath the node, these nodes are processed as though they were siblings of the entity reference, as is consistent with the rest of the DOM specification.

EntityReference nodes found within a DOM hierarchy are never returned as a node of the result, but returned nodes may contain or be contained within an EntityReference node. Text may be split partially inside and partially outside of an EntityReference node, but this is solved by handling Text nodes as described in the previous section.

1.2.5. Entity-Referenzknoten

Das DOM-Modell kann Informationseinheiten von nichtexpandierenden Entityreferenzen {Unexpanded Entity Reference Information Items} repräsentieren oder die Position und das URI von expandierten Entityhierarchien unter Verwendung von EntityReference-Knoten bereitstellen. XPath 1.0 hält solche {corresponding} Informationen nicht fest.

Steht der Knoten für eine nichtexpandierende Entityreferenz, wird er übergangen entsprechend den XPath-Spezifikationen für alle Infoset-Informationmseinheiten außer den in vorgeschriebener Weise verarbeiteten.

Gibt es eine Hierarchie unterhalb des Knotens, werden diese Knoten verarbeitet als ob sie Geschwister {sinlings} der Entityreferenz sind, übereinstimmend mit dem Rest der DOM-Spezifikation.

EntityReference-Knoten, die innerhalb einer DOM-Hierarchie gefunden wurden, werden niemals als Knoten im Ergebnis zurückgegeben, aber zurückgegebene Knoten können EntityReference-Knoten enthalten oder in EntityReference-Knoten enthalten sein. Text kann teilweise innerhalb und teilweise außerhalb eines EntityReference-Knotens geteilt sein, aber das ist bereits gelöst durch das Text-Knoten-Handling, beschrieben im vorhergehenden Abschnitt.

1.2.6. Comment Nodes

The DOM model uses Comment nodes to represent Comment Information Items. These nodes of a document are directly used to represent the comments of an XPath result.

1.2.6. Kommentarknoten

Das DOM-Modell verwendet Knoten vom Typ Comment um Kommentar-Informationseinheiten {Comment Information Items} zu repräsentieren. Diese Knoten im Dokument werden direkt zum Repräsentieren von Kommentaren im XPath-Resultat verwendet.

1.2.7. Processing Instruction Nodes

The DOM model uses ProcessingInstruction nodes to represent Processing Instruction Information Items. These nodes of a document are directly used to represent the processing instructions of an XPath result.

1.2.7. Processing-Instruction-Knoten

Das DOM-Modell verwendet Knoten vom Typ ProcessingInstruction um Processing-Instruction-Informationseinheiten {Processing Instruction Information Items} zu repräsentieren. Diese Knoten im Dokument werden direkt zum Repräsentieren von Prozessanweisungen {Processing Instructions} im XPath-Resultat verwendet.

1.2.8. Document order

The document order of nodes in the DOM Core has been defined to be compatible with the XPath document order. The XPath DOM extends the document order of the DOM Core to include the XPathNamespace nodes. Element nodes occur before their children. The attribute nodes and namespace nodes of an element occur before the children of the element. The namespace nodes are defined to occur before the attribute nodes. The relative order of namespace nodes is implementation-dependent. The relative order of attribute nodes is implementation-dependent. The compareTreePosition method on the Node interface defined in the DOM Core must compare the XPathNamespace nodes using this extended document order if the XPath DOM module is supported.

Note: It is possible that in future versions of XPath, the order of namespace nodes or other aspects of document order may change incompatibly.

1.2.8. Dokumentfolge

Die Dokumentfolge {document order} der Knoten nach der DOM-Core-Spezifikation wurde so definiert, dass sie mit der Dokumentfolge in XPath {XPath document order} kompatibel ist. Das XPath-DOM erweitert die Dokumentordnung der DOM-Core-Spezifikation so, dass XPathNamespace-Knoten eingeschlossen sind. Elementknoten erscheinen vor ihren Kindern. Attributknoten und Namensraumknoten eines Elements erscheinen vor den Kindern des Elements. Namensraumknoten sind so definiert, dass sie vor den Attributknoten erscheinen. Die relative Anordnung mehrerer Namensraumknoten ist implementierungsabhängig. Die relative Anordnung mehrerer Attributknoten ist implementierungsabhängig. Die Methode compareTreePosition der in der DOM-Core-Spezifikation definierten Knoten {node}-Schnittstelle muss die Knoten vom Typ XPathNamespace vergleichen können, die in der erweiterten Dokumentordnung verwendet werden, wenn das XPath-DOM-Modul unterstützt wird.

Hinweis: In zukünftigen Versionen von XPath ist es möglich, dass die Anordnung von Namensraumknoten oder andere Aspekte der Dokumentfolge eventuell inkompatibel verändert werden.

1.3. Conformance

This section explains conformance to DOM Level 3 XPath Module.

A DOM implementation must not return true to hasFeature("xpath", "3.0") unless the implementation conforms to that module. As documented in [DOM Level 3 Core], if a null or empty string is passed in for the second parameter, then conformance is still required to some version of the DOM XPath Module or false must be returned.

A conformant implementation is DOM Level 3 XPath must support all the interfaces as specified in that specification. In addition to implementing the interfaces in the DOM XPath Module, a conforming implementation must correctly implement each part of the XPath 1.0 specification when evaluating expressions including Location Paths, Expressions, the Core Function Library, and the mapping between DOM and the XPath 1.0 data model described in the DOM Level 3 XPath Module. The XPath id()function must return the corresponding element, if any, returned by the DOM method Document.getElementById.

After meeting the requirements for conformance, a conforming implementation may implement additional functions and variables. Applications which evaluate expressions using these extensions will not necessarily be portable to other implementations of the DOM Level 3 XPath Module.

1.3. Konformität

Dieser Abschnitt erklärt die Übereinstimmung zum DOM-Level-3-XPath-Modul.

Eine DOM-Implementierung muss auf hasFeature("xpath", "3.0") nicht logisch wahr {true} zurückgeben, außer die Implementierung ist konform zu diesem Modul. So wie in [DOM Level 3 Core] dokumentiert ist: wenn ein null-Wert oder eine leere Zeichenkette für den zweiten Parameter gesetzt ist, dann ist noch Konformität zu einer Version des DOM-XPath-Moduls erforderlich, oder logisch unwahr {false} wird zurückgegeben.

Eine konforme Implemtierung besteht nur, wenn DOM Level 3 XPath alle Schnittstellen unterstützt, die in dieser Spezifikation spezifiziert sind. Zusätzlich zur Implementierung der Schnittstelle im DOM-XPath-Modul muss eine konforme Implementierung korrekt jeden Teil der XPath-1.0-Spezifikation bei der Auswertung der Ausdrücke einschließlich der Lokalisierungspfade, der Ausdrücke, die Kern-Funktionsbibliothek, und die Überführung {mapping} zwischen DOM und dem XPath-1.0-Datenmodell, wie im DOM-Level-3-XPath-Modul beschrieben, implementieren. Die XPath-id()-Funktion muss das entsprechende {corresponding} Element zurückgeben, jedes andere {muss} von der DOM-Methode Document.getElementById {zurück gegeben werden}.

Nach dem Zutreffen der Erfordernisse zur Konformität darf eine konforme Implementierung zusätzlich Funktionen und Variablen implementieren. Anwendungen, die Ausdrücke entsprechend diesen Erweiterungen auswerten, werden nicht notwendigerweise portabel zu einer anderen Implementierung der DOM-Level-3-XPath-Module sein.

1.4. Interfaces

An implementation is DOM Level 3 XPath conformant if it supports the Core module defined in [DOM Level 2 Core] and the module defined in this specification. An implementation conforms to a DOM module if it supports all the interfaces for that module and the associated semantics.

A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "XPath" and "3.0" (respectively) to determine whether or not the XPath module is supported by the implementation. In order to fully support this module, an implementation must also support the "Core" feature defined in the DOM Level 2 Core specification [DOM Level 2 Core].

A DOM implementation must not return true to the hasFeature(feature, version) method of the DOMImplementation interface for that feature unless the implementation conforms to that module. The version number for the feature used in this document is "3.0".

1.4. Schnittstellen

Eine Implementierung ist DOM-Level-3-XPath-konform, wenn sie die Kernmodule, die in [DOM Level 2 Core] definiert sind, sowie das Modul unterstützt, das in dieser Spezifikation beschrieben ist. Eine Implementierung ist konform zu einem DOM-Modul, wenn sie alle Schnittstellen dieses Moduls und alle damit verbundenen Bedeutungen unterstützt.

Eine DOM-Anwendung {DOM application} kann die Methode hasFeature(feature, version) der DOMImplementation-Schnittstelle mit den Parameterwerten "XPath" und "3.0" (beziehungsweise) verwenden um festzustellen, ob oder ob nicht das XPath-Modul von der Implementierung unterstützt wird. Gehörig zur {in order to} vollen Unterstützung dieses Moduls muss eine Implementierung außerdem die "Core"-Eigenschaften unterstützen, die in der DOM-Level-2-Core-Spezifikation [DOM Level 2 Core] definiert sind.

Eine DOM-Implementierung muss nicht den Wert logisch wahr {true} der Methode hasFeature(feature, version) für die betreffende Eigenschaft {feature} zurückgeben, es sei denn, die Implementierung ist konform zu diesem Modul. Die Versionsnummer für eine Eigenschaft die in diesem Dokument vorkommt, ist "3.0".

Exception XPathException

A new exception has been created for exceptions specific to these XPath interfaces.


IDL Definition
exception XPathException {
  unsigned short   code;
};
// XPathExceptionCode
const unsigned short      INVALID_EXPRESSION_ERR         = 51;
const unsigned short      TYPE_ERR                       = 52;

Definition group XPathExceptionCode
Defined Constants
INVALID_EXPRESSION_ERR
If the expression has a syntax error or otherwise is not a legal expression according to the rules of the specific XPathEvaluator or contains specialized extension functions or variables not supported by this implementation.
TYPE_ERR
If the expression cannot be converted to return the specified type.
Ausnahme {Exception} XPathException

Eine neue Ausnahme {exception} wurde den Ausnahmen speziell dieser XPath-Schnittstelle hinzugefügt.


IDL Definition
exception XPathException {
  unsigned short   code;
};
// XPathExceptionCode
const unsigned short      INVALID_EXPRESSION_ERR         = 51;
const unsigned short      TYPE_ERR                       = 52;

Definitionsgruppe {definition group} XPathExceptionCode
Definierte Konstanten
INVALID_EXPRESSION_ERR
{Trifft zu} wenn die Ausnahme {einerseits} einen Syntaxfehler hat oder andererseits keinen gültigen Ausdruck entsprechend dem spezifischen XPathEvaluator enthält oder spezielle Erweiterungsfunktionen oder Variablen hat, die von dieser Implementierung nicht unterstützt werden.
TYPE_ERR
{Trifft zu} wenn der Ausdruck nicht zur Rückgabe des angegebenen Typs konvertiert werden kann.
Interface XPathEvaluator

The evaluation of XPath expressions is provided by XPathEvaluator. In a DOM implementation which supports the XPath 3.0 feature, as described above, the XPathEvaluator interface will be implemented on the same object which implements the Document interface permitting it to be obtained by the usual binding-specific method such as casting or by using the DOM Level 3 getInterface method. In this case the implementation obtained from the Document supports the XPath DOM module and is compatible with the XPath 1.0 specification.

Evaluation of expressions with specialized extension functions or variables may not work in all implementations and is, therefore, not portable. XPathEvaluator implementations may be available from other sources that could provide specific support for specialized extension functions or variables as would be defined by other specifications.


IDL Definition
interface XPathEvaluator {
  XPathExpression    createExpression(in DOMString expression,
                                      in XPathNSResolver resolver)
                                        raises(XPathException,
                                               DOMException);
  XPathNSResolver    createNSResolver(in Node nodeResolver);
  DOMObject          evaluate(in DOMString expression,
                              in Node contextNode,
                              in XPathNSResolver resolver,
                              in unsigned short type,
                              in DOMObject result)
                                        raises(XPathException,
                                               DOMException);
};

Methods
createExpression
Creates a parsed XPath expression with resolved namespaces. This is useful when an expression will be reused in an application since it makes it possible to compile the expression string into a more efficient internal form and preresolve all namespace prefixes which occur within the expression.
Parameters
expression of type DOMString
The XPath expression string to be parsed.
resolver of type XPathNSResolver
The resolver permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs. If this is specified as null, any namespace prefix within the expression will result in DOMException being thrown with the code NAMESPACE_ERR.
Return Value

XPathExpression

The compiled form of the XPath expression.

Exceptions

XPathException

INVALID_EXPRESSION_ERR: Raised if the expression is not legal according to the rules of the XPathEvaluator.

DOMException

NAMESPACE_ERR: Raised if the expression contains namespace prefixes which cannot be resolved by the specified XPathNSResolver.

createNSResolver
Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document. This adapter works like the DOM Level 3 method lookupNamespaceURI on nodes in resolving the namespaceURI from a given prefix using the current information available in the node's hierarchy at the time lookupNamespaceURI is called. also correctly resolving the implicit xml prefix.
Parameters
nodeResolver of type Node
The node to be used as a context for namespace resolution.
Return Value

XPathNSResolver

XPathNSResolver which resolves namespaces with respect to the definitions in scope for a specified node.

No Exceptions
evaluate
Evaluates an XPath expression string and returns a result of the specified type if possible.
Parameters
expression of type DOMString
The XPath expression string to be parsed and evaluated.
contextNode of type Node
The context is context node for the evaluation of this XPath expression. If the XPathEvaluator was obtained by casting the Document then this must be owned by the same document and must be a Document, Element, Attribute, Text, CDATASection, Comment, ProcessingInstruction, or XPathNamespace node. If the context node is a Text or a CDATASection, then the context is interpreted as the whole logical text node as seen by XPath, unless the node is empty in which case it may not serve as the XPath context.
resolver of type XPathNSResolver
The resolver permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs. If this is specified as null, any namespace prefix within the expression will result in DOMException being thrown with the code NAMESPACE_ERR.
type of type unsigned short
If a specific type is specified, then the result will be returned as the corresponding type.
For XPath 1.0 results, this must be one of the codes of the XPathResult interface.
result of type DOMObject
The result specifies a specific result object which may be reused and returned by this method. If this is specified as nullor the implementation does not reuse the specified result, a new result object will be constructed and returned.
For XPath 1.0 results, this object will be of type XPathResult.
Return Value

DOMObject

The result of the evaluation of the XPath expression.
For XPath 1.0 results, this object will be of type XPathResult.

Exceptions

XPathException

INVALID_EXPRESSION_ERR: Raised if the expression is not legal according to the rules of the XPathEvaluatori

TYPE_ERR: Raised if the result cannot be converted to return the specified type.

DOMException

NAMESPACE_ERR: Raised if the expression contains namespace prefixes which cannot be resolved by the specified XPathNSResolver.

WRONG_DOCUMENT_ERR: The Node is from a document that is not supported by this XPathEvaluator.

NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath context node or the request type is not permitted by this XPathEvaluator.

Schnittstelle {interface} XPathEvaluator

Die Auswertung von XPath-Ausdrücken wird bereitgestellt von XPathEvaluator. In einer DOM-Implementierung, die die XPath 3.0-Funktionalität {feature} so wie oben beschrieben unterstützt, wird die XPathEvaluator-Schnittstelle im selben Objekt implementiert, in der die Document-Schnittstelle implementiert ist, die es ermöglicht, gesetzt durch übliche bindungsspezifische Methoden wie Typwandlung {casting} oder durch die getInterface-Methode des DOM Level 3 zu wirken. In diesem Fall entspricht die Implementierung erwirkt vom Dokument dem XPath-DOM-Modul und ist kompatibel mit der Spezifikation zu XPath 1.0.

Die Auswertung von Ausdrücken mit spezialisierten Erweiterungsfunktionen oder Variablen kann möglicherweise nicht in allen Implementierungen funktionieren und ist demzufolge nicht portabel. XPathEvaluator-Implementierungen können eventuell von anderen Quellen vorfügbar sein, die spezifische Unterstützung für spezialisierte Erweiterungsfunktionen bereitstellen könnten.


IDL Definition
interface XPathEvaluator {
  XPathExpression    createExpression(in DOMString expression,
                                      in XPathNSResolver resolver)
                                        raises(XPathException,
                                               DOMException);
  XPathNSResolver    createNSResolver(in Node nodeResolver);
  DOMObject          evaluate(in DOMString expression,
                              in Node contextNode,
                              in XPathNSResolver resolver,
                              in unsigned short type,
                              in DOMObject result)
                                        raises(XPathException,
                                               DOMException);
};

Methoden
createExpression
Erzeugt einen geparsten XPath-Ausdruck mit aufgelösten Namensräumen. Das ist günstig, wenn ein Ausdruck in einer Anwendung wiederverwendet wird, weil dies es möglich macht, die Ausdruckszeichenkette in eine effizientere interne Form zu übersetzen unter Berücksichtigung aller Namensraum-Präfixe {namespace prefixes}, die innerhalb des Ausdrucks auftreten.
Parameter
expression vom Typ DOMString
Die Zeichenkette des XPath-Ausdrucks, die zu parsen ist.
resolver vom Typ XPathNSResolver
Der {Parameter} resolver ermöglicht die Übersetzung von allen Präfixen, einschließlich xml-Namenraum-Präfixen inmitten von XPath-Ausdrücken in die passenden Namensraum-URIs {namespace URIs}. Ist dafür null angegeben, so führt jeder Namensraum-Präfix {namespace prefix} mitten im Ausdruck zu DOMException mit dem Kode NAMESPACE_ERR.
Rückgabewert {Return Value}

XPathExpression

Die übersetzte Form des XPath-Ausdrucks.

Ausnahmen {Exceptions}

XPathException

INVALID_EXPRESSION_ERR: Wird gesetzt, falls der Ausdruck gemäß den Regeln von XPathEvaluator ungültig ist.

DOMException

NAMESPACE_ERR: Wird gesetzt, falls der Ausdruck Namesraum-Präfixe {namespace prefixes} enthält, die nicht vom angegebenen XPathNSResolver erkannt werden können.

createNSResolver
Passt jeden möglichen DOM-Knoten zum Erkennen von Namensräumen so an, dass ein XPath-Ausdruck relativ zum Knotenkontext leicht ausgewertet werden kann, der sich inmitten des Dokuments befindet. Der Adapter arbeitet wie die Methode lookupNamespaceURI im DOM Level 3 auf Knoten in Erkennung des Namensraum-URI von einem gegebenen Präfix mit den aktuellen Informationen die in der Knotenhierarchie vorhanden sind, im Moment des Aufrufs von lookupNamespaceURI, also dem richtigen Erkennen des impliziten xml-Präfixes.
Parameter
nodeResolver von Typ Node
Der Knoten, der als Kontext bei der Namensraumerkennung fungiert.
Rückgabewert

XPathNSResolver

XPathNSResolver erkennt Namensräume in Bezug auf die Definitionen im Bereich eines angegebenen Knotens.

Keine Ausnahmen {No Exceptions}
evaluate
Wertet die Zeichenkette des XPath-Ausdrucks aus und gibt ein Ergebnis mit dem angegebenem Typ zurück, sofern möglich.
Parameter
Ausdruck {expression} vom Typ DOMString
Die XPath-Audrucks-Zeichenkette, die zu parsen und zu bewerten ist.
contextNode vom Typ Node
Der Kontext {context} ist der Kontextknoten zur Auswertung dieses XPath-Ausdrucks. Wenn der XPathEvaluator gesetzt wurde {was obtained} durch Verarbeitung {by casting} von Document, dann muss dieser {Kontextknoten} zum gleichen Dokument gehören und muss ein Document-, Element-, Attribute-, Text-, CDATASection-, Comment-, ProcessingInstruction-, oder ein XPathNamespace-Knoten sein. Ist der Kontextknoten ein Text- oder ein CDATASection-Knoten, dann wird der Kontext interpretiert als der gesamte logische Textknoten wie von XPath gesehen; außer der Knoten ist leer, in diesem Fall kann er nicht als ein XPath-Kontext gelten.
resolver vom Typ XPathNSResolver
Der {Parameter} resolver ermöglicht die Übersetzung von allen Präfixen, einschließlich xml-Namenraum-Präfixen inmitten von XPath-Ausdrücken in die passenden Namensraum-URIs {namespace URIs}. Ist dafür null angegeben, so führt jeder Namensraum-Präfix {namespace prefix} mitten im Ausdruck zu DOMException mit dem Kode NAMESPACE_ERR.
type vom Typ unsigned short
Wenn ein bestimmter type angegeben ist, dann wird das Ergebnis mit dem entsprechenden Typ zurückgegeben.
Bei Resultaten in XPath 1.0 muss dies einer der Kodes der XPathResult-Schnittstelle sein.
result vom Typ DOMObject
result gibt ein bestimmtes Ergebnisobjekt an welches wiederverwendet werden kann und von dieser Methode zurückgegeben wird. Ist {der Parameter} mit null angegeben oder die Implementierung gestattet nicht die Wiederverwendung des angegeben result-Wertes, dann wird ein neues result-Objekt erzeugt und zurückgegeben.
Beim Ergebnis in XPath 1.0 wird dieses Objekt vom Typ XPathResult sein.
Rückgabewert

DOMObject

{Dies ist} das Ergebnis der Verarbeitung des XPath-Ausdrucks.
Beim Ergebnis in XPath 1.0 wird dieses Objekt vom Typ XPathResult sein.

Ausnahmen

XPathException

INVALID_EXPRESSION_ERR: Wird gesetzt, falls der Ausdruck gemäß den Regeln von XPathEvaluator ungültig ist.

TYPE_ERR: Wird gesetzt, wenn der Ausdruck nicht zur Rückgabe des entsprechenden Typs konvertiert werden kann.

DOMException

NAMESPACE_ERR: Wird gesetzt, falls der Ausdruck Namesraum-Präfixe {namespace prefixes} enthält, die nicht vom angegebenen XPathNSResolver erkannt werden können

WRONG_DOCUMENT_ERR: {Gilt wenn} der Knoten als von einem Dokument stammend erkannt wird, das nicht von diesem XPathEvaluator unterstützt wird.

NOT_SUPPORTED_ERR: {Gilt wenn} der Knoten nicht von einem Typ ist, der als XPath-Kontextknoten gelten kann, oder der angeforderte Typ nicht von diesem XPathEvaluator zugelassen wird.

Interface XPathExpression

The XPathExpression interface represents a parsed and resolved XPath expression.


IDL Definition
interface XPathExpression {
  DOMObject          evaluate(in Node contextNode,
                              in unsigned short type,
                              in DOMObject result)
                                        raises(XPathException,
                                               DOMException);
};

Methods
evaluate
Evaluates this XPath expression and returns a result.
Parameters
contextNode of type Node
The context is context node for the evaluation of this XPath expression.
If the XPathEvaluator was obtained by casting the Document then this must be owned by the same document and must be a Document, Element, Attribute, Text, CDATASection, Comment, ProcessingInstruction, or XPathNamespace node.
If the context node is a Text or a CDATASection, then the context is interpreted as the whole logical text node as seen by XPath, unless the node is empty in which case it may not serve as the XPath context.
type of type unsigned short
If a specific type is specified, then the result will be coerced to return the specified type relying on XPath conversions and fail if the desired coercion is not possible. This must be one of the type codes of XPathResult.
result of type DOMObject
The result specifies a specific result object which may be reused and returned by this method. If this is specified as nullor the implementation does not reuse the specified result, a new result object will be constructed and returned.
For XPath 1.0 results, this object will be of type XPathResult.
Return Value

DOMObject

The result of the evaluation of the XPath expression.
For XPath 1.0 results, this object will be of type XPathResult.

Exceptions

XPathException

TYPE_ERR: Raised if the result cannot be converted to return the specified type.

DOMException

WRONG_DOCUMENT_ERR: The Node is from a document that is not supported by the XPathEvaluator that created this XPathExpression.

NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath context node or the request type is not permitted by this XPathExpression.

Schnittstelle XPathExpression

Die XPathExpression-Schnittstelle repräsentiert einen geparsten und endverarbeiteten {resolved} XPath-Ausdruck.


IDL Definition
interface XPathExpression {
  DOMObject          evaluate(in Node contextNode,
                              in unsigned short type,
                              in DOMObject result)
                                        raises(XPathException,
                                               DOMException);
};

Methoden
evaluate
Wertet diesen XPath-Ausdruck aus und gibt ein Ergebnis zurück.
Parameter
contextNode vom Typ Node
Der Kontext {context} ist der Kontextknoten zur Auswertung dieses XPath-Ausdrucks.
Wenn der XPathEvaluator gesetzt wurde {was obtained} durch Verarbeitung {by casting} von Document, dann muss dieser {Kontextknoten} zum gleichen Dokument gehören und muss ein Document-, Element-, Attribute-, Text-, CDATASection-, Comment-, ProcessingInstruction-, oder ein XPathNamespace-Knoten sein.
Ist der Kontextknoten ein Text- oder ein CDATASection-Knoten, dann wird der Kontext interpretiert als der gesamte logische Textknoten wie von XPath gesehen; außer der Knoten ist leer, in diesem Fall kann er nicht als ein XPath-Kontext gelten.
type vom Typ unsigned short
Wenn ein bestimmter type angegeben ist, dann wird das Resultat gezwungenermaßen den angegeben type beruhend auf XPath-Konvertierungen zurückzugeben; oder schief gehen {fail}, wenn die gewünschte Zwangsumwandlung nicht möglich ist.
Dieser {Parameter} muss einer der Typkodes der XPathResult-Schnittstelle sein.
result vom Typ DOMObject
result spezifiziert ein bestimmtes Ergebnisobjekt welches wiederverwendet werden kann und von dieser Methode zurückgegeben wird. Ist {der Wert} null angegeben oder die Implementierung gestattet nicht die Wiederverwendung des angegebenen result-Wertes, dann wird ein neues result-Objekt erzeugt und zurückgegeben. Bei Ergebnissen in XPath 1.0 wird dieses Objekt vom Typ XPathResult sein.
Rückgabewert

DOMObject

{Das ist} das Ergebnis der Verarbeitung des XPath-Ausdrucks.
Bei Ergebnissen in XPath 1.0 gilt, dass dieses Objekt vom Typ XPathResult ist.

Ausnahmen

XPathException

TYPE_ERR: Wird gesetzt, wenn der Ausdruck nicht zur Rückgabe des angegebenen Typs konvertiert werden kann.

DOMException

WRONG_DOCUMENT_ERR: Der Knoten wird als von einem Dokument stammend erkannt, das nicht vom XPathEvaluator unterstützt wird der diesen XPathExpression erzeugt hat.

NOT_SUPPORTED_ERR: Der Knoten ist nicht von einem Typ, der als XPath-Kontextknoten gelten kann, oder der angeforderte Typ ist nicht für diesen XPathExpression zugelassen.

Interface XPathNSResolver

The XPathNSResolver interface permit prefix strings in the expression to be properly bound to namespaceURI strings. XPathEvaluator can construct an implementation of XPathNSResolver from a node, or the interface may be implemented by any application.


IDL Definition
interface XPathNSResolver {
  DOMString          lookupNamespaceURI(in DOMString prefix);
};

Methods
lookupNamespaceURI
Look up the namespace URI associated to the given namespace prefix. The XPath evaluator must never call this with a null or empty argument, because the result of doing this is undefined.
Parameters
prefix of type DOMString
The prefix to look for.
Return Value

DOMString

Returns the associated namespace URI or null if none is found.

No Exceptions
Schnittstelle XPathNSResolver

Die XPathNSResolver-Schnittstelle erlaubt prefix-Zeichenketten im Ausdruck vollständig mit den namespaceURI-Zeichenketten zu verbinden. XPathEvaluator kann die Implementierung eines XPathNSResolver von einem Knoten erzeugen, oder die Schnittstelle wurde von irgendeiner Anwendung {bereits} implementiert.


IDL Definition
interface XPathNSResolver {
  DOMString          lookupNamespaceURI(in DOMString prefix);
};

Methoden
lookupNamespaceURI
Aktualisiert {look up} den Namensraum-URI {namespace URI} der zum gegebenen Namensraum-Präfix {namespace prefix} gehört. Der XPath-Evaluator darf niemals diese {Methode} mit {dem Wert} null oder einem leeren Argument aufrufen, weil dann das Ergebnis undefiniert ist.
Parameter
prefix vom Typ DOMString
Der Präfix {für den der Namensraum-URI} zu aktualisieren ist.
Rückgabewert

DOMString

Gibt den entsprechenden Namensnsraum-URI {namespace URI} oder {den Wert} null zurück, wenn nichts {kein Namenraum-URI} gefunden wurde.

Keine Ausnahmen
Interface XPathResult

The XPathResult interface represents the result of the evaluation of an XPath 1.0 expression within the context of a particular node. Since evaluation of an XPath expression can result in various result types, this object makes it possible to discover and manipulate the type and value of the result.


IDL Definition
interface XPathResult {

  // XPathResultType
  const unsigned short      ANY_TYPE                       = 0;
  const unsigned short      NUMBER_TYPE                    = 1;
  const unsigned short      STRING_TYPE                    = 2;
  const unsigned short      BOOLEAN_TYPE                   = 3;
  const unsigned short      UNORDERED_NODE_ITERATOR_TYPE   = 4;
  const unsigned short      ORDERED_NODE_ITERATOR_TYPE     = 5;
  const unsigned short      UNORDERED_NODE_SNAPSHOT_TYPE   = 6;
  const unsigned short      ORDERED_NODE_SNAPSHOT_TYPE     = 7;
  const unsigned short      ANY_UNORDERED_NODE_TYPE        = 8;
  const unsigned short      FIRST_ORDERED_NODE_TYPE        = 9;

  readonly attribute unsigned short  resultType;
  readonly attribute double          numberValue;
                                        // raises(XPathException) on retrieval

  readonly attribute DOMString       stringValue;
                                        // raises(XPathException) on retrieval

  readonly attribute boolean         booleanValue;
                                        // raises(XPathException) on retrieval

  readonly attribute Node            singleNodeValue;
                                        // raises(XPathException) on retrieval

  readonly attribute boolean         invalidIteratorState;
  readonly attribute unsigned long   snapshotLength;
                                        // raises(XPathException) on retrieval

  Node               iterateNext()
                                        raises(XPathException,
                                               DOMException);
  Node               snapshotItem(in unsigned long index)
                                        raises(XPathException);
};

Definition group XPathResultType

An integer indicating what type of result this is.

If a specific type is specified, then the result will be returned as the corresponding type, using XPath type conversions where required and possible.

Defined Constants
ANY_TYPE
This code does not represent a specific type. An evaluation of an XPath expression will never produce this type. If this type is requested, then the evaluation returns whatever type naturally results from evaluation of the expression.
If the natural result is a node set when ANY_TYPE was requested, then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. Any other representation of a node set must be explicitly requested.
ANY_UNORDERED_NODE_TYPE
The result is a node set as defined by [XPath 1.0] and will be accessed as a single node, which may be nullif the node set is empty. Document modification does not invalidate the node, but may mean that the result node no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once any node in the resulting set has been found.
If there is more than one node in the actual result, the single node returned might not be the first in document order.
BOOLEAN_TYPE
The result is a boolean as defined by [XPath 1.0]. Document modification does not invalidate the boolean, but may mean that reevaluation would not yield the same boolean.
FIRST_ORDERED_NODE_TYPE
The result is a node set as defined by [XPath 1.0] and will be accessed as a single node, which may be null if the node set is empty. Document modification does not invalidate the node, but may mean that the result node no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once the first node in document order of the resulting set has been found.
If there are more than one node in the actual result, the single node returned will be the first in document order.
NUMBER_TYPE
The result is a number as defined by [XPath 1.0]. Document modification does not invalidate the number, but may mean that reevaluation would not yield the same number.
ORDERED_NODE_ITERATOR_TYPE
The result is a node set as defined by [XPath 1.0] that will be accessed iteratively, which will produce document-ordered nodes. Document modification invalidates the iteration.
ORDERED_NODE_SNAPSHOT_TYPE
The result is a node set as defined by [XPath 1.0] that will be accessed as a snapshot list of nodes that will be in original document order. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and nodes in the snapshot may have been altered, moved, or removed from the document.
STRING_TYPE
The result is a string as defined by [XPath 1.0]. Document modification does not invalidate the string, but may mean that the string no longer corresponds to the current document.
UNORDERED_NODE_ITERATOR_TYPE
The result is a node set as defined by [XPath 1.0] that will be accessed iteratively, which may not produce nodes in a particular order. Document modification invalidates the iteration.
This is the default type returned if the result is a node set and ANY_TYPE is requested.
UNORDERED_NODE_SNAPSHOT_TYPE
The result is a node set as defined by [XPath 1.0] that will be accessed as a snapshot list of nodes that may not be in a particular order. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and nodes in the snapshot may have been altered, moved, or removed from the document.
Attributes
booleanValue of type boolean, readonly
The value of this boolean result.
Exceptions on retrieval

XPathException

TYPE_ERR: raised if resultType is not BOOLEAN_TYPE.

invalidIteratorState of type boolean, readonly
Signifies that the iterator has become invalid. True if resultType is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE and the document has been modified since this result was returned.
numberValue of type double, readonly
The value of this number result. If the native double type of the DOM binding does not directly support the exact IEEE 754 result of the XPath expression, then it is up to the definition of the binding to specify how the XPath number is converted to the native binding number.
Exceptions on retrieval

XPathException

TYPE_ERR: raised if resultType is not NUMBER_TYPE.

resultType of type unsigned short, readonly
A code representing the type of this result, as defined by the type constants.
singleNodeValue of type Node, readonly
The value of this single node result, which may be null.
Exceptions on retrieval

XPathException

TYPE_ERR: raised if resultType is not ANY_UNORDERED_NODE_TYPE or FIRST_ORDERED_NODE_TYPE.

snapshotLength of type unsigned long, readonly
The number of nodes in the result snapshot. Valid values for snapshotItem indices are 0 to snapshotLength-1 inclusive.
Exceptions on retrieval

XPathException

TYPE_ERR: raised if resultType is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE.

stringValue of type DOMString, readonly
The value of this string result.
Exceptions on retrieval

XPathException

TYPE_ERR: raised if resultType is not STRING_TYPE.

Methods
iterateNext
Iterates and returns the next node from the node set or nullif there are no more nodes.
Return Value

Node

Returns the next node.

Exceptions

XPathException

TYPE_ERR: raised if resultType is not UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE.

DOMException

INVALID_STATE_ERR: The document has been mutated since the result was returned.

No Parameters
snapshotItem
Returns the indexth item in the snapshot collection. If index is greater than or equal to the number of nodes in the list, this method returns null. Unlike the iterator result, the snapshot does not become invalid, but may not correspond to the current document if it is mutated.
Parameters
index of type unsigned long
Index into the snapshot collection.
Return Value

Node

The node at the indexth position in the NodeList, or null if that is not a valid index.

Exceptions

XPathException

TYPE_ERR: raised if resultType is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE.

Schnittstelle XPathResult

Die XPathResult-Schnittstelle repräsentiert das Ergebnis der Auswertung {evaluation} eines Ausdrucks in XPath 1.0 inmitten des Kontextsets eines einzelnen {particular} Knotens. Nach {Since} der Auswertung eines XPath-Ausdrucks kann das Ergebnis in verschiedenen Typen vorliegen, dieses Objekt macht es möglich Typ und Wert des Ergebnisses zu erkennen {discover} und zu manipulieren.


IDL Definition
interface XPathResult {

  // XPathResultType
  const unsigned short      ANY_TYPE                       = 0;
  const unsigned short      NUMBER_TYPE                    = 1;
  const unsigned short      STRING_TYPE                    = 2;
  const unsigned short      BOOLEAN_TYPE                   = 3;
  const unsigned short      UNORDERED_NODE_ITERATOR_TYPE   = 4;
  const unsigned short      ORDERED_NODE_ITERATOR_TYPE     = 5;
  const unsigned short      UNORDERED_NODE_SNAPSHOT_TYPE   = 6;
  const unsigned short      ORDERED_NODE_SNAPSHOT_TYPE     = 7;
  const unsigned short      ANY_UNORDERED_NODE_TYPE        = 8;
  const unsigned short      FIRST_ORDERED_NODE_TYPE        = 9;

  readonly attribute unsigned short  resultType;
  readonly attribute double          numberValue;
                                        // raises(XPathException) on retrieval

  readonly attribute DOMString       stringValue;
                                        // raises(XPathException) on retrieval

  readonly attribute boolean         booleanValue;
                                        // raises(XPathException) on retrieval

  readonly attribute Node            singleNodeValue;
                                        // raises(XPathException) on retrieval

  readonly attribute boolean         invalidIteratorState;
  readonly attribute unsigned long   snapshotLength;
                                        // raises(XPathException) on retrieval

  Node               iterateNext()
                                        raises(XPathException,
                                               DOMException);
  Node               snapshotItem(in unsigned long index)
                                        raises(XPathException);
};

Definitionsgruppe {definition group} XPathResultType

Eine Ganzzahl zeigt den Typ des Ergebnisses an.

Wenn ein bestimmter Typ {type} angegeben ist, dann wird das Ergebnis als entsprechender Typ zurückgegeben unter Verwendung der XPath-Typkonvertierung {XPath type conversions}, die erforderlich und möglich ist.

Vordefinierte Konstanten
ANY_TYPE
Dieser Kodewert repräsentiert keinen bestimmten Typ. Die Auswertung eines XPath-Ausdrucks wird niemals diesen Typ erzeugen. Wird dieser Typwert angefordert, dann gibt die Auswertung das Ergebnis mit dem Typ zurück, der normalerweise {naturally} von der Auswertung des Ausdrucks erzeugt wird.
Ist das normale Ergebnis ein Knotenset wenn ANY_TYPE angefordert war, dann ist immer UNORDERED_NODE_ITERATOR_TYPE der Ergebnistyp. Jede andere Repräsentation eines Knotensets muss explizit angefordert werden.
ANY_UNORDERED_NODE_TYPE
Das Ergebnis ist ein Knotenset {node set} wie es von [XPath 1.0] definiert ist, und verhält sich wie ein Einzelknoten, der null sein kann, wenn das Knotenset leer ist. Dokumentänderungen beschädigen den Knoten nicht, erwecken aber den Eindruck, dass der Ergebnisknoten nicht mehr zum aktuellen Dokument gehört. Dies ist eine Vereinfachung, die eine Optimierung erlaubt, nachdem {since} die Implementierung {bei} jeden möglichen Knoten stehenbleibt, der im Ergebnisset gefunden wurde.
Gibt es mehr als einen Knoten im aktuellen Resultat, dann muss ein zurückgegebener Einzelknoten keineswegs der Erste in der Dokumentfolge sein.
BOOLEAN_TYPE
Das Ergebnis ist vom Typ boolean wie er in [XPath 1.0] definiert ist. Eine Dokumentänderung macht {den Typ} boolean nicht ungültig, kann aber bedeuten, dass eine Aktualisierung {reevaluation} nicht denselben boolean{schen Wert} ergeben würde.
FIRST_ORDERED_NODE_TYPE
Das Ergebnis ist ein Kontenset {node set} wie es von [XPath 1.0] definiert ist, und verhält sich wie ein Einzelknoten, der null sein kann, wenn das Knotenset leer ist. Eine Dokumentänderung kann den Knoten nicht beschädigen, erweckt aber den Eindruck, dass der Ergebnisknoten nicht mehr zum aktuellen Dokument gehört. Dies ist eine Vereinfachung, die eine Optimierung erlaubt, nachdem {since} die Implementierung {bei} jeden möglichen Knoten stehenbleibt, der im Ergebnisset gefunden wurde.
Gibt es mehr als einen Knoten im aktuellen Resultat, dann muss ein zurückgegebener Einzelknoten der Erste in der Dokumentfolge sein.
NUMBER_TYPE
Das Ergebnis ist {vom Typ} number so wie in [XPath 1.0] definiert. Eine Dokumentänderung macht {den Typ} number nicht ungültig, kann aber bedeuten, dass eine Aktualisierung {reevaluation} nicht denselben numerischen Wert {number} ergeben würde.
ORDERED_NODE_ITERATOR_TYPE
Das Ergebnis ist ein Knotenset, so wie in [XPath 1.0] definiert, das iterativ entstehen und Knoten entsprechend der Dokumentfolge erzeugen kann. Eine Dokumentänderung zerstört die Iteration.
ORDERED_NODE_SNAPSHOT_TYPE
Das Ergebnis ist ein Knotenset {node set} so wie in [XPath 1.0] definiert, und das sich wie eine Snapshotliste {snapshot list} von Knoten verhält, die sich in originaler Dokumentfolge befinden. Eine Dokumentänderung beschädigt den Snapshot nicht, kann aber dazu führen, dass eine Aktualisierung {reevaluation} nicht dasselbe Snapshot ergibt, Knoten im Snapshot verändert, verschoben oder vom Dokument entfernt sein können.
STRING_TYPE
Das Ergebnis ist eine Zeichenkette {string} so wie in [XPath 1.0] definiert. Eine Dokumentänderung beschädigt die Zeichenkette {string} nicht, kann aber dazu führen, dass die Zeichenkette {string} nicht mehr mit dem aktuellen Dokument verbunden ist.
UNORDERED_NODE_ITERATOR_TYPE
Das Ergebnis ist ein Knotenset {node set} so wie in [XPath 1.0] definiert, das iterativ entstehen und Knoten in keiner bestimmten Folge erzeugen kann. Eine Dokumentänderung zerstört die Iteration.
Dies {UNORDERED_NODE_ITERATOR_TYPE} ist der Vorgabetyp der dann zurückgegeben wird, wenn das Ergebnis ein Knotenset und ANY_TYPE angefordert ist.
UNORDERED_NODE_SNAPSHOT_TYPE
Das Ergebnis ist ein entsprechend [XPath 1.0] definiertes Knotenset {node set} das als eine Snapshotliste {snapshot list} von Knoten in keiner besonderen Reihenfolge entsteht. Eine Dokumentänderung kann das Snapshot nicht beschädigen, kann aber dazu führen, dass eine Aktualisierung nicht dasselbe Snapshot ergibt und Knoten im Snapshot verändert, verschoben oder vom Dokument entfernt sein könnten.
Attribute
booleanValue ist vom Typ boolean, readonly
Der Wert dieses {Attributes} ist ein booleansches Resultat.
Ausnahmen auf Wiederherstellung

XPathException

TYPE_ERR: wird gesetzt, wenn resultType kein BOOLEAN_TYPE ist.

invalidIteratorState vom Typ boolean, readonly
Bedeutet, dass der Iterator zerstört wurde. Logisch wahr {true}, wenn resultType ein UNORDERED_NODE_ITERATOR_TYPE oder ein ORDERED_NODE_ITERATOR_TYPE ist und das Dokument seit Rückgabe dieses Resultats verändert wurde.
numberValue vom Typ double, readonly
Der Wert dieses {Attributs} ist ein numerisches Ergebnis. Wenn der der DOM-Bindung innewohnende Typ "double" nicht exakt ein IEEE 754-konformes Ergebnis des XPath-Ausdrucks unterstützt, dann liegt es an der Definition der Bindung {selbst} anzugeben, wie der numerische XPath-Typ in die native verbindliche Zahl umgewandelt wird.
Ausnahmen auf Wiederherstellung

XPathException

TYPE_ERR: wird gesetzt, wenn resultType kein NUMBER_TYPE ist.

resultType vom Typ unsigned short, readonly
Ein Kodewert repräsentiert den Typ des Ergebnisses, wie durch die Typkonstante definiert ist.
singleNodeValue vom Typ Node, readonly
Der Wert dieses {Attributs ist ein} Einzelknoten, kann auch null sein.
Ausnahmen auf Wiederherstellung

XPathException

TYPE_ERR: wird gesetzt wenn resultType weder ein ANY_UNORDERED_NODE_TYPE noch ein FIRST_ORDERED_NODE_TYPE ist.

snapshotLength vom Typ unsigned long, readonly
{Ist} die Anzahl der Knoten im Ergebnis-Snapshot. Gültige Werte für snapshotItem zählen von 0 bis snapshotLength-1 inklusive.
Ausnahmen auf Wiederherstellung

XPathException

TYPE_ERR: wird gesetzt wenn resultType weder ein UNORDERED_NODE_SNAPSHOT_TYPE noch ein ORDERED_NODE_SNAPSHOT_TYPE ist.

stringValue vom Typ DOMString, readonly
Der Wert dieses {Attributs} ist vom Typ Zeichenkette.
Ausnahmen auf Wiederherstellung

XPathException

TYPE_ERR: wird gesetzt, wenn resultType kein STRING_TYPE ist.

Methoden
iterateNext
Iteriert und gibt den nächsten Knoten vom Knotenset zurück oder null, wenn es keine weiteren Knoten gibt.
Return Value

Node

Gibt den nächsten Knoten zurück.

Ausnahmen

XPathException

TYPE_ERR: wird gesetzt, wenn resultType weder ein UNORDERED_NODE_ITERATOR_TYPE noch ein ORDERED_NODE_ITERATOR_TYPE ist.

DOMException

INVALID_STATE_ERR: Das Dokument wurde verändert seitdem das Ergebnis zurückgegeben wurde.

Keine Parameter
snapshotItem
Gibt den indexten Eintrag {indexth item} der Snapshot-Kollektion zurück. Ist index größer oder gleich der Anzahl von Knoten in der Liste, gibt diese Methode null zurück. Abweichend vom Iteratorergebnis wird der Snapshot nicht zerstört, ist aber möglicherweise nicht mehr mit dem aktuellen Dokument verbunden, wenn dieses verändert wurde.
Parameter
index vom Typ unsigned long
Der Index {im Sinne von "Zählerwert"} der Snapshot-Kollektion.
Rückgabewert

Node

Der Knoten an der indexten Stelle in der {Knotenliste} NodeList, oder null, wenn der Index ungültig ist.

Ausnahmen

XPathException

TYPE_ERR: wird gesetzt, wenn resultType weder ein UNORDERED_NODE_SNAPSHOT_TYPE noch ein ORDERED_NODE_SNAPSHOT_TYPE ist.

Interface XPathNamespace

The XPathNamespace interface is returned by XPathResult interfaces to represent the XPath namespace node type that DOM lacks. There is no public constructor for this node type. Attempts to place it into a hierarchy or a NamedNodeMap result in a DOMException with the code HIERARCHY_REQUEST_ERR. This node is read only, so methods or setting of attributes that would mutate the node result in a DOMException with the code NO_MODIFICATION_ALLOWED_ERR.

The core specification describes attributes of the Node interface that are different for different node types but does not describe XPATH_NAMESPACE_NODE, so here is a description of those attributes for this node type. All attributes of Node not described in this section have a null or false value.

ownerDocument matches the ownerDocument of the ownerElement even if the element is later adopted.

nodeName is always the string "#namespace".

prefix is the prefix of the namespace represented by the node.

localName is the same as prefix.

nodeType is equal to XPATH_NAMESPACE_NODE.

namespaceURI is the namespace URI of the namespace represented by the node.

nodeValue is the same as namespaceURI.

adoptNode, cloneNode, and importNode fail on this node type by raising a DOMException with the code NOT_SUPPORTED_ERR.

Note: In future versions of the XPath specification, the definition of a namespace node may be changed incomatibly, in which case incompatible changes to field values may be required to implement versions beyond XPath 1.0.


IDL Definition
interface XPathNamespace : Node {

  // XPathNodeType
  const unsigned short      XPATH_NAMESPACE_NODE           = 13;

  readonly attribute Element         ownerElement;
};

Definition group XPathNodeType

An integer indicating which type of node this is.

Note: There is currently only one type of node which is specific to XPath. The numbers in this list must not collide with the values assigned to core node types.

Defined Constants
XPATH_NAMESPACE_NODE
The node is a Namespace.
Attributes
ownerElement of type Element, readonly
The Element on which the namespace was in scope when it was requested. This does not change on a returned namespace node even if the document changes such that the namespace goes out of scope on that element and this node is no longer found there by XPath.
Schnittstelle XPathNamespace

Die XPathNamespace-Schnittstelle wird zurückgegeben von der XPathResult-Schnittstelle um den XPath-Namensraumknotentyp zu repräsentieren, dem DOM fehlt. Es gibt keinen öffentlichen {public} Konstruktor für diesen Knotentyp. Es wird versucht, {den Knotentyp} in die Hierarchie zu platzieren oder ein NamedNodeMap resultiert in einer DOMException mit dem Kodewert HIERARCHY_REQUEST_ERR. Dieser Knoten ist read only, so Methoden oder Einstellungen von Attributen die verändert wurden, der Knoten in eine DOMException mit dem Kodewert NO_MODIFICATION_ALLOWED_ERR resultiert.

Die Kernspezifikation {core specification} beschreibt Attribute der Node-Schnittstelle, das jedoch, unterschiedlich für verschiedene Knotentypen, beschreibt jedoch nicht XPATH_NAMESPACE_NODE, so dass es hier eine Beschreibung dieser Attribute für diesen Knotentyp gibt. Alle Attribute von Node, die nicht in diesem Abschnitt beschrieben sind, haben einen null- oder false-Wert.

ownerDocument stimmt überein mit dem ownerDocument von ownerElement auch wenn das Element später angebunden wurde.

nodeName ist immer die Zeichenkette "#namespace".

prefix ist der Präfix des Namensraums repräsentiert durch den Knoten.

localName ist dasselbe wie prefix.

nodeType ist gleich zu XPATH_NAMESPACE_NODE.

namespaceURI ist der Namensraum-URI des Namensraums repräsentiert durch den Knoten.

nodeValue ist dasselbe wie namespaceURI.

adoptNode, cloneNode, und importNode funktionieren nicht bei diesem Knoten wobei DOMException mit dem Kodewert NOT_SUPPORTED_ERR gesetzt wird.

Hinweis: In zukünftigen Versionen der XPath-Spezifikation kann die Definition eines Namensraumknotens inkompatibel verändert werden, in diesem Fall können inkompatible Veränderungen an den Feldwerten erforderlich werden um Versionen über XPath 1.0 hinaus zu implementieren.


IDL Definition
interface XPathNamespace : Node {

  // XPathNodeType
  const unsigned short      XPATH_NAMESPACE_NODE           = 13;

  readonly attribute Element         ownerElement;
};

Definitionsgruppe {definition group} XPathNodeType

Eine Ganzzahl steht für den Knotentyp.

Hinweis: Es gibt gegenwärtig nur einen Knotentyp der in XPath spezifisch ist. Die Anzahl in dieser Liste muss nicht mit den Werten kollidieren, die mit den Core-Knotentypen verbunden sind.

Vordefinierte Konstanten
XPATH_NAMESPACE_NODE
Der Knoten ist vom Typ Namespace.
Attribute
ownerElement vom Typ Element, readonly
{Das ist} das Element, an dem der Namensraum sichtbar war als es angefordert wurde. Dies bewirkt keine Veränderung an einem zurückgegebenen Namensraumknoten auch wenn das Dokument so verändert wird, dass der Namensraum aus dem Bereich dieses element-Knotens verschwindet und der Knoten nicht mehr von XPath gefunden wird.

31 March 2003

Appendix A: IDL Definitions

This appendix contains the complete OMG IDL [OMG IDL] for the Level 3 Document Object Model XPath definitions.

The IDL files are also available as: http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/idl.zip

xpath.idl:

// File: xpath.idl

#ifndef _XPATH_IDL_
#define _XPATH_IDL_

#include "dom.idl"

#pragma prefix "dom.w3c.org"
module xpath
{

  typedef dom::DOMString DOMString;
  typedef dom::Node Node;
  typedef dom::DOMObject DOMObject;
  typedef dom::Element Element;

  interface XPathNSResolver;
  interface XPathExpression;

  exception XPathException {
    unsigned short   code;
  };
  // XPathExceptionCode
  const unsigned short      INVALID_EXPRESSION_ERR         = 51;
  const unsigned short      TYPE_ERR                       = 52;


  interface XPathEvaluator {
    XPathExpression    createExpression(in DOMString expression,
                                        in XPathNSResolver resolver)
                                        raises(XPathException,
                                               dom::DOMException);
    XPathNSResolver    createNSResolver(in Node nodeResolver);
    DOMObject          evaluate(in DOMString expression,
                                in Node contextNode,
                                in XPathNSResolver resolver,
                                in unsigned short type,
                                in DOMObject result)
                                        raises(XPathException,
                                               dom::DOMException);
  };

  interface XPathExpression {
    DOMObject          evaluate(in Node contextNode,
                                in unsigned short type,
                                in DOMObject result)
                                        raises(XPathException,
                                               dom::DOMException);
  };

  interface XPathNSResolver {
    DOMString          lookupNamespaceURI(in DOMString prefix);
  };

  interface XPathResult {

    // XPathResultType
    const unsigned short      ANY_TYPE                       = 0;
    const unsigned short      NUMBER_TYPE                    = 1;
    const unsigned short      STRING_TYPE                    = 2;
    const unsigned short      BOOLEAN_TYPE                   = 3;
    const unsigned short      UNORDERED_NODE_ITERATOR_TYPE   = 4;
    const unsigned short      ORDERED_NODE_ITERATOR_TYPE     = 5;
    const unsigned short      UNORDERED_NODE_SNAPSHOT_TYPE   = 6;
    const unsigned short      ORDERED_NODE_SNAPSHOT_TYPE     = 7;
    const unsigned short      ANY_UNORDERED_NODE_TYPE        = 8;
    const unsigned short      FIRST_ORDERED_NODE_TYPE        = 9;

    readonly attribute unsigned short  resultType;
    readonly attribute double          numberValue;
                                        // raises(XPathException) on retrieval

    readonly attribute DOMString       stringValue;
                                        // raises(XPathException) on retrieval

    readonly attribute boolean         booleanValue;
                                        // raises(XPathException) on retrieval

    readonly attribute Node            singleNodeValue;
                                        // raises(XPathException) on retrieval

    readonly attribute boolean         invalidIteratorState;
    readonly attribute unsigned long   snapshotLength;
                                        // raises(XPathException) on retrieval

    Node               iterateNext()
                                        raises(XPathException,
                                               dom::DOMException);
    Node               snapshotItem(in unsigned long index)
                                        raises(XPathException);
  };

  interface XPathNamespace : Node {

    // XPathNodeType
    const unsigned short      XPATH_NAMESPACE_NODE           = 13;

    readonly attribute Element         ownerElement;
  };
};

#endif // _XPATH_IDL_

Anhang A: IDL Definitionen

Dieser Anhang enthält die kompletten OMG IDL [OMG IDL]-Definitionen für "Level 3 Document Object Model XPath".

Die IDL-Dateien sind auch verfügbar als: http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/idl.zip

xpath.idl:

// File: xpath.idl

#ifndef _XPATH_IDL_
#define _XPATH_IDL_

#include "dom.idl"

#pragma prefix "dom.w3c.org"
module xpath
{

  typedef dom::DOMString DOMString;
  typedef dom::Node Node;
  typedef dom::DOMObject DOMObject;
  typedef dom::Element Element;

  interface XPathNSResolver;
  interface XPathExpression;

  exception XPathException {
    unsigned short   code;
  };
  // XPathExceptionCode
  const unsigned short      INVALID_EXPRESSION_ERR         = 51;
  const unsigned short      TYPE_ERR                       = 52;


  interface XPathEvaluator {
    XPathExpression    createExpression(in DOMString expression,
                                        in XPathNSResolver resolver)
                                        raises(XPathException,
                                               dom::DOMException);
    XPathNSResolver    createNSResolver(in Node nodeResolver);
    DOMObject          evaluate(in DOMString expression,
                                in Node contextNode,
                                in XPathNSResolver resolver,
                                in unsigned short type,
                                in DOMObject result)
                                        raises(XPathException,
                                               dom::DOMException);
  };

  interface XPathExpression {
    DOMObject          evaluate(in Node contextNode,
                                in unsigned short type,
                                in DOMObject result)
                                        raises(XPathException,
                                               dom::DOMException);
  };

  interface XPathNSResolver {
    DOMString          lookupNamespaceURI(in DOMString prefix);
  };

  interface XPathResult {

    // XPathResultType
    const unsigned short      ANY_TYPE                       = 0;
    const unsigned short      NUMBER_TYPE                    = 1;
    const unsigned short      STRING_TYPE                    = 2;
    const unsigned short      BOOLEAN_TYPE                   = 3;
    const unsigned short      UNORDERED_NODE_ITERATOR_TYPE   = 4;
    const unsigned short      ORDERED_NODE_ITERATOR_TYPE     = 5;
    const unsigned short      UNORDERED_NODE_SNAPSHOT_TYPE   = 6;
    const unsigned short      ORDERED_NODE_SNAPSHOT_TYPE     = 7;
    const unsigned short      ANY_UNORDERED_NODE_TYPE        = 8;
    const unsigned short      FIRST_ORDERED_NODE_TYPE        = 9;

    readonly attribute unsigned short  resultType;
    readonly attribute double          numberValue;
                                        // raises(XPathException) on retrieval

    readonly attribute DOMString       stringValue;
                                        // raises(XPathException) on retrieval

    readonly attribute boolean         booleanValue;
                                        // raises(XPathException) on retrieval

    readonly attribute Node            singleNodeValue;
                                        // raises(XPathException) on retrieval

    readonly attribute boolean         invalidIteratorState;
    readonly attribute unsigned long   snapshotLength;
                                        // raises(XPathException) on retrieval

    Node               iterateNext()
                                        raises(XPathException,
                                               dom::DOMException);
    Node               snapshotItem(in unsigned long index)
                                        raises(XPathException);
  };

  interface XPathNamespace : Node {

    // XPathNodeType
    const unsigned short      XPATH_NAMESPACE_NODE           = 13;

    readonly attribute Element         ownerElement;
  };
};

#endif // _XPATH_IDL_

31 March 2003

Appendix B: Java Language Binding

This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Model XPath.

The Java files are also available as http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/java-binding.zip

B.1: Other XPath interfaces

org/w3c/dom/xpath/XPathException.java:

package org.w3c.dom.xpath;

public class XPathException extends RuntimeException {
    public XPathException(short code, String message) {
       super(message);
       this.code = code;
    }
    public short   code;
    // XPathExceptionCode
    public static final short INVALID_EXPRESSION_ERR    = 51;
    public static final short TYPE_ERR                  = 52;

}

org/w3c/dom/xpath/XPathEvaluator.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Node;
import org.w3c.dom.DOMException;

public interface XPathEvaluator {
    public XPathExpression createExpression(String expression,
                                            XPathNSResolver resolver)
                                            throws XPathException, DOMException;

    public XPathNSResolver createNSResolver(Node nodeResolver);

    public Object evaluate(String expression,
                           Node contextNode,
                           XPathNSResolver resolver,
                           short type,
                           Object result)
                           throws XPathException, DOMException;

}

org/w3c/dom/xpath/XPathExpression.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Node;
import org.w3c.dom.DOMException;

public interface XPathExpression {
    public Object evaluate(Node contextNode,
                           short type,
                           Object result)
                           throws XPathException, DOMException;

}

org/w3c/dom/xpath/XPathNSResolver.java:

package org.w3c.dom.xpath;

public interface XPathNSResolver {
    public String lookupNamespaceURI(String prefix);

}

org/w3c/dom/xpath/XPathResult.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Node;
import org.w3c.dom.DOMException;

public interface XPathResult {
    // XPathResultType
    public static final short ANY_TYPE                  = 0;
    public static final short NUMBER_TYPE               = 1;
    public static final short STRING_TYPE               = 2;
    public static final short BOOLEAN_TYPE              = 3;
    public static final short UNORDERED_NODE_ITERATOR_TYPE = 4;
    public static final short ORDERED_NODE_ITERATOR_TYPE = 5;
    public static final short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
    public static final short ORDERED_NODE_SNAPSHOT_TYPE = 7;
    public static final short ANY_UNORDERED_NODE_TYPE   = 8;
    public static final short FIRST_ORDERED_NODE_TYPE   = 9;

    public short getResultType();

    public double getNumberValue()
                                     throws XPathException;

    public String getStringValue()
                                     throws XPathException;

    public boolean getBooleanValue()
                                     throws XPathException;

    public Node getSingleNodeValue()
                                     throws XPathException;

    public boolean getInvalidIteratorState();

    public int getSnapshotLength()
                                     throws XPathException;

    public Node iterateNext()
                            throws XPathException, DOMException;

    public Node snapshotItem(int index)
                             throws XPathException;

}

org/w3c/dom/xpath/XPathNamespace.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

public interface XPathNamespace extends Node {
    // XPathNodeType
    public static final short XPATH_NAMESPACE_NODE      = 13;

    public Element getOwnerElement();

}

31. März 2003

Anhang B: Java-Sprachbindung

Dieser Anhang enthält die komplette Java[Java]-Sprachbindung für "Level 3 Document Object Model XPath".

Die Java-Dateien sind auch verfügbar als http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/java-binding.zip

B.1: Andere XPath-Schnittstellen

org/w3c/dom/xpath/XPathException.java:

package org.w3c.dom.xpath;

public class XPathException extends RuntimeException {
    public XPathException(short code, String message) {
       super(message);
       this.code = code;
    }
    public short   code;
    // XPathExceptionCode
    public static final short INVALID_EXPRESSION_ERR    = 51;
    public static final short TYPE_ERR                  = 52;

}

org/w3c/dom/xpath/XPathEvaluator.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Node;
import org.w3c.dom.DOMException;

public interface XPathEvaluator {
    public XPathExpression createExpression(String expression,
                                            XPathNSResolver resolver)
                                            throws XPathException, DOMException;

    public XPathNSResolver createNSResolver(Node nodeResolver);

    public Object evaluate(String expression,
                           Node contextNode,
                           XPathNSResolver resolver,
                           short type,
                           Object result)
                           throws XPathException, DOMException;

}

org/w3c/dom/xpath/XPathExpression.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Node;
import org.w3c.dom.DOMException;

public interface XPathExpression {
    public Object evaluate(Node contextNode,
                           short type,
                           Object result)
                           throws XPathException, DOMException;

}

org/w3c/dom/xpath/XPathNSResolver.java:

package org.w3c.dom.xpath;

public interface XPathNSResolver {
    public String lookupNamespaceURI(String prefix);

}

org/w3c/dom/xpath/XPathResult.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Node;
import org.w3c.dom.DOMException;

public interface XPathResult {
    // XPathResultType
    public static final short ANY_TYPE                  = 0;
    public static final short NUMBER_TYPE               = 1;
    public static final short STRING_TYPE               = 2;
    public static final short BOOLEAN_TYPE              = 3;
    public static final short UNORDERED_NODE_ITERATOR_TYPE = 4;
    public static final short ORDERED_NODE_ITERATOR_TYPE = 5;
    public static final short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
    public static final short ORDERED_NODE_SNAPSHOT_TYPE = 7;
    public static final short ANY_UNORDERED_NODE_TYPE   = 8;
    public static final short FIRST_ORDERED_NODE_TYPE   = 9;

    public short getResultType();

    public double getNumberValue()
                                     throws XPathException;

    public String getStringValue()
                                     throws XPathException;

    public boolean getBooleanValue()
                                     throws XPathException;

    public Node getSingleNodeValue()
                                     throws XPathException;

    public boolean getInvalidIteratorState();

    public int getSnapshotLength()
                                     throws XPathException;

    public Node iterateNext()
                            throws XPathException, DOMException;

    public Node snapshotItem(int index)
                             throws XPathException;

}

org/w3c/dom/xpath/XPathNamespace.java:

package org.w3c.dom.xpath;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

public interface XPathNamespace extends Node {
    // XPathNodeType
    public static final short XPATH_NAMESPACE_NODE      = 13;

    public Element getOwnerElement();

}

31 March 2003

Appendix C: ECMAScript Language Binding

This appendix contains the complete ECMAScript [ECMAScript] binding for the Level 3 Document Object Model XPath definitions.

Properties of the XPathException Constructor function:
XPathException.INVALID_EXPRESSION_ERR
The value of the constant XPathException.INVALID_EXPRESSION_ERR is 51.
XPathException.TYPE_ERR
The value of the constant XPathException.TYPE_ERR is 52.
Objects that implement the XPathException interface:
Properties of objects that implement the XPathException interface:
code
This property is a Number.
Objects that implement the XPathEvaluator interface:
Functions of objects that implement the XPathEvaluator interface:
createExpression(expression, resolver)
This function returns an object that implements the XPathExpression interface.
The expression parameter is a String.
The resolver parameter is an object that implements the XPathNSResolver interface.
This function can raise an object that implements the XPathException interface or the DOMException interface.
createNSResolver(nodeResolver)
This function returns an object that implements the XPathNSResolver interface.
The nodeResolver parameter is an object that implements the Node interface.
evaluate(expression, contextNode, resolver, type, result)
This function returns an object that implements the Object interface.
The expression parameter is a String.
The contextNode parameter is an object that implements the Node interface.
The resolver parameter is an object that implements the XPathNSResolver interface.
The type parameter is a Number.
The result parameter is an object that implements the Object interface.
This function can raise an object that implements the XPathException interface or the DOMException interface.
Objects that implement the XPathExpression interface:
Functions of objects that implement the XPathExpression interface:
evaluate(contextNode, type, result)
This function returns an object that implements the Object interface.
The contextNode parameter is an object that implements the Node interface.
The type parameter is a Number.
The result parameter is an object that implements the Object interface.
This function can raise an object that implements the XPathException interface or the DOMException interface.
Objects that implement the XPathNSResolver interface:
Functions of objects that implement the XPathNSResolver interface:
lookupNamespaceURI(prefix)
This function returns a String.
The prefix parameter is a String.
Properties of the XPathResult Constructor function:
XPathResult.ANY_TYPE
The value of the constant XPathResult.ANY_TYPE is 0.
XPathResult.NUMBER_TYPE
The value of the constant XPathResult.NUMBER_TYPE is 1.
XPathResult.STRING_TYPE
The value of the constant XPathResult.STRING_TYPE is 2.
XPathResult.BOOLEAN_TYPE
The value of the constant XPathResult.BOOLEAN_TYPE is 3.
XPathResult.UNORDERED_NODE_ITERATOR_TYPE
The value of the constant XPathResult.UNORDERED_NODE_ITERATOR_TYPE is 4.
XPathResult.ORDERED_NODE_ITERATOR_TYPE
The value of the constant XPathResult.ORDERED_NODE_ITERATOR_TYPE is 5.
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE
The value of the constant XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE is 6.
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE
The value of the constant XPathResult.ORDERED_NODE_SNAPSHOT_TYPE is 7.
XPathResult.ANY_UNORDERED_NODE_TYPE
The value of the constant XPathResult.ANY_UNORDERED_NODE_TYPE is 8.
XPathResult.FIRST_ORDERED_NODE_TYPE
The value of the constant XPathResult.FIRST_ORDERED_NODE_TYPE is 9.
Objects that implement the XPathResult interface:
Properties of objects that implement the XPathResult interface:
resultType
This read-only property is a Number.
numberValue
This read-only property is an object that implements the double interface and can raise an object that implements the XPathException interface on retrieval.
stringValue
This read-only property is a String and can raise an object that implements the XPathException interface on retrieval.
booleanValue
This read-only property is a Boolean and can raise an object that implements the XPathException interface on retrieval.
singleNodeValue
This read-only property is an object that implements the Node interface and can raise an object that implements the XPathException interface on retrieval.
invalidIteratorState
This read-only property is a Boolean.
snapshotLength
This read-only property is a Number and can raise an object that implements the XPathException interface on retrieval.
Functions of objects that implement the XPathResult interface:
iterateNext()
This function returns an object that implements the Node interface.
This function can raise an object that implements the XPathException interface or the DOMException interface.
snapshotItem(index)
This function returns an object that implements the Node interface.
The index parameter is a Number.
This function can raise an object that implements the XPathException interface.
Properties of the XPathNamespace Constructor function:
XPathNamespace.XPATH_NAMESPACE_NODE
The value of the constant XPathNamespace.XPATH_NAMESPACE_NODE is 13.
Objects that implement the XPathNamespace interface:
Objects that implement the XPathNamespace interface have all properties and functions of the Node interface as well as the properties and functions defined below.
Properties of objects that implement the XPathNamespace interface:
ownerElement
This read-only property is an object that implements the Element interface.

Note: The parameter resolver of the method XPathEvaluator.evaluate is specified as an object that implements the XPathNSResolver interface. ECMAScript users can also pass to this method a function which returns a String and takes a String parameter instead of the resolver parameter.

31. März 2003

Anhang C: ECMAScript-Sprachbindung

Dieser Anhang enthält die komplette ECMAScript [ECMAScript]-Bindung für die "Level 3 Document Object Model XPath"-Definitionen.

Eigenschaften der Konstruktorfunktion XPathException:
XPathException.INVALID_EXPRESSION_ERR
Der Wert der Konstante XPathException.INVALID_EXPRESSION_ERR ist 51.
XPathException.TYPE_ERR
Der Wert der Konstante XPathException.TYPE_ERR ist 52.
Objekte, die die XPathException-Schnittstelle implementieren:
Eigenschaften von Objekten die die XPathException-Schnittstelle implementieren:
code
Diese Eigenschaft ist vom Typ Number.
Objekte, die die XPathEvaluator-Schnittstelle implementieren:
Funktionen von Objekten, die die XPathEvaluator-Schnittstelle implementieren:
createExpression(expression, resolver)
Diese Funktion gibt ein Objekt zurück das die XPathExpression-Schnittstelle implementiert.
Der expression-Parameter ist vom Typ String.
Der resolver-Parameter ist ein Objekt das die XPathNSResolver-Schnittstelle implementiert.
Diese Funktion bringt ein Objekt hervor {can raise an object} das die XPathException-Schnittstelle oder die DOMException-Schnittstelle implementiert.
createNSResolver(nodeResolver)
Diese Funktion gibt ein Objekt zurück das die XPathNSResolver-Schnittstelle implementiert.
Der nodeResolver-Parameter ist ein Objekt das die Node-Schnittstelle implementiert.
evaluate(expression, contextNode, resolver, type, result)
Diese Funktion gibt ein Objekt zurück das die Object-Schnittstelle implementiert.
Der expression-Parameter ist vom Typ String.
Der contextNode-Parameter ist ein Objekt das die Node-Schnittstelle implementiert.
Der resolver-Parameter ist ein Objekt das die XPathNSResolver-Schnittstelle implementiert.
Der type-Parameter ist vom Typ Number.
The result-Parameter ist ein Objekt das die Object-Schnittstelle implementiert.
Diese Funktion bringt ein Objekt hervor {can raise an object} das die XPathException-Schnittstelle oder die DOMException-Schnittstelle implementiert.
Objekte, die die XPathExpression-Schnittstelle implementieren:
Funktionen von Objekten, die dieXPathExpression-Schnittstelle implementieren:
evaluate(contextNode, type, result)
Diese Funktion gibt ein Objekt zurück das die Object-Schnittstelle implementiert.
Der contextNode-Parameter ist ein Objekt das die Node-Schnittstelle implementiert.
Der type-Parameter ist vom Typ Number.
Der result-Parameter ist ein Objekt das die Object-Schnittstelle implementiert.
Diese Funktion bringt ein Objekt hervor {can raise an object} das die XPathException-Schnittstelle oder die DOMException-Schnittstelle implementiert.
Objekte, die die XPathNSResolver-Schnittstelle implementieren:
Funktionen von Objekten, die die XPathNSResolver-Schnittstelle implementieren:
lookupNamespaceURI(prefix)
Diese Funktion gibt einen {Wert vom Typ} String zurück.
Der prefix-Parameter ist vom Typ String.
Eigenschaften der XPathResult Konstruktor-Funktion:
XPathResult.ANY_TYPE
Der Wert der Konstante XPathResult.ANY_TYPE ist 0.
XPathResult.NUMBER_TYPE
Der Wert der Konstante XPathResult.NUMBER_TYPE ist 1.
XPathResult.STRING_TYPE
Der Wert der Konstante XPathResult.STRING_TYPE ist 2.
XPathResult.BOOLEAN_TYPE
Der Wert der Konstante XPathResult.BOOLEAN_TYPE ist 3.
XPathResult.UNORDERED_NODE_ITERATOR_TYPE
Der Wert der Konstante XPathResult.UNORDERED_NODE_ITERATOR_TYPE ist 4.
XPathResult.ORDERED_NODE_ITERATOR_TYPE
Der Wert der Konstante XPathResult.ORDERED_NODE_ITERATOR_TYPE ist 5.
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE
Der Wert der Konstante XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE ist 6.
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE
Der Wert der Konstante XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ist 7.
XPathResult.ANY_UNORDERED_NODE_TYPE
Der Wert der Konstante XPathResult.ANY_UNORDERED_NODE_TYPE ist 8.
XPathResult.FIRST_ORDERED_NODE_TYPE
Der Wert der Konstante XPathResult.FIRST_ORDERED_NODE_TYPE ist 9.
Objekte, die die XPathResult-Schnittstelle implementieren:
Eigenschaften von Objekten, die die XPathResult-Schnittstelle implementieren:
resultType
Diese Nur-Lese-Eigenschaft ist vom Typ Number.
numberValue
Diese Nur-Lese-Eigenschaft ist ein Objekt das die double-Schnittstelle implementiert und ein Objekt hervorbringen {can raise an object} kann, das die XPathException-Schnittstelle zur Wiederherstellung {on retrieval} implementiert.
stringValue
Diese Nur-Lese-Eigenschaft ist vom Typ String und kann ein Objekt hervorbringen {can raise an object}, das die XPathException-Schnittstelle zur Wiederherstellung {on retrieval} implementiert.
booleanValue
Diese Nur-Lese-Eigenschaft ist vom Typ Boolean und kann ein Objekt hervorbringen {can raise an object}, das die XPathException-Schnittstelle zur Wiederherstellung {on retrieval} implementiert.
singleNodeValue
Diese Nur-Lese-Eigenschaft ist ein Objekt das die Node-Schnittstelle implementieren und ein Objekt hervorbringen kann {can raise an object}, das die XPathException-Schnittstelle zur Wiederherstellung {on retrieval} implementiert.
invalidIteratorState
Diese Nur-Lese-Eigenschaft ist vom Typ Boolean.
snapshotLength
Diese Nur-Lese-Eigenschaft ist vom Typ Number und kann ein Objekt hervorbringen {can raise an object}, das die XPathException-Schnittstelle zur Wiederherstellung {on retrieval} implementiert.
Funktionen von Objekten, die die XPathResult-Schnittstelle implementieren:
iterateNext()
Diese Funktion gibt ein Objekt zurück das dieNode-Schnittstelle implementiert.
Diese Funktion bringt ein Objekt hervor {can raise an object} das die XPathException-Schnittstelle oder die DOMException-Schnittstelle implementiert.
snapshotItem(index)
Diese Funktion gibt ein Objekt zurück das die Node-Schnittstelle implementiert.
Der index-Parameter ist vom Typ Number.
Diese Funktion bringt ein Objekt hervor {can raise an object} das die XPathException-Schnittstelle implementiert.
Eigenschaften der XPathNamespace-Konstruktorfunktion:
XPathNamespace.XPATH_NAMESPACE_NODE
Der Wert der Konstante XPathNamespace.XPATH_NAMESPACE_NODE ist 13.
Objekte, die die XPathNamespace-Schnittstelle implementieren:
Objekte, die die XPathNamespace-Schnittstelle implementieren haben alle Eigenschaften und Funktionen der Node-Schnittstelle sowie die weiter unten definierten Eigenschaften und Funktionen.
Eigenschaften von Objekten, die die XPathNamespace-Schnittstelle implementieren:
ownerElement
Diese Nur-Lese-Eigenschaft ist ein Objekt das die Element-Schnittstelle implementiert.

Hinweis: Der Parameter resolver der Methode XPathEvaluator.evaluate ist angegeben als ein Objekt, das die XPathNSResolver-Schnittstelle implementiert. ECMAScript-Anwender können auch neben dieser Methode eine Funktion {verwenden}, die {einen Wert vom Typ} String zurückgibt und einen String-Parameter anstelle des resolver-Parameters verwendet.

31 March 2003

Appendix D: Acknowledgements

Many people contributed to the DOM specifications (Level 1, 2 or 3), including members of the DOM Working Group and the DOM Interest Group. We especially thank the following:

Andrew Watson (Object Management Group), Andy Heninger (IBM), Angel Diaz (IBM), Arnaud Le Hors (W3C and IBM), Ashok Malhotra (IBM and Microsoft), Ben Chang (Oracle), Bill Smith (Sun), Bill Shea (Merrill Lynch), Bob Sutor (IBM), Chris Lovett (Microsoft), Chris Wilson (Microsoft), David Brownell (Sun), David Ezell (Hewlett Packard Company), David Singer (IBM), Dimitris Dimitriadis (Improve AB and invited expert), Don Park (invited), Elena Litani (IBM), Eric Vasilik (Microsoft), Gavin Nicol (INSO), Ian Jacobs (W3C), James Clark (invited), James Davidson (Sun), Jared Sorensen (Novell), Jeroen van Rotterdam (X-Hive Corporation), Joe Kesselman (IBM), Joe Lapp (webMethods), Joe Marini (Macromedia), Johnny Stenback (Netscape/AOL), Jon Ferraiolo (Adobe), Jonathan Marsh (Microsoft), Jonathan Robie (Texcel Research and Software AG), Kim Adamson-Sharpe (SoftQuad Software Inc.), Lauren Wood (SoftQuad Software Inc., former Chair), Laurence Cable (Sun), Mark Davis (IBM), Mark Scardina (Oracle), Martin Dürst (W3C), Mary Brady (NIST), Mick Goulish (Software AG), Mike Champion (Arbortext and Software AG), Miles Sabin (Cromwell Media), Patti Lutsky (Arbortext), Paul Grosso (Arbortext), Peter Sharpe (SoftQuad Software Inc.), Phil Karlton (Netscape), Philippe Le Hégaret (W3C, W3C team contact and former Chair), Ramesh Lekshmynarayanan (Merrill Lynch), Ray Whitmer (iMall, Excite@Home, and Netscape/AOL, Chair), Rezaur Rahman (Intel), Rich Rollman (Microsoft), Rick Gessner (Netscape), Rick Jelliffe (invited), Rob Relyea (Microsoft), Scott Isaacs (Microsoft), Sharon Adler (INSO), Steve Byrne (JavaSoft), Tim Bray (invited), Tim Yu (Oracle), Tom Pixley (Netscape/AOL), Vidur Apparao (Netscape), Vinod Anupam (Lucent).

Thanks to all those who have helped to improve this specification by sending suggestions and corrections (Please, keep bugging us with your issues!).

Special thanks to the DOM Conformance Test Suites contributors: Curt Arnold, Fred Drake, Mary Brady (NIST), Rick Rivello (NIST), Robert Clary (Netscape).

D.1: Production Systems

This specification was written in XML. The HTML, OMG IDL, Java and ECMAScript bindings were all produced automatically.

Thanks to Joe English, author of cost, which was used as the basis for producing DOM Level 1. Thanks also to Gavin Nicol, who wrote the scripts which run on top of cost. Arnaud Le Hors and Philippe Le Hégaret maintained the scripts.

After DOM Level 1, we used Xerces as the basis DOM implementation and wish to thank the authors. Philippe Le Hégaret and Arnaud Le Hors wrote the Java programs which are the DOM application.

Thanks also to Jan Kärrman, author of html2ps, which we use in creating the PostScript version of the specification.

31. März 2003

Appendix D: Danksagungen

Viele Leute haben zu den DOM-Spezifikationen (Level 1, 2 oder 3) einen Beitrag einschließlich die Mitglieder der DOM-Arbeitsgruppe und der DOM-Interessengruppe geleistet. Wir danken insbesondere folgenden Personen:

Andrew Watson (Object Management Group), Andy Heninger (IBM), Angel Diaz (IBM), Arnaud Le Hors (W3C and IBM), Ashok Malhotra (IBM and Microsoft), Ben Chang (Oracle), Bill Smith (Sun), Bill Shea (Merrill Lynch), Bob Sutor (IBM), Chris Lovett (Microsoft), Chris Wilson (Microsoft), David Brownell (Sun), David Ezell (Hewlett Packard Company), David Singer (IBM), Dimitris Dimitriadis (Improve AB and invited expert), Don Park (invited), Elena Litani (IBM), Eric Vasilik (Microsoft), Gavin Nicol (INSO), Ian Jacobs (W3C), James Clark (invited), James Davidson (Sun), Jared Sorensen (Novell), Jeroen van Rotterdam (X-Hive Corporation), Joe Kesselman (IBM), Joe Lapp (webMethods), Joe Marini (Macromedia), Johnny Stenback (Netscape/AOL), Jon Ferraiolo (Adobe), Jonathan Marsh (Microsoft), Jonathan Robie (Texcel Research and Software AG), Kim Adamson-Sharpe (SoftQuad Software Inc.), Lauren Wood (SoftQuad Software Inc., former Chair), Laurence Cable (Sun), Mark Davis (IBM), Mark Scardina (Oracle), Martin Dürst (W3C), Mary Brady (NIST), Mick Goulish (Software AG), Mike Champion (Arbortext and Software AG), Miles Sabin (Cromwell Media), Patti Lutsky (Arbortext), Paul Grosso (Arbortext), Peter Sharpe (SoftQuad Software Inc.), Phil Karlton (Netscape), Philippe Le Hégaret (W3C, W3C team contact and former Chair), Ramesh Lekshmynarayanan (Merrill Lynch), Ray Whitmer (iMall, Excite@Home, and Netscape/AOL, Chair), Rezaur Rahman (Intel), Rich Rollman (Microsoft), Rick Gessner (Netscape), Rick Jelliffe (invited), Rob Relyea (Microsoft), Scott Isaacs (Microsoft), Sharon Adler (INSO), Steve Byrne (JavaSoft), Tim Bray (invited), Tim Yu (Oracle), Tom Pixley (Netscape/AOL), Vidur Apparao (Netscape), Vinod Anupam (Lucent).

Dank allen, die bei der Verbesserung der Spezifikation geholfen haben, indem sie Vorschläge und Korrekturen einreichten (Bitte halten Sie die Verbindung zu uns durch Ihre Beiträge!).

Ein spezieller Dank gilt den Personen, die die DOM Conformance Test Suites beisteuerten: Curt Arnold, Fred Drake, Mary Brady (NIST), Rick Rivello (NIST), Robert Clary (Netscape).

D.1: Produktionssysteme

Diese Spezifikation wurde in XML geschrieben. Die HTML-, OMG IDL-, Java- und ECMAScript-Bindungen wurden alle automatisch erzeugt.

Vielen Dank an Joe English, dem Autor von cost {ein Programm}, das zur Grundlage der Produktion von DOM Level 1 verwendet wurde. Dank auch an Gavin Nicol, er schrieb die Skripte, die unter cost laufen. Arnaud Le Hors and Philippe Le Hégaret pflegten die Skripte.

Nach DOM Level 1 verwendeten wir Xerces als Grundlage der DOM-Implementierung und möchten den Autoren dafür danken. Philippe Le Hégaret und Arnaud Le Hors schrieben die Java-Programme für die DOM-Anwendungen.

Vielen Dank auch an Jan Kärrman, dem Autor von html2ps, das wir zur Erzeugung der Postscript-Version dieser Spezifikation verwenden.

31 March 2003

Glossary

Editors:
Arnaud Le Hors, W3C
Robert S. Sutor, IBM Research (for DOM Level 1)

Several of the following term definitions have been borrowed or modified from similar definitions in other W3C or standards documents. See the links within the definitions for more information.

31 März 2003

Begriffsverzeichnis

Herausgeber {Editors}:
Arnaud Le Hors, W3C
Robert S. Sutor, IBM Research (für DOM Level 1)

Verschiedene der folgenden Begriffsdefinitionen wurden von anderen W3C- oder Standarddokumenten übernommen oder sind modifizierte Definitionen ursprünglich einfacherer Definitionen anderer W3C- oder Standarddokumente. Für weitere Informationen siehe die Links, die zu den Definitionen führen.

API
An API is an Application Programming Interface, a set of functions or methods used to access some functionality.
API
Ein API ist eine Anwendungsprogramm-Schnittstelle {Application Programming Interface} beziehungsweise eine Menge {set} von Funktionen und Methoden für den Zugriff auf verschiedene Funktionalitäten.
document element
There is only one document element in a Document. This element node is a child of the Document node. See Well-Formed XML Documents in XML [XML 1.0].
Dokumentelement {document element}
In einem Dokument {Document} gibt es nur ein einziges Dokumentelement. Dieser Elementknoten {element node} ist ein Kind des Dokument-Knotens. Siehe Wohlgeformte XML-Dokumente {Well-Formed XML Documents} in XML [XML 1.0].
document order
There is an ordering, document order, defined on all the nodes in the document corresponding to the order in which the first character of the XML representation of each node occurs in the XML representation of the document after expansion of general entities. Thus, the document element node will be the first node. Element nodes occur before their children. Thus, document order orders element nodes in order of the occurrence of their start-tag in the XML (after expansion of entities). The attribute nodes of an element occur after the element and before its children. The relative order of attribute nodes is implementation-dependent.
Dokumentfolge {document order}
Es gibt eine Anordnung, Dokumentfolge {document order} genannt, die für alle Knoten im Dokument definiert ist und der Reihenfolge entspricht, in der das erste Zeichen jedes Knotens in der XML-Repräsentation aller Knoten nach der allgemeinen Expansion von Entities auftritt. Also, der Dokumentelement {document element}-Knoten ist immer der erste Knoten. Elementknoten treten vor ihren Kindern auf. Die Dokumentfolge ordnet so Elementknoten entsprechend der Folge des Auftretens ihres Start-Tags in XML ein (nach der Expansion von Entities). Attributknoten eines Elements kommen nach dem Element, aber vor dessen Kindern vor. Die relative Anordnung der Attributknoten {untereinander} ist implementierungsabhängig.
element
Each document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements by an empty-element tag. Each element has a type, identified by name, and may have a set of attributes. Each attribute has a name and a value. See Logical Structures in XML [XML 1.0].
Element {element}
Jedes Element enthält ein oder mehrere {andere} Elemente; die Außengrenzen von Elementen sind entweder durch Start-Tags oder Ende-Tags begrenzt, oder bei leeren Elementen durch ein Leerelement-Tag. Jedes Element hat einen Typ der durch einen Namen bestimmt ist und kann eine Menge von Attributen haben. Jedes Attribut hat einen Namen und einen Wert. Siehe Logische Strukturen {Logical Structures} in XML [XML 1.0].
event
An event is the representation of some asynchronous occurrence (such as a mouse click on the presentation of the element, or the removal of child node from an element, or any of unthinkably many other possibilities) that gets associated with an event target.
Ereignis {event}
Ein Ereignis ist die Entsprechung von einigen nicht-synchronen Vorkommnissen (wie Mausklick auf eine Elementdarstellung, oder das Entfernen eines Kindknotens von einem Element, oder irgendwelcher anderer nicht vorherzusehender Möglichkeiten) die verbunden sind mit einem Ereignisziel {event target}.
event target
The object to which an event is targeted.
Ereignisziel {event target}
Das Objekt, auf das ein Ereignis {event} wirkt.
logically-adjacent text nodes
Logically-adjacent text nodes are Text or CDataSection nodes that may be visited sequentially in document order without entering, exiting, or passing over Element, Comment, or ProcessingInstruction nodes.
Logisch angrenzende Textknoten {logically-adjacent text nodes}
Logisch angrenzende Textknoten {logically-adjacent text nodes} sind Text- oder CDataSection-Knoten die man entsprechend der Dokumentfolge {document order} nacheinander finden kann ohne in Element-, Kommentar {Comment}- oder ProcessingInstruction-Knoten einzutreten, diese zu verlassen oder zu übergehen.
live
An object is live if any change to the underlying document structure is reflected in the object.
aktuell {live}
Ein Objekt ist aktuell {live}, wenn irgendeine Änderung der darunterliegenden Dokumentstruktur im Objekt widerspiegelt wird.
model
A model is the actual data representation for the information at hand. Examples are the structural model and the style model representing the parse structure and the style information associated with a document. The model might be a tree, or a directed graph, or something else.
Modell {model}
Ein Modell {model} ist die aktuelle Datenrepräsentation für die gültigen Informationen. Beispiele sind das Strukturmodell und das Stilmodell, das die geparste Struktur und die Stilinformationen, die mit dem Dokument verbunden sind, repräsentiert. Das Modell kann ein Baum, eine gerichteter Graph oder etwas passend anderes sein.
namespace prefix
A namespace prefix is a string that associates an element or attribute name with a namespace URI in XML. See namespace prefix in Namespaces in XML [XML Namespaces].
Namensraumpräfix {namespace prefix}
Ein Namensraumpräfix {namespace prefix} ist eine Zeichenkette, die einen Element- oder Attributnamen mit einem Namensraum-URI {namespace URI} in XML verbindet. Siehe Namensraumpräfix {namespace prefix} in den Namensräumen von XML [XML-Namensräume {XML Namespaces}].
namespace URI
A namespace URI is a URI that identifies an XML namespace. This is called the namespace name in Namespaces in XML [XML Namespaces].
Namensraum-URI (namespace URI)
Ein Namensraum-URI (namespace URI) ist ein URI, der einen XML-Namensraum eindeutig kennzeichnet. Dies ist gleichbedeutend mit dem Namen von Namensräumen in XML [XML-Namensräume {XML Namespaces}].
read only node
A read only node is a node that is immutable. This means its list of children, its content, and its attributes, when it is an element, cannot be changed in any way. However, a read only node can possibly be moved, when it is not itself contained in a read only node.
Nur-Lese-Knoten {read only node}
Ein Nur-Lese-Knoten {read only node} ist ein nicht veränderbarer Knoten. Ist der Knoten ein Element, so bezieht das auch die Liste seiner Kinder, ihre Inhalte und Attribute ein, die in keiner Weise verändert werden können. Allerdings kann ein Nur-Lese-Knoten unter Umständen verschoben werden, sofern er nicht selbst zum Inhalt eines anderen Nur-Lese-Knotens gehört.
target node
The target node is the node representing the event target to which an event is targeted using the DOM event flow.
Zielknoten {target node}
Der Zielknoten ist der Knoten, der ein Ereignisziel {event target} repräsentiert, auf das ein Ereignis {event} entsprechend dem DOM-Ereignis-Ablauf gerichtet ist.
tokenized
The description given to various information items (for example, attribute values of various types, but not including the StringType CDATA) after having been processed by the XML processor. The process includes stripping leading and trailing white space, and replacing multiple space characters by one. See the definition of tokenized type.
In Tokens umgeformt {tokenized}
Dies beschreibt verschiedene Informationseinheiten (beispielsweise Attributwerte verschiedener Typen ausschließlich des Zeichenkettentyps CDATA) nach der Verarbeitung durch den XML-Prozessor. Diese Verarbeitung schließt das Entfernen von führenden und folgenden Leerraumzeichen {white space} sowie das Zusammenfassen mehrerer aufeinanderfolgenden Leerzeichen zu einem ein. Siehe Definition der Art "In Tokens umgeformt" {tokenized}.
well-formed
A node is a well-formed XML node if it matches its respective production in [XML 1.0], meets all well-formedness constraints related to the production, if the entities which are referenced within the node are also well-formed. See also the definition for well-formed XML documents in [XML 1.0].
wohlgeformt {well-formed}
Ein Knoten ist dann ein wohlgeformter {well-formed} XML-Knoten, wenn seine jeweilige Produktion auf [XML 1.0] zutrifft, wenn alle Wohlgeformtheitsbeschränkungen {well-formedness constraints} für die Produktion gültig sind, und wenn die innerhalb des Knotens referenzierten Entities ihrerseits wohlgeformt {well-formed} sind. Siehe auch Definition von wohlgefomten {well-formed} XML-Dokumenten in [XML 1.0].

31 March 2003

References

For the latest version of any W3C specification please consult the list of W3C Technical Reports available at http://www.w3.org/TR.

F.1: Normative references

[DOM Level 2 Core]
Document Object Model Level 2 Core Specification, A. Le Hors, et al., Editors. World Wide Web Consortium, 13 November 2000. This version of the DOM Level 2 Core Recommendation is http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113. The latest version of DOM Level 2 Core is available at http://www.w3.org/TR/DOM-Level-2-Core.
[ECMAScript]
ECMAScript Language Specification, Third Edition. European Computer Manufacturers Association, Standard ECMA-262, December 1999.
[Java]
The Java Language Specification, J. Gosling, B. Joy, and G. Steele, Authors. Addison-Wesley, September 1996. Available at http://java.sun.com/docs/books/jls
[OMG IDL]
"OMG IDL Syntax and Semantics" defined in The Common Object Request Broker: Architecture and Specification, version 2, Object Management Group. The latest version of CORBA version 2.0 is available at http://www.omg.org/technology/documents/formal/corba_2.htm.
[XML 1.0]
Extensible Markup Language (XML) 1.0 (Second Edition), T. Bray, J. Paoli, C. M. Sperberg-McQueen, and E. Maler, Editors. World Wide Web Consortium, 10 February 1998, revised 6 October 2000. This version of the XML 1.0 Recommendation is http://www.w3.org/TR/2000/REC-xml-20001006. The latest version of XML 1.0 is available at http://www.w3.org/TR/REC-xml.
[XML Information set]
XML Information Set, J. Cowan and R. Tobin, Editors. World Wide Web Consortium, 24 October 2001. This version of the XML Information Set Recommendation is http://www.w3.org/TR/2001/REC-xml-infoset-20011024. The latest version of XML Information Set is available at http://www.w3.org/TR/xml-infoset.
[XPath 1.0]
XML Path Language (XPath) Version 1.0, J. Clark and S. DeRose, Editors. World Wide Web Consortium, 16 November 1999. This version of the XPath 1.0 Recommendation is http://www.w3.org/TR/1999/REC-xpath-19991116. The latest version of XPath 1.0 is available at http://www.w3.org/TR/xpath.

F.2: Informative references

[DOM Level 3 Core]
Document Object Model Level 3 Core Specification, A. Le Hors, et al., Editors. World Wide Web Consortium, October 2002. This version of the Document Object Model Level 3 Core Specification is http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022. The latest version of DOM Level 3 Core is available at http://www.w3.org/TR/DOM-Level-3-Core.
[XML Namespaces]
Namespaces in XML, T. Bray, D. Hollander, and A. Layman, Editors. World Wide Web Consortium, 14 January 1999. This version of the XML Information Set Recommendation is http://www.w3.org/TR/1999/REC-xml-names-19990114. The latest version of Namespaces in XML is available at http://www.w3.org/TR/REC-xml-names.

31. März 2003

Referenzen

Zur letzten Version irgendeiner W3C-Spezifikation konsultieren Sie bitte die Liste der Technischen Berichte des W3C {W3C Technical Reports}, verfügbar unter http://www.w3.org/TR.

F.1: Normative Referenzen

[DOM Level 2 Core]
Document Object Model Level 2 Core Specification, A. Le Hors, et al., Herausgeber. World Wide Web Consortium, 13 November 2000. Diese Version der Empfehlung des DOM Level 2 Core ist http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113. Die letzte Version des DOM Level 2 Core ist verfügbar unter http://www.w3.org/TR/DOM-Level-2-Core.
[ECMAScript]
ECMAScript Language Specification, Dritte Ausgabe. European Computer Manufacturers Association, Standard ECMA-262, December 1999.
[Java]
The Java Language Specification, J. Gosling, B. Joy, and G. Steele, Authors. Addison-Wesley, September 1996. Verfügbar unter http://java.sun.com/docs/books/jls
[OMG IDL]
"OMG IDL Syntax and Semantics" definiert in The Common Object Request Broker: Architecture and Specification, version 2, Object Management Group. Die letzte Version der CORBA Version 2.0 ist verfügbar unter http://www.omg.org/technology/documents/formal/corba_2.htm.
[XML 1.0]
Extensible Markup Language (XML) 1.0 (Second Edition), T. Bray, J. Paoli, C. M. Sperberg-McQueen, and E. Maler, Herausgeber. World Wide Web Consortium, 10 February 1998, revised 6 October 2000. Diese Version der Empfehlung zu XML 1.0 ist http://www.w3.org/TR/2000/REC-xml-20001006. Die letzte Version von XML 1.0 ist verfügbar unter http://www.w3.org/TR/REC-xml.
[XML Information set]
XML Information Set, J. Cowan and R. Tobin, Herausgeber. World Wide Web Consortium, 24 October 2001. Diese Version der Empfehlung des XML Information Set ist http://www.w3.org/TR/2001/REC-xml-infoset-20011024. Die letzte Version des XML Information Set ist verfügbar unter http://www.w3.org/TR/xml-infoset.
[XPath 1.0]
XML Path Language (XPath) Version 1.0, J. Clark and S. DeRose, Herausgeber. World Wide Web Consortium, 16 November 1999. Diese Version der Empfehlung zu XPath 1.0 ist http://www.w3.org/TR/1999/REC-xpath-19991116. Die letzte Version von XPath 1.0 ist verfügbar unter http://www.w3.org/TR/xpath.

F.2: Informative Referenzen

[DOM Level 3 Core]
Document Object Model Level 3 Core Specification, A. Le Hors, et al., Herausgeber. World Wide Web Consortium, October 2002. Diese Version des Dokument-Objekt-Modells Level 3 Core Specification ist http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022. Die letzte Version des DOM Level 3 Core ist verfügbar unter http://www.w3.org/TR/DOM-Level-3-Core.
[XML Namespaces]
Namespaces in XML, T. Bray, D. Hollander, and A. Layman, Herausgeber. World Wide Web Consortium, 14 January 1999. Diese Version der Empfehlung zum XML Information Set ist http://www.w3.org/TR/1999/REC-xml-names-19990114. Die letzte Version von Namensräumen in XML ist verfügbar unter http://www.w3.org/TR/REC-xml-names.

31 March 2003

Index

ANY_TYPE ANY_UNORDERED_NODE_TYPE API 1, 2
 
BOOLEAN_TYPE booleanValue
 
createExpression createNSResolver
 
document element document order 1, 2 DOM Level 2 Core 1, 2, 3
DOM Level 3 Core 1, 2, 3
 
ECMAScript element 1, 2, 3 evaluate 1, 2
event event target
 
FIRST_ORDERED_NODE_TYPE
 
INVALID_EXPRESSION_ERR invalidIteratorState iterateNext
 
Java
 
live 1, 2 logically-adjacent text nodes 1, 2 lookupNamespaceURI
 
model 1, 2
 
namespace prefix 1, 2, 3, 4 namespace URI 1, 2, 3, 4 NUMBER_TYPE
numberValue
 
OMG IDL ORDERED_NODE_ITERATOR_TYPE ORDERED_NODE_SNAPSHOT_TYPE
ownerElement
 
read only node 1, 2 resultType
 
singleNodeValue snapshotItem snapshotLength
STRING_TYPE stringValue
 
target node tokenized TYPE_ERR
 
UNORDERED_NODE_ITERATOR_TYPE UNORDERED_NODE_SNAPSHOT_TYPE
 
well-formed
 
XML 1.0 1, 2, 3, 4 XML Information set 1, 2 XML Namespaces 1, 2, 3
XPath 1.0 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 XPATH_NAMESPACE_NODE XPathEvaluator
XPathException XPathExpression XPathNamespace
XPathNSResolver XPathResult