Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Attributes.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Attributes.h
00006  *
00007  *  $Id: Attributes.h,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef _ACEXML_ATTRIBUTES_H_
00014 #define _ACEXML_ATTRIBUTES_H_
00015 #include "ace/pre.h"
00016 
00017 #include "ACEXML/common/ACEXML_Export.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 #pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "ACEXML/common/XML_Types.h"
00024 
00025 /**
00026  * @class ACEXML_Attributes Attributes.h "ACEXML/common/Attributes.h"
00027  *
00028  * @brief ACEXML_Attributes defines a collection of attributes of an XML element.
00029  *
00030  * This is an abstract class (interface in Java) that defines
00031  * the API for accessing attributes of an XML entity.
00032  *
00033  * This interface allows access to a list of attributes in three different ways:
00034  *
00035  * - by attribute index;
00036  * - by Namespace-qualified name; or
00037  * - by qualified (prefixed) name.
00038  *
00039  * The list will not contain attributes that were declared #IMPLIED
00040  * but not specified in the start tag. It will also not contain
00041  * attributes used as Namespace declarations (xmlns*) unless the
00042  * http://xml.org/sax/features/namespace-prefixes feature is set to
00043  * true (it is false by default).
00044  *
00045  * If the namespace-prefixes feature (see above) is false, access by
00046  * qualified name may not be available; if the
00047  * http://xml.org/sax/features/namespaces feature is false, access by
00048  * Namespace-qualified names may not be available.
00049  *
00050  * This interface replaces the now-deprecated SAX1 AttributeList
00051  * interface, which does not contain Namespace support. In addition to
00052  * Namespace support, it adds the getIndex methods (below).
00053  *
00054  * The order of attributes in the list is unspecified, and will vary
00055  * from implementation to implementation.
00056  */
00057 class ACEXML_Export ACEXML_Attributes
00058 {
00059 public:
00060   /**
00061    * Look up the index of an attribute by XML 1.0 qualified name.
00062    */
00063   virtual int getIndex (const ACEXML_Char *qName) = 0;
00064 
00065   /**
00066    * Look up the index of an attribute by Namespace name.
00067    */
00068   virtual int getIndex (const ACEXML_Char *uri,
00069                         const ACEXML_Char *localPart) = 0;
00070 
00071   /**
00072    * Return the number of attributes in the list.
00073    */
00074   virtual size_t getLength (void) = 0;
00075 
00076   /**
00077    * Look up an attribute's local name by index.
00078    */
00079   virtual const ACEXML_Char *getLocalName (size_t index) = 0;
00080 
00081   /**
00082    * Look up an attribute's XML 1.0 qualified name by index.
00083    */
00084   virtual const ACEXML_Char *getQName (size_t index) = 0;
00085 
00086   /**
00087    * Look up an attribute's type by index.
00088    */
00089   virtual const ACEXML_Char *getType (size_t index) = 0;
00090 
00091   /**
00092    * Look up an attribute's type by XML 1.0 qualified name.
00093    */
00094   virtual const ACEXML_Char *getType (const ACEXML_Char *qName) = 0;
00095 
00096   /**
00097    * Look up an attribute's type by Namespace name.
00098    */
00099   virtual const ACEXML_Char *getType (const ACEXML_Char *uri,
00100                                       const ACEXML_Char *localPart) = 0;
00101 
00102   /**
00103    * Look up an attribute's Namespace URI by index.
00104    */
00105   virtual const ACEXML_Char *getURI (size_t index) = 0;
00106 
00107   /**
00108    * Look up an attribute's value by index.
00109    */
00110   virtual const ACEXML_Char *getValue (size_t index) = 0;
00111 
00112   /**
00113    * Look up an attribute's value by XML 1.0 qualified name.
00114    */
00115   virtual const ACEXML_Char *getValue (const ACEXML_Char *qName) = 0;
00116 
00117   /**
00118    * Look up an attribute's value by Namespace name.
00119    */
00120   virtual const ACEXML_Char *getValue (const ACEXML_Char *uri,
00121                                        const ACEXML_Char *localPart) = 0;
00122 };
00123 
00124 #include "ace/post.h"
00125 
00126 #endif /* _ACEXML_ ATTRIBUTES_H_ */

Generated on Mon Jun 16 13:23:18 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002