LICENSE
The contents of the Extended Document Object Model files are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this files except in compliance with the License. You may obtain a copy of the License at "http://www.mozilla.org/MPL/"
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is "XmlRulesUtils.pas".
The Initial Developer of the Original Code is Dieter Köhler (Heidelberg, Germany, "http://www.philo.de/"). Portions created by the Initial Developer are Copyright (C) 1999-2003 Dieter Köhler. All Rights Reserved.
Alternatively, the contents of this files may be used under the terms of the GNU General Public License Version 2 or later (the "GPL"), in which case the provisions of the GPL are applicable instead of those above. If you wish to allow use of your version of this files only under the terms of the GPL, and not to allow others to use your version of this files under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL or the GPL.
2004
Table of Contents
The following functions serve to test whether an ISO-10646-UCS4 code point UCS4 belongs to the respective XML character class. All functions return True if UCS4 belongs to the class, otherwise they return False.
function IsXmlBaseCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlCombiningCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlDecDigitCodePoint(const UCS4: Longint): Boolean;
function IsXmlDigitCodePoint(const UCS4: Longint): Boolean;
function IsXmlEncNameFollowingCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlEncNameLeadingCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlExtenderCodePoint(const UCS4: Longint): Boolean;
function IsXmlHexDigitCodePoint(const UCS4: Longint): Boolean;
function IsXmlIdeographicCodePoint(const UCS4: Longint): Boolean;
function IsXmlLetterCodePoint(const UCS4: Longint): Boolean;
function IsXmlNameCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlVersionNumCharCodePoint(const UCS4: Longint): Boolean;
function IsXmlWhiteSpaceCodePoint(const UCS4: Longint): Boolean;
function IsXmlWhiteSpaceOrNullCodePoint(const UCS4: Longint): Boolean;
The following functions serve to test whether a WideChar S belongs to the respective XML character class. All functions return True if S belongs to the class, otherwise they return False. Since the value to be tested is always of type WideChar characters out of the interval [$10000;$10FFFF] cannot be tested. Instead you can either use their low or their high surrogate.
function IsXmlBaseChar(const S: WideChar): Boolean;
function IsXmlChar(const S: WideChar): Boolean;
function IsXmlCombiningChar(const S: WideChar): Boolean;
function IsXmlDigit(const S: WideChar): Boolean;
function IsXmlExtender(const S: WideChar): Boolean;
function IsXmlIdeographic(const S: WideChar): Boolean;
function IsXmlLetter(const S: WideChar): Boolean;
function IsXmlNameChar(const S: WideChar): Boolean;
function IsXmlPubidChar(const S: WideChar): Boolean;
function IsXmlVersionNumChar(const S: WideChar): Boolean;
function IsXmlWhiteSpace(const S: WideString): Boolean;
function IsXmlWhiteSpaceOrNull(const S: WideChar): Boolean;
The following functions serve to test whether a WideString S belongs to the respective XML string type. All functions return True if S belongs to the type, otherwise they return False.
function IsXmlAttValue(const S: WideString): Boolean;
function IsXmlCData(const S: WideString): Boolean;
function IsXmlCharData(const S: WideString): Boolean;
function IsXmlCharRef(const S: WideString): Boolean;
function IsXmlChars(const S: WideString): Boolean;
function IsXmlComment(const S: WideString): Boolean;
function IsXmlEncName(const S: WideString): Boolean;
function IsXmlEntityRef(const S: WideString): Boolean;
function IsXmlEntityValue(const S: WideString): Boolean;
function IsXmlEntityValueChars(const S: WideString): Boolean;
function IsXmlName(const S: WideString): Boolean;
function IsXmlNames(const S: WideString): Boolean;
function IsXmlNmtoken(const S: WideString): Boolean;
function IsXmlNmtokens(const S: WideString): Boolean;
function IsXmlPEReference(const S: WideString): Boolean;
function IsXmlPITarget(const S: WideString): Boolean;
function IsXmlPredefinedEntityName(const S: WideString): Boolean;
function IsXmlPubidChars(const S: WideString): Boolean;
function IsXmlPubidLiteral(const S: WideString): Boolean;
function IsXmlReference(const S: WideString): Boolean;
function IsXmlS(const S: WideString): Boolean;
function IsXmlStringType(const S: WideString): Boolean;
function IsXmlSystemChars(const S: WideString): Boolean;
function IsXmlSystemLiteral(const S: WideString): Boolean;
function IsXmlTokenizedType(const S: WideString): Boolean;
function IsXmlVersionNum(const S: WideString): Boolean;
The following functions serve to test whether a WideChar S or a WideString S belongs to the respective XML-namespace string type. All functions return True if S belongs to the type, otherwise they return False.
function IsXmlDefaultAttName(const S: WideString): Boolean;
function IsXmlLocalPart(const S: WideString): Boolean;
function IsXmlNCName(const S: WideString): Boolean;
function IsXmlNCNameChar(const S: WideChar): Boolean;
function IsXmlNSAttName(const S: WideString): Boolean;
function IsXmlPrefix(const S: WideString): Boolean;
function IsXmlPrefixedAttName(const S: WideString): Boolean;
function IsXmlQName(const S: WideString): Boolean;
[ISO/IEC 10646] ISO (International Organization for Standardization): ISO/IEC 10646-1993 (E). Information technology Universal Multiple-Octet Coded Character Set (UCS) Part 1: Architecture and Basic Multilingual Plane, [Geneva]: International Organization for Standardization, 1993 (+ amendments AM 17).
[Unicode 3.0] The Unicode Consortium: The Unicode Standard Version 3.0, Reading (Mass.): Addison-Wesley, 2000.
[XML 1.0] W3C (World Wide Web Consortium): Extensible Markup Language (XML) 1.0 (Second Edition), REC-xml-20001006, ed. Tim Bray, Jean Paoli, C. M. Sperberg-McQueen and Eve Maler, 06.10.2000, see "http://www.w3.org/TR/REC-xml".
[XML 1.0 Errata] W3C (World Wide Web Consortium): XML 1.0 Second Edition Specification Errata, see "http://www.w3.org/XML/xml-V10-2e-errata".