/* Interface for NSXMLNodeOptions for GNUStep Copyright (C) 2008 Free Software Foundation, Inc. Written by: Richard Frith-Macdonald Created: September 2008 This file is part of the GNUstep Base Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed 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. See the GNU Library General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. */ #ifndef __NSXMLNodeOptions_h_GNUSTEP_BASE_INCLUDE #define __NSXMLNodeOptions_h_GNUSTEP_BASE_INCLUDE #import #import #if defined(__cplusplus) extern "C" { #endif /** This enumeration is a bitmask specifying input and output options * for nnode. * * NSXMLNodeIsCDATA * Indicates that a text node is CDATA * NSXMLNodeExpandEmptyElement * The element should be expanded when empty, * eg <elementname></elementname>. * For some reason MacOS-X specifies this as the default setting. * NSXMLNodeCompactEmptyElement * This element should be compact when empty, * eg <elementname/> * NSXMLNodeUseSingleQuotes * Use single quotes on this attribute or namespace * NSXMLNodeUseDoubleQuotes * Use double quotes on this attribute or namespace. * MacOS-X specifies this as the default setting. * NSXMLNodeOptionsNone * Use the default options for this node * NSXMLNodePreserveAll * Turn all preservation options on * NSXMLNodePreserveNamespaceOrder * Preserve the order of namespaces * NSXMLNodePreserveAttributeOrder * Preserve the order of attributes * NSXMLNodePreserveEntities * Entities should not be resolved on output * NSXMLNodePreservePrefixes * Prefixes should not be chosen based on closest URI definition * NSXMLNodePreserveCDATA * CDATA should be preserved * NSXMLNodePreserveEmptyElements * Remember whether an empty element was expanded or compact * NSXMLNodePreserveQuotes * Remember whether an attribute used single or double quotes * NSXMLNodePreserveWhitespace * Preserve non-content whitespace * NSXMLNodePreserveDTD * Preserve the DTD until it is modified * NSXMLDocumentTidyHTML * Try to change HTML into valid XHTML * NSXMLDocumentTidyXML * Try to change malformed XML into valid XML * NSXMLDocumentValidate * Validate this document against its DTD * NSXMLNodePrettyPrint * Output this node in a readable format * NSXMLDocumentIncludeContentTypeDeclaration * Include a content type declaration for HTML or XHTML */ enum { NSXMLNodeOptionsNone = 0, NSXMLNodeIsCDATA = 1 << 0, NSXMLNodeExpandEmptyElement = 1 << 1, NSXMLNodeCompactEmptyElement = 1 << 2, NSXMLNodeUseSingleQuotes = 1 << 3, NSXMLNodeUseDoubleQuotes = 1 << 4, NSXMLDocumentTidyHTML = 1 << 9, NSXMLDocumentTidyXML = 1 << 10, NSXMLDocumentValidate = 1 << 13, NSXMLDocumentXInclude = 1 << 16, NSXMLNodePrettyPrint = 1 << 17, NSXMLDocumentIncludeContentTypeDeclaration = 1 << 18, NSXMLNodePreserveNamespaceOrder = 1 << 20, NSXMLNodePreserveAttributeOrder = 1 << 21, NSXMLNodePreserveEntities = 1 << 22, NSXMLNodePreservePrefixes = 1 << 23, NSXMLNodePreserveCDATA = 1 << 24, NSXMLNodePreserveWhitespace = 1 << 25, NSXMLNodePreserveDTD = 1 << 26, NSXMLNodePreserveCharacterReferences = 1 << 27, NSXMLNodePreserveEmptyElements = (NSXMLNodeCompactEmptyElement | NSXMLNodeExpandEmptyElement), NSXMLNodePreserveQuotes = (NSXMLNodeUseDoubleQuotes | NSXMLNodeUseSingleQuotes), NSXMLNodePreserveAll = ( NSXMLNodePreserveAttributeOrder | NSXMLNodePreserveCDATA | NSXMLNodePreserveCharacterReferences | NSXMLNodePreserveDTD | NSXMLNodePreserveEmptyElements | NSXMLNodePreserveEntities | NSXMLNodePreserveNamespaceOrder | NSXMLNodePreservePrefixes | NSXMLNodePreserveQuotes | NSXMLNodePreserveWhitespace | 0xFFF00000) // high 12 bits }; #if defined(__cplusplus) } #endif #endif /*__NSXMLNodeOptions_h_GNUSTEP_BASE_INCLUDE */