|
||||
File indexing completed on 2025-01-18 10:14:51
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_PSVIELEMENT_HPP) 0023 #define XERCESC_INCLUDE_GUARD_PSVIELEMENT_HPP 0024 0025 #include <xercesc/framework/psvi/PSVIItem.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 /** 0030 * Represent the PSVI contributions for one element information item. 0031 * This is *always* owned by the scanner/parser object from which 0032 * it is obtained. The validator will specify 0033 * under what conditions it may be relied upon to have meaningful contents. 0034 */ 0035 0036 // forward declarations 0037 class XSElementDeclaration; 0038 class XSNotationDeclaration; 0039 class XSModel; 0040 0041 class XMLPARSER_EXPORT PSVIElement : public PSVIItem 0042 { 0043 public: 0044 0045 // Constructors and Destructor 0046 // ----------------------------------------------------------------------- 0047 /** @name Constructors */ 0048 //@{ 0049 0050 /** 0051 * The default constructor 0052 * 0053 * @param manager The configurable memory manager 0054 */ 0055 PSVIElement( MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); 0056 0057 //@}; 0058 0059 /** @name Destructor */ 0060 //@{ 0061 ~PSVIElement(); 0062 //@} 0063 0064 //--------------------- 0065 /** @name PSVIElement methods */ 0066 0067 //@{ 0068 0069 /** 0070 * An item isomorphic to the element declaration used to validate 0071 * this element. 0072 * 0073 * @return an element declaration 0074 */ 0075 XSElementDeclaration *getElementDeclaration(); 0076 0077 /** 0078 * [notation] 0079 * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation">XML Schema Part 1: Structures [notation]</a> 0080 * @return The notation declaration. 0081 */ 0082 XSNotationDeclaration *getNotationDeclaration(); 0083 0084 /** 0085 * [schema information] 0086 * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_information">XML Schema Part 1: Structures [schema information]</a> 0087 * @return The schema information property if it's the validation root, 0088 * null otherwise. 0089 */ 0090 XSModel *getSchemaInformation(); 0091 0092 /** 0093 * An item isomorphic to the type definition used to validate this element. 0094 * 0095 * @return a type declaration 0096 */ 0097 XSTypeDefinition *getTypeDefinition(); 0098 0099 /** 0100 * If and only if that type definition is a simple type definition 0101 * with {variety} union, or a complex type definition whose {content type} 0102 * is a simple type definition with {variety} union, then an item isomorphic 0103 * to that member of the union's {member type definitions} which actually 0104 * validated the element item's normalized value. 0105 * 0106 * @return a simple type declaration 0107 */ 0108 XSSimpleTypeDefinition *getMemberTypeDefinition(); 0109 0110 //@} 0111 0112 //---------------------------------- 0113 /** methods needed by implementation */ 0114 0115 //@{ 0116 void reset 0117 ( 0118 const VALIDITY_STATE validityState 0119 , const ASSESSMENT_TYPE assessmentType 0120 , const XMLCh* const validationContext 0121 , bool isSpecified 0122 , XSElementDeclaration* const elemDecl 0123 , XSTypeDefinition* const typeDef 0124 , XSSimpleTypeDefinition* const memberType 0125 , XSModel* const schemaInfo 0126 , const XMLCh* const defaultValue 0127 , const XMLCh* const normalizedValue = 0 0128 , XMLCh* const canonicalValue = 0 0129 , XSNotationDeclaration* const notationDecl = 0 0130 ); 0131 0132 //@} 0133 0134 private: 0135 0136 // ----------------------------------------------------------------------- 0137 // Unimplemented constructors and operators 0138 // ----------------------------------------------------------------------- 0139 PSVIElement(const PSVIElement&); 0140 PSVIElement & operator=(const PSVIElement &); 0141 0142 0143 // ----------------------------------------------------------------------- 0144 // data members 0145 // ----------------------------------------------------------------------- 0146 // fElementDecl 0147 // element declaration component that validated this element 0148 // fNotationDecl 0149 // (optional) notation decl associated with this element 0150 // fSchemaInfo 0151 // Schema Information Item with which this validation episode is associated 0152 XSElementDeclaration *fElementDecl; 0153 XSNotationDeclaration *fNotationDecl; 0154 XSModel *fSchemaInfo; 0155 }; 0156 0157 inline XSElementDeclaration *PSVIElement::getElementDeclaration() 0158 { 0159 return fElementDecl; 0160 } 0161 0162 inline XSNotationDeclaration* PSVIElement::getNotationDeclaration() 0163 { 0164 return fNotationDecl; 0165 } 0166 0167 inline XSModel* PSVIElement::getSchemaInformation() 0168 { 0169 return fSchemaInfo; 0170 } 0171 0172 XERCES_CPP_NAMESPACE_END 0173 0174 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |