Index: src/OFXMLAttribute.h ================================================================== --- src/OFXMLAttribute.h +++ src/OFXMLAttribute.h @@ -26,11 +26,17 @@ @public OFString *_name, *_namespace, *_stringValue; } #ifdef OF_HAVE_PROPERTIES -@property (readonly, copy) OFString *name, *namespace, *stringValue; +@property (readonly, copy) OFString *name; +# ifdef __cplusplus +@property (readonly, copy, getter=namespace) OFString *namespace_; +# else +@property (readonly, copy) OFString *namespace; +# endif +@property (readonly, copy) OFString *stringValue; #endif /*! * @brief Creates a new XML attribute. * Index: src/OFXMLElement.h ================================================================== --- src/OFXMLElement.h +++ src/OFXMLElement.h @@ -33,11 +33,17 @@ OFMutableDictionary *_namespaces; OFMutableArray *_children; } #ifdef OF_HAVE_PROPERTIES -@property (copy) OFString *name, *namespace, *defaultNamespace; +@property (copy) OFString *name; +# ifdef __cplusplus +@property (copy, getter=namespace, setter=setNamespace:) OFString *namespace_; +# else +@property (copy) OFString *namespace; +# endif +@property (copy) OFString *defaultNamespace; @property (readonly, copy) OFArray *attributes; @property (copy) OFArray *children; #endif /*! @@ -61,29 +67,29 @@ /*! * @brief Creates a new XML element with the specified name and namespace. * * @param name The name for the element - * @param namespace The namespace for the element + * @param namespace_ The namespace for the element * @return A new autoreleased OFXMLElement with the specified element name and * namespace */ + (instancetype)elementWithName: (OFString*)name - namespace: (OFString*)namespace; + namespace: (OFString*)namespace_; /*! * @brief Creates a new XML element with the specified name, namespace and * string value. * * @param name The name for the element - * @param namespace The namespace for the element + * @param namespace_ The namespace for the element * @param stringValue The value for the element * @return A new autoreleased OFXMLElement with the specified element name, * namespace and value */ + (instancetype)elementWithName: (OFString*)name - namespace: (OFString*)namespace + namespace: (OFString*)namespace_ stringValue: (OFString*)stringValue; /*! * @brief Creates a new element with the specified element. * @@ -133,29 +139,29 @@ /*! * @brief Initializes an already allocated OFXMLElement with the specified name * and namespace. * * @param name The name for the element - * @param namespace The namespace for the element + * @param namespace_ The namespace for the element * @return An initialized OFXMLElement with the specified element name and * namespace */ - initWithName: (OFString*)name - namespace: (OFString*)namespace; + namespace: (OFString*)namespace_; /*! * @brief Initializes an already allocated OFXMLElement with the specified name, * namespace and value. * * @param name The name for the element - * @param namespace The namespace for the element + * @param namespace_ The namespace for the element * @param stringValue The value for the element * @return An initialized OFXMLElement with the specified element name, * namespace and value */ - initWithName: (OFString*)name - namespace: (OFString*)namespace + namespace: (OFString*)namespace_ stringValue: (OFString*)stringValue; /*! * @brief Initializes an already allocated OFXMLElement with the specified * element. @@ -199,13 +205,13 @@ - (OFString*)name; /*! * @brief Sets the namespace of the element. * - * @param namespace The new namespace + * @param namespace_ The new namespace */ -- (void)setNamespace: (OFString*)namespace; +- (void)setNamespace: (OFString*)namespace_; /*! * @brief Returns the namespace of the element. * * @return The namespace of the element @@ -269,15 +275,15 @@ * * If an attribute with the same name and namespace already exists, it is not * added. * * @param name The name of the attribute - * @param namespace The namespace of the attribute + * @param namespace_ The namespace of the attribute * @param stringValue The value of the attribute */ - (void)addAttributeWithName: (OFString*)name - namespace: (OFString*)namespace + namespace: (OFString*)namespace_ stringValue: (OFString*)stringValue; /*! * @brief Returns the attribute with the specified name. * @@ -314,23 +320,23 @@ /*! * @brief Sets a prefix for a namespace. * * @param prefix The prefix for the namespace - * @param namespace The namespace for which the prefix is set + * @param namespace_ The namespace for which the prefix is set */ - (void)setPrefix: (OFString*)prefix - forNamespace: (OFString*)namespace; + forNamespace: (OFString*)namespace_; /*! * @brief Binds a prefix for a namespace. * * @param prefix The prefix for the namespace - * @param namespace The namespace for which the prefix is bound + * @param namespace_ The namespace for which the prefix is bound */ - (void)bindPrefix: (OFString*)prefix - forNamespace: (OFString*)namespace; + forNamespace: (OFString*)namespace_; /*! * @brief Sets the default namespace for the element to be used if there is no * parent. * Index: src/OFXMLElementBuilder.h ================================================================== --- src/OFXMLElementBuilder.h +++ src/OFXMLElementBuilder.h @@ -70,16 +70,16 @@ * an OFMalformedXMLException. * * @param builder The builder which did not expect the close tag * @param name The name of the close tag * @param prefix The prefix of the close tag - * @param namespace The namespace of the close tag + * @param namespace_ The namespace of the close tag */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didNotExpectCloseTag: (OFString*)name prefix: (OFString*)prefix - namespace: (OFString*)namespace; + namespace: (OFString*)namespace_; /*! * @brief This callback is called when the XML parser for the element builder * found an unknown entity. * Index: src/exceptions/OFUnboundNamespaceException.h ================================================================== --- src/exceptions/OFUnboundNamespaceException.h +++ src/exceptions/OFUnboundNamespaceException.h @@ -23,22 +23,27 @@ { OFString *_namespace, *_prefix; } #ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *namespace, *prefix; +# ifdef __cplusplus +@property (readonly, copy, nonatomic, getter=namespace) OFString *namespace_; +# else +@property (readonly, copy, nonatomic) OFString *namespace; +# endif +@property (readonly, copy, nonatomic) OFString *prefix; #endif /*! * @brief Creates a new, autoreleased unbound namespace exception. * * @param class_ The class of the object which caused the exception - * @param namespace The namespace which is unbound + * @param namespace_ The namespace which is unbound * @return A new, autoreleased unbound namespace exception */ + (instancetype)exceptionWithClass: (Class)class_ - namespace: (OFString*)namespace; + namespace: (OFString*)namespace_; /*! * @brief Creates a new, autoreleased unbound namespace exception. * * @param class_ The class of the object which caused the exception @@ -50,15 +55,15 @@ /*! * @brief Initializes an already allocated unbound namespace exception. * * @param class_ The class of the object which caused the exception - * @param namespace The namespace which is unbound + * @param namespace_ The namespace which is unbound * @return An initialized unbound namespace exception */ - initWithClass: (Class)class_ - namespace: (OFString*)namespace; + namespace: (OFString*)namespace_; /*! * @brief Initializes an already allocated unbound namespace exception. * * @param class_ The class of the object which caused the exception