QXmlName Class Reference |
Clark Name | Description |
---|---|
html | The local name html, in no namespace |
http://www.w3.org/1999/xhtmlhtml | The local name html, in the XHTML namespace |
http://www.w3.org/1999/xhtmlmy:html | The local name html, in the XHTML namespace, with the prefix my |
If the namespace contains braces, the returned value is either invalid or has undefined content.
If clarkName is an invalid name, a default constructed QXmlName is returned.
This function was introduced in Qt 4.5.
See also toClarkName().
Returns true if candidate is an NCName. An NCName is a string that can be used as a name in XML and XQuery, e.g., the prefix or local name in an element or attribute, or the name of a variable.
See also Namespaces in XML 1.0 (Second Edition), [4] NCName.
Returns true if this QXmlName is not initialized with a valid combination of namespace URI, local name, and prefix.
A valid local name is always required. The prefix and namespace URI can be empty, but if the prefix is not empty, the namespace URI must not be empty. Local names and prefixes must be valid NCNames, e.g., abc.def or abc123.
Returns the local name.
Note that for efficiency, the local name string is not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the local name.
Returns the namespace URI.
Note that for efficiency, the namespace URI string is not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the namespace URI.
Returns the prefix.
Note that for efficiency, the prefix string is not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the prefix.
Returns this QXmlName formatted as a Clark Name. For example, if the local name is html, the prefix is x, and the namespace URI is http://www.w3.org/1999/xhtml/, then the Clark Name returned is:
{http://www.w3.org/1999/xhtml/}x:html.
If the local name is MyWidget and the namespace is empty, the Clark Name returned is:
MyWidget
Note that for efficiency, the namespace URI, local name, and prefix strings are not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the three string components.
This function can be useful for debugging.
See also XML Namespaces, James Clark and fromClarkName().
Returns true if this QXmlName is not equal to other; otherwise false. Two QXmlNames are equal if their namespace URIs are the same and their local names are the same. They are not equal if either their namespace URIs differ or their local names differ. Their prefixes are ignored.
Note that it is meaningless to compare two instances of QXmlName that were created with different name pools, but the attempt is not detected and the behavior is undefined.
See also operator==().
Assigns other to this and returns this.
Returns true if this QXmlName is equal to other; otherwise false. Two QXmlNames are equal if their namespace URIs are the same and their local names are the same. The prefixes are ignored.
Note that it is meaningless to compare two instances of QXmlName that were created with different name pools, but the attempt is not detected and the behavior is undefined.
See also operator!=().
Computes a hash key from the local name and the namespace URI in name. The prefix in name is not used in the computation.
This function was introduced in Qt 4.4.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.5 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com