]> git.saurik.com Git - wxWidgets.git/commitdiff
renamed wxXmlProperty to wxXmlAttribute, plus implied method names changes (bug ...
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 14 Jul 2007 10:07:41 +0000 (10:07 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 14 Jul 2007 10:07:41 +0000 (10:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

17 files changed:
docs/changes.txt
docs/latex/wx/category.tex
docs/latex/wx/classes.tex
docs/latex/wx/xmlattr.tex [new file with mode: 0644]
docs/latex/wx/xmldocument.tex
docs/latex/wx/xmlnode.tex
docs/latex/wx/xmlproperty.tex [deleted file]
include/wx/xml/xml.h
src/common/debugrpt.cpp
src/common/xtixml.cpp
src/richtext/richtextxml.cpp
src/xml/xml.cpp
src/xrc/xh_chckl.cpp
src/xrc/xh_odcombo.cpp
src/xrc/xh_radbx.cpp
src/xrc/xmlres.cpp
utils/wxrc/wxrc.cpp

index eb941842dcdaa0e41577ef25c611ab4e610335f7..1e06a74e89f22c2a37cf3940012c8046ee07e405 100644 (file)
@@ -92,6 +92,9 @@ Deprecated methods and their replacements
 - wxDocManager::MakeDefaultName() replaced by MakeNewDocumentName() and
   wxDocument::GetPrintableName() with GetUserReadableName() which are simpler
   to use
 - wxDocManager::MakeDefaultName() replaced by MakeNewDocumentName() and
   wxDocument::GetPrintableName() with GetUserReadableName() which are simpler
   to use
+- wxXmlProperty class was renamed to wxXmlAttribute in order to use standard
+  terminology. Corresponding wxXmlNode methods were renamed to use
+  "Attribute" instead of "Property" or "Prop" in their names.
 
 
 Major new features in this release
 
 
 Major new features in this release
index 65cbdb312d801d6ca1e899cf040d67f2a052a175..edf7a2dc9e9eae6cb00afde197265ce05ab974e8 100644 (file)
@@ -648,7 +648,7 @@ used internally by the HTML classes.
 \begin{twocollist}\itemsep=0pt
 \twocolitem{\helpref{wxXmlDocument}{wxxmldocument}}{A class to parse XML files.}
 \twocolitem{\helpref{wxXmlNode}{wxxmlnode}}{A class which represents XML nodes.}
 \begin{twocollist}\itemsep=0pt
 \twocolitem{\helpref{wxXmlDocument}{wxxmldocument}}{A class to parse XML files.}
 \twocolitem{\helpref{wxXmlNode}{wxxmlnode}}{A class which represents XML nodes.}
-\twocolitem{\helpref{wxXmlProperty}{wxxmlproperty}}{A class which represents XML properties.}
+\twocolitem{\helpref{wxXmlAttribute}{wxxmlattribute}}{A class which represents XML properties.}
 \end{twocollist}
 
 {\large {\bf XML-based resource system classes}}
 \end{twocollist}
 
 {\large {\bf XML-based resource system classes}}
index f1643f06ae367b74e6e392cd112ddef5cd80347b..4833c5bc94754a0bc41f5dc5218ef96cfaee8e08 100644 (file)
 \input wizpage.tex
 \input xmldocument.tex
 \input xmlnode.tex
 \input wizpage.tex
 \input xmldocument.tex
 \input xmlnode.tex
-\input xmlproperty.tex
+\input xmlattr.tex
 \input xmlres.tex
 \input xmlresh.tex
 \input zipstrm.tex
 \input xmlres.tex
 \input xmlresh.tex
 \input zipstrm.tex
diff --git a/docs/latex/wx/xmlattr.tex b/docs/latex/wx/xmlattr.tex
new file mode 100644 (file)
index 0000000..701a1bb
--- /dev/null
@@ -0,0 +1,84 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        xmlnode.tex
+%% Purpose:     wxXmlAttribute documentation
+%% Author:      Francesco Montorsi
+%% Created:     2006-04-18
+%% RCS-ID:      $Id$
+%% Copyright:   (c) 2006 Francesco Montorsi
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxXmlAttribute}}\label{wxxmlattribute}
+
+Represents a node property.
+
+Example: in {\tt <img src="hello.gif" id="3"/>}, {\tt ``src"} is property with value
+{\tt ``hello.gif"} and {\tt ``id"} is a property with value {\tt ``3"}.
+
+\wxheading{Derived from}
+
+No base class
+
+\wxheading{Include files}
+
+<wx/xml/xml.h>
+
+\wxheading{See also}
+
+\helpref{wxXmlDocument}{wxxmldocument}, \helpref{wxXmlNode}{wxxmlnode}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+
+\membersection{wxXmlAttribute::wxXmlAttribute}\label{wxxmlattributewxxmlattribute}
+
+\func{}{wxXmlAttribute}{\void}
+
+
+\func{}{wxXmlAttribute}{\param{const wxString\& }{name}, \param{const wxString\& }{value}, \param{wxXmlAttribute* }{next = NULL}}
+
+Creates the property with given {\it name} and {\it value}.
+If {\it next} is not NULL, then sets it as sibling of this property.
+
+\membersection{wxXmlAttribute::\destruct{wxXmlAttribute}}\label{wxxmlattributedtor}
+
+\func{}{\destruct{wxXmlAttribute}}{\void}
+
+The virtual destructor.
+
+\membersection{wxXmlAttribute::GetName}\label{wxxmlattributegetname}
+
+\constfunc{wxString}{GetName}{\void}
+
+Returns the name of this property.
+
+\membersection{wxXmlAttribute::GetNext}\label{wxxmlattributegetnext}
+
+\constfunc{wxXmlAttribute*}{GetNext}{\void}
+
+Returns the sibling of this property or NULL if there are no siblings.
+
+\membersection{wxXmlAttribute::GetValue}\label{wxxmlattributegetvalue}
+
+\constfunc{wxString}{GetValue}{\void}
+
+Returns the value of this property.
+
+\membersection{wxXmlAttribute::SetName}\label{wxxmlattributesetname}
+
+\func{void}{SetName}{\param{const wxString\& }{name}}
+
+Sets the name of this property.
+
+\membersection{wxXmlAttribute::SetNext}\label{wxxmlattributesetnext}
+
+\func{void}{SetNext}{\param{wxXmlAttribute* }{next}}
+
+Sets the sibling of this property.
+
+\membersection{wxXmlAttribute::SetValue}\label{wxxmlattributesetvalue}
+
+\func{void}{SetValue}{\param{const wxString\& }{value}}
+
+Sets the value of this property.
+
index d73740818b4b27f844658e0d0469b8379deb9d71..df0acfdceb1fafb8aa477236143f79583b5fa122 100644 (file)
@@ -36,12 +36,12 @@ while (child) {
         ...
 
 
         ...
 
 
-        // process properties of <tag1>
-        wxString propvalue1 = 
-            child->GetPropVal(wxT("prop1"), 
+        // process attributes of <tag1>
+        wxString attrvalue1 = 
+            child->GetAttribute(wxT("attr1"), 
                               wxT("default-value"));
                               wxT("default-value"));
-        wxString propvalue2 = 
-            child->GetPropVal(wxT("prop2"), 
+        wxString attrvalue2 = 
+            child->GetAttribute(wxT("attr2"), 
                               wxT("default-value"));
 
         ...
                               wxT("default-value"));
 
         ...
@@ -86,7 +86,7 @@ doc.Save(wxT("myfile2.xml"));  // myfile2.xml != myfile.xml
 
 \wxheading{See also}
 
 
 \wxheading{See also}
 
-\helpref{wxXmlNode}{wxxmlnode}, \helpref{wxXmlProperty}{wxxmlproperty}
+\helpref{wxXmlNode}{wxxmlnode}, \helpref{wxXmlAttribute}{wxxmlattribute}
 
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
 
 \latexignore{\rtfignore{\wxheading{Members}}}
@@ -166,7 +166,7 @@ Returns the root node of the document.
 
 Returns the version of document.
 This is the value in the {\tt <?xml version="1.0"?>} header of the XML document.
 
 Returns the version of document.
 This is the value in the {\tt <?xml version="1.0"?>} header of the XML document.
-If the version property was not explicitely given in the header, this function
+If the version attribute was not explicitely given in the header, this function
 returns an empty string.
 
 
 returns an empty string.
 
 
index 53d8e3d29cdb1ec000129db225daa5214bbe8b93..331f8000ac5ad2b6aa7f6d77608c012364cea3d2 100644 (file)
@@ -12,8 +12,8 @@
 
 Represents a node in an XML document. See \helpref{wxXmlDocument}{wxxmldocument}.
 
 
 Represents a node in an XML document. See \helpref{wxXmlDocument}{wxxmldocument}.
 
-Node has a name and may have content and properties. Most common node types are 
-{\tt wxXML\_TEXT\_NODE} (name and properties are irrelevant) and 
+Node has a name and may have content and attributes. Most common node types are 
+{\tt wxXML\_TEXT\_NODE} (name and attributes are irrelevant) and 
 {\tt wxXML\_ELEMENT\_NODE} (e.g. in {\tt <title>hi</title>} there is an element
 with name="title", irrelevant content and one child ({\tt wxXML\_TEXT\_NODE}
 with content="hi").
 {\tt wxXML\_ELEMENT\_NODE} (e.g. in {\tt <title>hi</title>} there is an element
 with name="title", irrelevant content and one child ({\tt wxXML\_TEXT\_NODE}
 with content="hi").
@@ -57,7 +57,7 @@ enum wxXmlNodeType
 
 \wxheading{See also}
 
 
 \wxheading{See also}
 
-\helpref{wxXmlDocument}{wxxmldocument}, \helpref{wxXmlProperty}{wxxmlproperty}
+\helpref{wxXmlDocument}{wxxmldocument}, \helpref{wxXmlAttribute}{wxxmlattribute}
 
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
 
 \latexignore{\rtfignore{\wxheading{Members}}}
@@ -65,7 +65,7 @@ enum wxXmlNodeType
 
 \membersection{wxXmlNode::wxXmlNode}\label{wxxmlnodewxxmlnode}
 
 
 \membersection{wxXmlNode::wxXmlNode}\label{wxxmlnodewxxmlnode}
 
-\func{}{wxXmlNode}{\param{wxXmlNode* }{parent}, \param{wxXmlNodeType }{type}, \param{const wxString\& }{name}, \param{const wxString\& }{content = wxEmptyString}, \param{wxXmlProperty* }{props = \NULL}, \param{wxXmlNode* }{next = \NULL}}
+\func{}{wxXmlNode}{\param{wxXmlNode* }{parent}, \param{wxXmlNodeType }{type}, \param{const wxString\& }{name}, \param{const wxString\& }{content = wxEmptyString}, \param{wxXmlAttribute* }{attrs = \NULL}, \param{wxXmlNode* }{next = \NULL}}
 
 \wxheading{Parameters}
 
 
 \wxheading{Parameters}
 
@@ -78,7 +78,7 @@ constructor and it shouldn't be done again.}
 \docparam{name}{The name of the node. This is the string which appears between angular brackets.}
 \docparam{content}{The content of the node. Only meaningful when {\it type} is 
 {\tt wxXML\_TEXT\_NODE} or {\tt wxXML\_CDATA\_SECTION\_NODE}.}
 \docparam{name}{The name of the node. This is the string which appears between angular brackets.}
 \docparam{content}{The content of the node. Only meaningful when {\it type} is 
 {\tt wxXML\_TEXT\_NODE} or {\tt wxXML\_CDATA\_SECTION\_NODE}.}
-\docparam{props}{If not \NULL, this \helpref{wxXmlProperty}{wxxmlproperty} object 
+\docparam{attrs}{If not \NULL, this \helpref{wxXmlAttribute}{wxxmlattribute} object 
 and its eventual siblings are attached to the node.}
 \docparam{next}{If not \NULL, this node and its eventual siblings are attached to
 the node.}
 and its eventual siblings are attached to the node.}
 \docparam{next}{If not \NULL, this node and its eventual siblings are attached to
 the node.}
@@ -92,7 +92,7 @@ and parent pointer, i.e. \helpref{GetParent()}{wxxmlnodegetparent} and
 \helpref{GetNext()}{wxxmlnodegetnext} will return \NULL
 after using copy ctor and are never unmodified by operator=.
 
 \helpref{GetNext()}{wxxmlnodegetnext} will return \NULL
 after using copy ctor and are never unmodified by operator=.
 
-On the other hand, it DOES copy children and properties.
+On the other hand, it DOES copy children and attributes.
 
 
 \func{}{wxXmlNode}{\param{wxXmlNodeType }{type}, \param{const wxString\& }{name}, \param{const wxString\& }{content = wxEmptyString}}
 
 
 \func{}{wxXmlNode}{\param{wxXmlNodeType }{type}, \param{const wxString\& }{name}, \param{const wxString\& }{content = wxEmptyString}}
@@ -104,7 +104,7 @@ A simplified version of the first constructor form, assuming a \NULL parent.
 
 \func{}{\destruct{wxXmlNode}}{\void}
 
 
 \func{}{\destruct{wxXmlNode}}{\void}
 
-The virtual destructor. Deletes attached children and properties.
+The virtual destructor. Deletes attached children and attributes.
 
 \membersection{wxXmlNode::AddChild}\label{wxxmlnodeaddchild}
 
 
 \membersection{wxXmlNode::AddChild}\label{wxxmlnodeaddchild}
 
@@ -113,21 +113,21 @@ The virtual destructor. Deletes attached children and properties.
 Adds the given node as child of this node. To attach a second children to this node, use the
 \helpref{SetNext()}{wxxmlnodesetnext} function of the {\it child} node.
 
 Adds the given node as child of this node. To attach a second children to this node, use the
 \helpref{SetNext()}{wxxmlnodesetnext} function of the {\it child} node.
 
-\membersection{wxXmlNode::AddProperty}\label{wxxmlnodeaddproperty}
+\membersection{wxXmlNode::AddAttribute}\label{wxxmlnodeaddattribute}
 
 
-\func{void}{AddProperty}{\param{const wxString\& }{name}, \param{const wxString\& }{value}}
+\func{void}{AddAttribute}{\param{const wxString\& }{name}, \param{const wxString\& }{value}}
 
 
-Appends a property with given {\it name} and {\it value} to the list of properties for this node.
+Appends a attribute with given {\it name} and {\it value} to the list of attributes for this node.
 
 
-\func{void}{AddProperty}{\param{wxXmlProperty* }{prop}}
+\func{void}{AddAttribute}{\param{wxXmlAttribute* }{attr}}
 
 
-Appends the given property to the list of properties for this node.
+Appends given attribute to the list of attributes for this node.
 
 
-\membersection{wxXmlNode::DeleteProperty}\label{wxxmlnodedeleteproperty}
+\membersection{wxXmlNode::DeleteAttribute}\label{wxxmlnodedeleteattribute}
 
 
-\func{bool}{DeleteProperty}{\param{const wxString\& }{name}}
+\func{bool}{DeleteAttribute}{\param{const wxString\& }{name}}
 
 
-Removes the first properties which has the given {\it name} from the list of properties for this node.
+Removes the first attributes which has the given {\it name} from the list of attributes for this node.
 
 \membersection{wxXmlNode::GetChildren}\label{wxxmlnodegetchildren}
 
 
 \membersection{wxXmlNode::GetChildren}\label{wxxmlnodegetchildren}
 
@@ -198,23 +198,23 @@ Returns a pointer to the sibling of this node or \NULL if there are no siblings.
 
 Returns a pointer to the parent of this node or \NULL if this node has no parent.
 
 
 Returns a pointer to the parent of this node or \NULL if this node has no parent.
 
-\membersection{wxXmlNode::GetPropVal}\label{wxxmlnodegetpropval}
+\membersection{wxXmlNode::GetAttribute}\label{wxxmlnodegetattribute}
 
 
-\constfunc{bool}{GetPropVal}{\param{const wxString\& }{propName}, \param{wxString* }{value}}
+\constfunc{bool}{GetAttribute}{\param{const wxString\& }{attrName}, \param{wxString* }{value}}
 
 
-Returns \true if a property named {\it propName} could be found.
-If the {\it value} pointer is not \NULL, the value of that property is saved there.
+Returns \true if a attribute named {\it attrName} could be found.
+If the {\it value} pointer is not \NULL, the value of that attribute is saved there.
 
 
-\constfunc{wxString}{GetPropVal}{\param{const wxString\& }{propName}, \param{const wxString\& }{defaultVal}}
+\constfunc{wxString}{GetAttribute}{\param{const wxString\& }{attrName}, \param{const wxString\& }{defaultVal}}
 
 
-Returns the value of the property named {\it propName} if it does exist.
+Returns the value of the attribute named {\it attrName} if it does exist.
 If it does not exist, the {\it defaultVal} is returned.
 
 If it does not exist, the {\it defaultVal} is returned.
 
-\membersection{wxXmlNode::GetProperties}\label{wxxmlnodegetproperties}
+\membersection{wxXmlNode::GetAttributes}\label{wxxmlnodegetattributes}
 
 
-\constfunc{wxXmlProperty *}{GetProperties}{\void}
+\constfunc{wxXmlAttribute *}{GetAttributes}{\void}
 
 
-Return a pointer to the first property of this node.
+Return a pointer to the first attribute of this node.
 
 \membersection{wxXmlNode::GetType}\label{wxxmlnodegettype}
 
 
 \membersection{wxXmlNode::GetType}\label{wxxmlnodegettype}
 
@@ -223,11 +223,11 @@ Return a pointer to the first property of this node.
 Returns the type of this node.
 
 
 Returns the type of this node.
 
 
-\membersection{wxXmlNode::HasProp}\label{wxxmlnodehasprop}
+\membersection{wxXmlNode::HasAttribute}\label{wxxmlnodehasattribute}
 
 
-\constfunc{bool}{HasProp}{\param{const wxString\& }{propName}}
+\constfunc{bool}{HasAttribute}{\param{const wxString\& }{attrName}}
 
 
-Returns \true if this node has a property named {\it propName}.
+Returns \true if this node has a attribute named {\it attrName}.
 
 \membersection{wxXmlNode::InsertChild}\label{wxxmlnodeinsertchild}
 
 
 \membersection{wxXmlNode::InsertChild}\label{wxxmlnodeinsertchild}
 
@@ -288,12 +288,12 @@ sibling node.
 Sets as parent the given node. The caller is responsible to delete any previously present
 parent node.
 
 Sets as parent the given node. The caller is responsible to delete any previously present
 parent node.
 
-\membersection{wxXmlNode::SetProperties}\label{wxxmlnodesetproperties}
+\membersection{wxXmlNode::SetAttributes}\label{wxxmlnodesetattributes}
 
 
-\func{void}{SetProperties}{\param{wxXmlProperty* }{prop}}
+\func{void}{SetAttributes}{\param{wxXmlAttribute* }{attr}}
 
 
-Sets as first property the given wxXmlProperty object.
-The caller is responsible to delete any previously present properties attached to this node.
+Sets as first attribute the given wxXmlAttribute object.
+The caller is responsible to delete any previously present attributes attached to this node.
 
 \membersection{wxXmlNode::SetType}\label{wxxmlnodesettype}
 
 
 \membersection{wxXmlNode::SetType}\label{wxxmlnodesettype}
 
diff --git a/docs/latex/wx/xmlproperty.tex b/docs/latex/wx/xmlproperty.tex
deleted file mode 100644 (file)
index 5df67f0..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Name:        xmlnode.tex
-%% Purpose:     wxXmlProperty documentation
-%% Author:      Francesco Montorsi
-%% Created:     2006-04-18
-%% RCS-ID:      $Id$
-%% Copyright:   (c) 2006 Francesco Montorsi
-%% License:     wxWindows license
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\section{\class{wxXmlProperty}}\label{wxxmlproperty}
-
-Represents a node property.
-
-Example: in {\tt <img src="hello.gif" id="3"/>}, {\tt ``src"} is property with value
-{\tt ``hello.gif"} and {\tt ``id"} is a property with value {\tt ``3"}.
-
-\wxheading{Derived from}
-
-No base class
-
-\wxheading{Include files}
-
-<wx/xml/xml.h>
-
-\wxheading{See also}
-
-\helpref{wxXmlDocument}{wxxmldocument}, \helpref{wxXmlNode}{wxxmlnode}
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-
-\membersection{wxXmlProperty::wxXmlProperty}\label{wxxmlpropertywxxmlproperty}
-
-\func{}{wxXmlProperty}{\void}
-
-
-\func{}{wxXmlProperty}{\param{const wxString\& }{name}, \param{const wxString\& }{value}, \param{wxXmlProperty* }{next = NULL}}
-
-Creates the property with given {\it name} and {\it value}.
-If {\it next} is not NULL, then sets it as sibling of this property.
-
-\membersection{wxXmlProperty::\destruct{wxXmlProperty}}\label{wxxmlpropertydtor}
-
-\func{}{\destruct{wxXmlProperty}}{\void}
-
-The virtual destructor.
-
-\membersection{wxXmlProperty::GetName}\label{wxxmlpropertygetname}
-
-\constfunc{wxString}{GetName}{\void}
-
-Returns the name of this property.
-
-\membersection{wxXmlProperty::GetNext}\label{wxxmlpropertygetnext}
-
-\constfunc{wxXmlProperty*}{GetNext}{\void}
-
-Returns the sibling of this property or NULL if there are no siblings.
-
-\membersection{wxXmlProperty::GetValue}\label{wxxmlpropertygetvalue}
-
-\constfunc{wxString}{GetValue}{\void}
-
-Returns the value of this property.
-
-\membersection{wxXmlProperty::SetName}\label{wxxmlpropertysetname}
-
-\func{void}{SetName}{\param{const wxString\& }{name}}
-
-Sets the name of this property.
-
-\membersection{wxXmlProperty::SetNext}\label{wxxmlpropertysetnext}
-
-\func{void}{SetNext}{\param{wxXmlProperty* }{next}}
-
-Sets the sibling of this property.
-
-\membersection{wxXmlProperty::SetValue}\label{wxxmlpropertysetvalue}
-
-\func{void}{SetValue}{\param{const wxString\& }{value}}
-
-Sets the value of this property.
-
index 19557b0b14b53710ff679c06741aa5af54f89526..030f4d34c1fdff871cb2c1a4ed5ea36de48e62d7 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 
 class WXDLLIMPEXP_FWD_XML wxXmlNode;
 #endif
 
 class WXDLLIMPEXP_FWD_XML wxXmlNode;
-class WXDLLIMPEXP_FWD_XML wxXmlProperty;
+class WXDLLIMPEXP_FWD_XML wxXmlAttribute;
 class WXDLLIMPEXP_FWD_XML wxXmlDocument;
 class WXDLLIMPEXP_FWD_XML wxXmlIOHandler;
 class WXDLLIMPEXP_FWD_BASE wxInputStream;
 class WXDLLIMPEXP_FWD_XML wxXmlDocument;
 class WXDLLIMPEXP_FWD_XML wxXmlIOHandler;
 class WXDLLIMPEXP_FWD_BASE wxInputStream;
@@ -60,33 +60,38 @@ enum wxXmlNodeType
 // Example: in <img src="hello.gif" id="3"/> "src" is property with value
 //          "hello.gif" and "id" is prop. with value "3".
 
 // Example: in <img src="hello.gif" id="3"/> "src" is property with value
 //          "hello.gif" and "id" is prop. with value "3".
 
-class WXDLLIMPEXP_XML wxXmlProperty
+class WXDLLIMPEXP_XML wxXmlAttribute
 {
 public:
 {
 public:
-    wxXmlProperty() : m_next(NULL) {}
-    wxXmlProperty(const wxString& name, const wxString& value,
-                  wxXmlProperty *next = NULL)
+    wxXmlAttribute() : m_next(NULL) {}
+    wxXmlAttribute(const wxString& name, const wxString& value,
+                  wxXmlAttribute *next = NULL)
             : m_name(name), m_value(value), m_next(next) {}
             : m_name(name), m_value(value), m_next(next) {}
-    virtual ~wxXmlProperty() {}
+    virtual ~wxXmlAttribute() {}
 
     wxString GetName() const { return m_name; }
     wxString GetValue() const { return m_value; }
 
     wxString GetName() const { return m_name; }
     wxString GetValue() const { return m_value; }
-    wxXmlProperty *GetNext() const { return m_next; }
+    wxXmlAttribute *GetNext() const { return m_next; }
 
     void SetName(const wxString& name) { m_name = name; }
     void SetValue(const wxString& value) { m_value = value; }
 
     void SetName(const wxString& name) { m_name = name; }
     void SetValue(const wxString& value) { m_value = value; }
-    void SetNext(wxXmlProperty *next) { m_next = next; }
+    void SetNext(wxXmlAttribute *next) { m_next = next; }
 
 private:
     wxString m_name;
     wxString m_value;
 
 private:
     wxString m_name;
     wxString m_value;
-    wxXmlProperty *m_next;
+    wxXmlAttribute *m_next;
 };
 
 };
 
+#if WXWIN_COMPATIBILITY_2_8
+    // NB: #define is used instead of typedef so that forward declarations
+    //     continue to work
+    #define wxXmlProperty wxXmlAttribute
+#endif
 
 
 
 
-// Represents node in XML document. Node has name and may have content
-// and properties. Most common node types are wxXML_TEXT_NODE (name and props
+// Represents node in XML document. Node has name and may have content and
+// attributes. Most common node types are wxXML_TEXT_NODE (name and attributes
 // are irrelevant) and wxXML_ELEMENT_NODE (e.g. in <title>hi</title> there is
 // element with name="title", irrelevant content and one child (wxXML_TEXT_NODE
 // with content="hi").
 // are irrelevant) and wxXML_ELEMENT_NODE (e.g. in <title>hi</title> there is
 // element with name="title", irrelevant content and one child (wxXML_TEXT_NODE
 // with content="hi").
@@ -97,17 +102,17 @@ private:
 class WXDLLIMPEXP_XML wxXmlNode
 {
 public:
 class WXDLLIMPEXP_XML wxXmlNode
 {
 public:
-    wxXmlNode() : m_properties(NULL), m_parent(NULL),
-                  m_children(NULL), m_next(NULL) {}
+    wxXmlNode()
+        : m_attrs(NULL), m_parent(NULL), m_children(NULL), m_next(NULL) {}
     wxXmlNode(wxXmlNode *parent, wxXmlNodeType type,
               const wxString& name, const wxString& content = wxEmptyString,
     wxXmlNode(wxXmlNode *parent, wxXmlNodeType type,
               const wxString& name, const wxString& content = wxEmptyString,
-              wxXmlProperty *props = NULL, wxXmlNode *next = NULL);
+              wxXmlAttribute *attrs = NULL, wxXmlNode *next = NULL);
     virtual ~wxXmlNode();
 
     // copy ctor & operator=. Note that this does NOT copy syblings
     // and parent pointer, i.e. m_parent and m_next will be NULL
     // after using copy ctor and are never unmodified by operator=.
     virtual ~wxXmlNode();
 
     // copy ctor & operator=. Note that this does NOT copy syblings
     // and parent pointer, i.e. m_parent and m_next will be NULL
     // after using copy ctor and are never unmodified by operator=.
-    // On the other hand, it DOES copy children and properties.
+    // On the other hand, it DOES copy children and attributes.
     wxXmlNode(const wxXmlNode& node);
     wxXmlNode& operator=(const wxXmlNode& node);
 
     wxXmlNode(const wxXmlNode& node);
     wxXmlNode& operator=(const wxXmlNode& node);
 
@@ -117,8 +122,10 @@ public:
     virtual void AddChild(wxXmlNode *child);
     virtual bool InsertChild(wxXmlNode *child, wxXmlNode *before_node);
     virtual bool RemoveChild(wxXmlNode *child);
     virtual void AddChild(wxXmlNode *child);
     virtual bool InsertChild(wxXmlNode *child, wxXmlNode *before_node);
     virtual bool RemoveChild(wxXmlNode *child);
-    virtual void AddProperty(const wxString& name, const wxString& value);
-    virtual bool DeleteProperty(const wxString& name);
+    virtual void AddAttribute(const wxString& name, const wxString& value)
+        { AddProperty(name, value); }
+    virtual bool DeleteAttribute(const wxString& name)
+        { return DeleteProperty(name); }
 
     // access methods:
     wxXmlNodeType GetType() const { return m_type; }
 
     // access methods:
     wxXmlNodeType GetType() const { return m_type; }
@@ -139,11 +146,11 @@ public:
     wxXmlNode *GetNext() const { return m_next; }
     wxXmlNode *GetChildren() const { return m_children; }
 
     wxXmlNode *GetNext() const { return m_next; }
     wxXmlNode *GetChildren() const { return m_children; }
 
-    wxXmlProperty *GetProperties() const { return m_properties; }
-    bool GetPropVal(const wxString& propName, wxString *value) const;
-    wxString GetPropVal(const wxString& propName,
-                        const wxString& defaultVal) const;
-    bool HasProp(const wxString& propName) const;
+    wxXmlAttribute *GetAttributes() const { return m_attrs; }
+    bool GetAttribute(const wxString& attrName, wxString *value) const;
+    wxString GetAttribute(const wxString& attrName,
+                         const wxString& defaultVal) const;
+    bool HasAttribute(const wxString& attrName) const;
 
     void SetType(wxXmlNodeType type) { m_type = type; }
     void SetName(const wxString& name) { m_name = name; }
 
     void SetType(wxXmlNodeType type) { m_type = type; }
     void SetName(const wxString& name) { m_name = name; }
@@ -153,19 +160,67 @@ public:
     void SetNext(wxXmlNode *next) { m_next = next; }
     void SetChildren(wxXmlNode *child) { m_children = child; }
 
     void SetNext(wxXmlNode *next) { m_next = next; }
     void SetChildren(wxXmlNode *child) { m_children = child; }
 
-    void SetProperties(wxXmlProperty *prop) { m_properties = prop; }
-    virtual void AddProperty(wxXmlProperty *prop);
+    void SetAttributes(wxXmlAttribute *attr) { m_attrs = attr; }
+    virtual void AddAttribute(wxXmlAttribute *attr)
+        { AddProperty(attr); }
+
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( inline wxXmlAttribute *GetProperties() const );
+    wxDEPRECATED( inline bool GetPropVal(const wxString& propName,
+                                         wxString *value) const );
+    wxDEPRECATED( inline wxString GetPropVal(const wxString& propName,
+                                             const wxString& defaultVal) const );
+    wxDEPRECATED( inline bool HasProp(const wxString& propName) const );
+
+    wxDEPRECATED( inline void SetProperties(wxXmlAttribute *prop) );
+#endif // WXWIN_COMPATIBILITY_2_8
+
+    // The following three functions are backward compatibility, but because
+    // they were virtual, we must make it possible to override them. This
+    // is done by calling e.g. AddProperty() from AddAttribute(), so we have
+    // to keep AddProperty() even if 2.8 compatibility is off. To prevent
+    // old code from compiling in that case, we make them private and
+    // non-virtual. (This can be removed when WXWIN_COMPATIBILITY_2_8 is
+    // removed, we'll have just *Attribute versions then.)
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED_BUT_USED_INTERNALLY(
+        virtual void AddProperty(const wxString& name, const wxString& value) );
+    wxDEPRECATED_BUT_USED_INTERNALLY(
+        virtual bool DeleteProperty(const wxString& name) );
+    wxDEPRECATED_BUT_USED_INTERNALLY(
+        virtual void AddProperty(wxXmlAttribute *attr) );
+#else
+private:
+    void AddProperty(const wxString& name, const wxString& value);
+    bool DeleteProperty(const wxString& name);
+    void AddProperty(wxXmlAttribute *attr);
+#endif // WXWIN_COMPATIBILITY_2_8/!WXWIN_COMPATIBILITY_2_8
 
 private:
     wxXmlNodeType m_type;
     wxString m_name;
     wxString m_content;
 
 private:
     wxXmlNodeType m_type;
     wxString m_name;
     wxString m_content;
-    wxXmlProperty *m_properties;
+    wxXmlAttribute *m_attrs;
     wxXmlNode *m_parent, *m_children, *m_next;
 
     void DoCopy(const wxXmlNode& node);
 };
 
     wxXmlNode *m_parent, *m_children, *m_next;
 
     void DoCopy(const wxXmlNode& node);
 };
 
+#if WXWIN_COMPATIBILITY_2_8
+inline wxXmlAttribute *wxXmlNode::GetProperties() const
+    { return GetAttributes(); }
+inline bool wxXmlNode::GetPropVal(const wxString& propName,
+                                  wxString *value) const
+    { return GetAttribute(propName, value); }
+inline wxString wxXmlNode::GetPropVal(const wxString& propName,
+                                      const wxString& defaultVal) const
+    { return GetAttribute(propName, defaultVal); }
+inline bool wxXmlNode::HasProp(const wxString& propName) const
+    { return HasAttribute(propName); }
+inline void wxXmlNode::SetProperties(wxXmlAttribute *prop)
+    { SetAttributes(prop); }
+#endif // WXWIN_COMPATIBILITY_2_8
+
 
 
 // special indentation value for wxXmlDocument::Save
 
 
 // special indentation value for wxXmlDocument::Save
index 9eeab342551caef71346eca6f13300052c38568b..542715a0f06f8fa5cc0e0ecc221a79175d064941 100644 (file)
@@ -87,13 +87,13 @@ protected:
 static inline void
 HexProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
 {
 static inline void
 HexProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
 {
-    node->AddProperty(name, wxString::Format(_T("%08lx"), value));
+    node->AddAttribute(name, wxString::Format(_T("%08lx"), value));
 }
 
 static inline void
 NumProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
 {
 }
 
 static inline void
 NumProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
 {
-    node->AddProperty(name, wxString::Format(_T("%lu"), value));
+    node->AddAttribute(name, wxString::Format(_T("%lu"), value));
 }
 
 static inline void
 }
 
 static inline void
@@ -129,13 +129,13 @@ void XmlStackWalker::OnStackFrame(const wxStackFrame& frame)
     wxString func = frame.GetName();
     if ( !func.empty() )
     {
     wxString func = frame.GetName();
     if ( !func.empty() )
     {
-        nodeFrame->AddProperty(_T("function"), func);
+        nodeFrame->AddAttribute(_T("function"), func);
         HexProperty(nodeFrame, _T("offset"), frame.GetOffset());
     }
 
     if ( frame.HasSourceLocation() )
     {
         HexProperty(nodeFrame, _T("offset"), frame.GetOffset());
     }
 
     if ( frame.HasSourceLocation() )
     {
-        nodeFrame->AddProperty(_T("file"), frame.GetFileName());
+        nodeFrame->AddAttribute(_T("file"), frame.GetFileName());
         NumProperty(nodeFrame, _T("line"), frame.GetLine());
     }
 
         NumProperty(nodeFrame, _T("line"), frame.GetLine());
     }
 
@@ -348,7 +348,7 @@ void wxDebugReport::AddAll(Context context)
 
 bool wxDebugReport::DoAddSystemInfo(wxXmlNode *nodeSystemInfo)
 {
 
 bool wxDebugReport::DoAddSystemInfo(wxXmlNode *nodeSystemInfo)
 {
-    nodeSystemInfo->AddProperty(_T("description"), wxGetOsDescription());
+    nodeSystemInfo->AddAttribute(_T("description"), wxGetOsDescription());
 
     return true;
 }
 
     return true;
 }
@@ -371,7 +371,7 @@ bool wxDebugReport::DoAddLoadedModules(wxXmlNode *nodeModules)
         if ( path.empty() )
             path = info.GetName();
         if ( !path.empty() )
         if ( path.empty() )
             path = info.GetName();
         if ( !path.empty() )
-            nodeModule->AddProperty(_T("path"), path);
+            nodeModule->AddAttribute(_T("path"), path);
 
         void *addr = NULL;
         size_t len = 0;
 
         void *addr = NULL;
         size_t len = 0;
@@ -384,7 +384,7 @@ bool wxDebugReport::DoAddLoadedModules(wxXmlNode *nodeModules)
         wxString ver = info.GetVersion();
         if ( !ver.empty() )
         {
         wxString ver = info.GetVersion();
         if ( !ver.empty() )
         {
-            nodeModule->AddProperty(_T("version"), ver);
+            nodeModule->AddAttribute(_T("version"), ver);
         }
     }
 
         }
     }
 
@@ -402,7 +402,7 @@ bool wxDebugReport::DoAddExceptionInfo(wxXmlNode *nodeContext)
     nodeContext->AddChild(nodeExc);
 
     HexProperty(nodeExc, _T("code"), c.code);
     nodeContext->AddChild(nodeExc);
 
     HexProperty(nodeExc, _T("code"), c.code);
-    nodeExc->AddProperty(_T("name"), c.GetExceptionString());
+    nodeExc->AddAttribute(_T("name"), c.GetExceptionString());
     HexProperty(nodeExc, _T("address"), wxPtrToUInt(c.addr));
 
 #ifdef __INTEL__
     HexProperty(nodeExc, _T("address"), wxPtrToUInt(c.addr));
 
 #ifdef __INTEL__
@@ -445,8 +445,8 @@ bool wxDebugReport::AddContext(wxDebugReport::Context ctx)
     wxXmlDocument xmldoc;
     wxXmlNode *nodeRoot = new wxXmlNode(wxXML_ELEMENT_NODE, _T("report"));
     xmldoc.SetRoot(nodeRoot);
     wxXmlDocument xmldoc;
     wxXmlNode *nodeRoot = new wxXmlNode(wxXML_ELEMENT_NODE, _T("report"));
     xmldoc.SetRoot(nodeRoot);
-    nodeRoot->AddProperty(_T("version"), _T("1.0"));
-    nodeRoot->AddProperty(_T("kind"), ctx == Context_Current ? _T("user")
+    nodeRoot->AddAttribute(_T("version"), _T("1.0"));
+    nodeRoot->AddAttribute(_T("kind"), ctx == Context_Current ? _T("user")
                                                              : _T("exception"));
 
     // add system information
                                                              : _T("exception"));
 
     // add system information
index ed5039461b1a8d4f2e01f0647db27c080d7c4bfd..dae1f64ebab214b4486f9944440ee08eeb1e73d5 100644 (file)
@@ -94,7 +94,7 @@ void wxXmlWriter::DoBeginWriteTopLevelEntry( const wxString &name )
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("entry"));
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("entry"));
-    pnode->AddProperty(wxString(wxT("name")), name);
+    pnode->AddAttribute(wxString(wxT("name")), name);
     m_data->m_current->AddChild(pnode) ;
     m_data->Push( pnode ) ;
 }
     m_data->m_current->AddChild(pnode) ;
     m_data->Push( pnode ) ;
 }
@@ -108,12 +108,12 @@ void wxXmlWriter::DoBeginWriteObject(const wxObject *WXUNUSED(object), const wxC
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
-    pnode->AddProperty(wxT("class"), wxString(classInfo->GetClassName()));
-    pnode->AddProperty(wxT("id"), wxString::Format( wxT("%d") , objectID ) );
+    pnode->AddAttribute(wxT("class"), wxString(classInfo->GetClassName()));
+    pnode->AddAttribute(wxT("id"), wxString::Format( wxT("%d") , objectID ) );
 
     for ( size_t i = 0 ; i < metadata.GetCount() ; ++i )
     {
 
     for ( size_t i = 0 ; i < metadata.GetCount() ; ++i )
     {
-        pnode->AddProperty( metadata[i].GetName() , metadata[i].GetAsString() ) ;
+        pnode->AddAttribute( metadata[i].GetName() , metadata[i].GetAsString() ) ;
     }
     m_data->m_current->AddChild(pnode) ;
     m_data->Push( pnode ) ;
     }
     m_data->m_current->AddChild(pnode) ;
     m_data->Push( pnode ) ;
@@ -148,7 +148,7 @@ void wxXmlWriter::DoBeginWriteProperty(const wxPropertyInfo *pi )
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("prop") );
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("prop") );
-    pnode->AddProperty(wxT("name"), pi->GetName() );
+    pnode->AddAttribute(wxT("name"), pi->GetName() );
     m_data->m_current->AddChild(pnode) ;
     m_data->Push( pnode ) ;
 }
     m_data->m_current->AddChild(pnode) ;
     m_data->Push( pnode ) ;
 }
@@ -165,7 +165,7 @@ void wxXmlWriter::DoWriteRepeatedObject( int objectID )
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
 {
     wxXmlNode *pnode;
     pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
-    pnode->AddProperty(wxString(wxT("href")), wxString::Format( wxT("%d") , objectID ) );
+    pnode->AddAttribute(wxString(wxT("href")), wxString::Format( wxT("%d") , objectID ) );
     m_data->m_current->AddChild(pnode) ;
 }
 
     m_data->m_current->AddChild(pnode) ;
 }
 
@@ -220,7 +220,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
     if (!children)
     {
         // check for a null object or href
     if (!children)
     {
         // check for a null object or href
-        if (node->GetPropVal(wxT("href") , &ObjectIdString ) )
+        if (node->GetAttribute(wxT("href") , &ObjectIdString ) )
         {
             objectID = atoi( ObjectIdString.ToAscii() ) ;
             if ( HasObjectClassInfo( objectID ) )
         {
             objectID = atoi( ObjectIdString.ToAscii() ) ;
             if ( HasObjectClassInfo( objectID ) )
@@ -233,12 +233,12 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
                 return wxInvalidObjectID ;
             }
         }
                 return wxInvalidObjectID ;
             }
         }
-        if ( !node->GetPropVal(wxT("id") , &ObjectIdString ) )
+        if ( !node->GetAttribute(wxT("id") , &ObjectIdString ) )
         {
             return wxNullObjectID;
         }
     }
         {
             return wxNullObjectID;
         }
     }
-    if (!node->GetPropVal(wxT("class"), &className))
+    if (!node->GetAttribute(wxT("class"), &className))
     {
         // No class name.  Eek. FIXME: error handling
         return wxInvalidObjectID;
     {
         // No class name.  Eek. FIXME: error handling
         return wxInvalidObjectID;
@@ -255,7 +255,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
         wxLogError(_("objects cannot have XML Text Nodes") ) ;
         return wxInvalidObjectID;
     }
         wxLogError(_("objects cannot have XML Text Nodes") ) ;
         return wxInvalidObjectID;
     }
-    if (!node->GetPropVal(wxT("id"), &ObjectIdString))
+    if (!node->GetAttribute(wxT("id"), &ObjectIdString))
     {
         wxLogError(_("Objects must have an id attribute") ) ;
         // No object id.  Eek. FIXME: error handling
     {
         wxLogError(_("Objects must have an id attribute") ) ;
         // No object id.  Eek. FIXME: error handling
@@ -274,7 +274,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
     SetObjectClassInfo( objectID , classInfo ) ;
 
     wxxVariantArray metadata ;
     SetObjectClassInfo( objectID , classInfo ) ;
 
     wxxVariantArray metadata ;
-    wxXmlProperty *xp = node->GetProperties() ;
+    wxXmlAttribute *xp = node->GetAttributes() ;
     while ( xp )
     {
         if ( xp->GetName() != wxString(wxT("class")) && xp->GetName() != wxString(wxT("id")) )
     while ( xp )
     {
         if ( xp->GetName() != wxString(wxT("class")) && xp->GetName() != wxString(wxT("id")) )
@@ -305,7 +305,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
     while( children )
     {
         wxString name ;
     while( children )
     {
         wxString name ;
-        children->GetPropVal( wxT("name") , &name ) ;
+        children->GetAttribute( wxT("name") , &name ) ;
         propertyNames.push_back( (const wxChar*)name.c_str() ) ;
         propertyNodes[(const wxChar*)name.c_str()] = children->GetChildren() ;
         children = children->GetNext() ;
         propertyNames.push_back( (const wxChar*)name.c_str() ) ;
         propertyNodes[(const wxChar*)name.c_str()] = children->GetChildren() ;
         children = children->GetNext() ;
@@ -525,7 +525,7 @@ int wxXmlReader::ReadObject( const wxString &name , wxDepersister *callbacks)
     while ( iter )
     {
         wxString entryName ;
     while ( iter )
     {
         wxString entryName ;
-        if ( iter->GetPropVal(wxT("name"), &entryName) )
+        if ( iter->GetAttribute(wxT("name"), &entryName) )
         {
             if ( entryName == name )
                 return ReadComponent( iter->GetChildren() , callbacks ) ;
         {
             if ( entryName == name )
                 return ReadComponent( iter->GetChildren() , callbacks ) ;
index 620f6fd6dfa18f654333fc7a587a52a0e0a6717a..c5759c78cc03cc1bfe1044602cabdfc4a2f4abef 100644 (file)
@@ -101,7 +101,7 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
 
     if (name == wxT("paragraphlayout"))
     {
 
     if (name == wxT("paragraphlayout"))
     {
-        wxString partial = node->GetPropVal(wxT("partialparagraph"), wxEmptyString);
+        wxString partial = node->GetAttribute(wxT("partialparagraph"), wxEmptyString);
         if (partial == wxT("true"))
             buffer->SetPartialParagraph(true);
     }
         if (partial == wxT("true"))
             buffer->SetPartialParagraph(true);
     }
@@ -173,7 +173,7 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
             else if (childName == wxT("image"))
             {
                 int imageType = wxBITMAP_TYPE_PNG;
             else if (childName == wxT("image"))
             {
                 int imageType = wxBITMAP_TYPE_PNG;
-                wxString value = node->GetPropVal(wxT("imagetype"), wxEmptyString);
+                wxString value = node->GetAttribute(wxT("imagetype"), wxEmptyString);
                 if (!value.empty())
                     imageType = wxAtoi(value);
 
                 if (!value.empty())
                     imageType = wxAtoi(value);
 
@@ -217,8 +217,8 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
         if (GetFlags() & wxRICHTEXT_HANDLER_INCLUDE_STYLESHEET)
         {
             wxRichTextStyleSheet* sheet = new wxRichTextStyleSheet;
         if (GetFlags() & wxRICHTEXT_HANDLER_INCLUDE_STYLESHEET)
         {
             wxRichTextStyleSheet* sheet = new wxRichTextStyleSheet;
-            wxString sheetName = node->GetPropVal(wxT("name"), wxEmptyString);
-            wxString sheetDescription = node->GetPropVal(wxT("description"), wxEmptyString);
+            wxString sheetName = node->GetAttribute(wxT("name"), wxEmptyString);
+            wxString sheetDescription = node->GetAttribute(wxT("description"), wxEmptyString);
             sheet->SetName(sheetName);
             sheet->SetDescription(sheetDescription);
 
             sheet->SetName(sheetName);
             sheet->SetDescription(sheetDescription);
 
@@ -254,8 +254,8 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
 bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wxXmlNode* node)
 {
     wxString styleType = node->GetName();
 bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wxXmlNode* node)
 {
     wxString styleType = node->GetName();
-    wxString styleName = node->GetPropVal(wxT("name"), wxEmptyString);
-    wxString baseStyleName = node->GetPropVal(wxT("basestyle"), wxEmptyString);
+    wxString styleName = node->GetAttribute(wxT("name"), wxEmptyString);
+    wxString baseStyleName = node->GetAttribute(wxT("basestyle"), wxEmptyString);
 
     if (styleName.IsEmpty())
         return false;
 
     if (styleName.IsEmpty())
         return false;
@@ -283,7 +283,7 @@ bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wx
     {
         wxRichTextParagraphStyleDefinition* def = new wxRichTextParagraphStyleDefinition(styleName);
 
     {
         wxRichTextParagraphStyleDefinition* def = new wxRichTextParagraphStyleDefinition(styleName);
 
-        wxString nextStyleName = node->GetPropVal(wxT("nextstyle"), wxEmptyString);
+        wxString nextStyleName = node->GetAttribute(wxT("nextstyle"), wxEmptyString);
         def->SetNextStyle(nextStyleName);
         def->SetBaseStyle(baseStyleName);
 
         def->SetNextStyle(nextStyleName);
         def->SetBaseStyle(baseStyleName);
 
@@ -305,7 +305,7 @@ bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wx
     {
         wxRichTextListStyleDefinition* def = new wxRichTextListStyleDefinition(styleName);
 
     {
         wxRichTextListStyleDefinition* def = new wxRichTextListStyleDefinition(styleName);
 
-        wxString nextStyleName = node->GetPropVal(wxT("nextstyle"), wxEmptyString);
+        wxString nextStyleName = node->GetAttribute(wxT("nextstyle"), wxEmptyString);
         def->SetNextStyle(nextStyleName);
         def->SetBaseStyle(baseStyleName);
 
         def->SetNextStyle(nextStyleName);
         def->SetBaseStyle(baseStyleName);
 
@@ -317,7 +317,7 @@ bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wx
                 wxTextAttrEx attr;
                 GetStyle(attr, child, false);
 
                 wxTextAttrEx attr;
                 GetStyle(attr, child, false);
 
-                wxString styleLevel = child->GetPropVal(wxT("level"), wxEmptyString);
+                wxString styleLevel = child->GetAttribute(wxT("level"), wxEmptyString);
                 if (styleLevel.IsEmpty())
                 {
                     def->SetStyle(attr);
                 if (styleLevel.IsEmpty())
                 {
                     def->SetStyle(attr);
@@ -1020,37 +1020,37 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
 
     int fontFlags = 0;
 
 
     int fontFlags = 0;
 
-    fontFacename = node->GetPropVal(wxT("fontface"), wxEmptyString);
+    fontFacename = node->GetAttribute(wxT("fontface"), wxEmptyString);
     if (!fontFacename.IsEmpty())
         fontFlags |= wxTEXT_ATTR_FONT_FACE;
 
     wxString value;
     if (!fontFacename.IsEmpty())
         fontFlags |= wxTEXT_ATTR_FONT_FACE;
 
     wxString value;
-    //value = node->GetPropVal(wxT("fontfamily"), wxEmptyString);
+    //value = node->GetAttribute(wxT("fontfamily"), wxEmptyString);
     //if (!value.empty())
     //    fontFamily = wxAtoi(value);
 
     //if (!value.empty())
     //    fontFamily = wxAtoi(value);
 
-    value = node->GetPropVal(wxT("fontstyle"), wxEmptyString);
+    value = node->GetAttribute(wxT("fontstyle"), wxEmptyString);
     if (!value.empty())
     {
         fontStyle = wxAtoi(value);
         fontFlags |= wxTEXT_ATTR_FONT_ITALIC;
     }
 
     if (!value.empty())
     {
         fontStyle = wxAtoi(value);
         fontFlags |= wxTEXT_ATTR_FONT_ITALIC;
     }
 
-    value = node->GetPropVal(wxT("fontsize"), wxEmptyString);
+    value = node->GetAttribute(wxT("fontsize"), wxEmptyString);
     if (!value.empty())
     {
         fontSize = wxAtoi(value);
         fontFlags |= wxTEXT_ATTR_FONT_SIZE;
     }
 
     if (!value.empty())
     {
         fontSize = wxAtoi(value);
         fontFlags |= wxTEXT_ATTR_FONT_SIZE;
     }
 
-    value = node->GetPropVal(wxT("fontweight"), wxEmptyString);
+    value = node->GetAttribute(wxT("fontweight"), wxEmptyString);
     if (!value.empty())
     {
         fontWeight = wxAtoi(value);
         fontFlags |= wxTEXT_ATTR_FONT_WEIGHT;
     }
 
     if (!value.empty())
     {
         fontWeight = wxAtoi(value);
         fontFlags |= wxTEXT_ATTR_FONT_WEIGHT;
     }
 
-    value = node->GetPropVal(wxT("fontunderlined"), wxEmptyString);
+    value = node->GetAttribute(wxT("fontunderlined"), wxEmptyString);
     if (!value.empty())
     {
         fontUnderlined = wxAtoi(value) != 0;
     if (!value.empty())
     {
         fontUnderlined = wxAtoi(value) != 0;
@@ -1065,7 +1065,7 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
     // Restore correct font flags
     attr.SetFlags(fontFlags);
 
     // Restore correct font flags
     attr.SetFlags(fontFlags);
 
-    value = node->GetPropVal(wxT("textcolor"), wxEmptyString);
+    value = node->GetAttribute(wxT("textcolor"), wxEmptyString);
     if (!value.empty())
     {
         if (value[0] == wxT('#'))
     if (!value.empty())
     {
         if (value[0] == wxT('#'))
@@ -1074,7 +1074,7 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
             attr.SetTextColour(value);
     }
 
             attr.SetTextColour(value);
     }
 
-    value = node->GetPropVal(wxT("backgroundcolor"), wxEmptyString);
+    value = node->GetAttribute(wxT("backgroundcolor"), wxEmptyString);
     if (!value.empty())
     {
         if (value[0] == wxT('#'))
     if (!value.empty())
     {
         if (value[0] == wxT('#'))
@@ -1083,17 +1083,17 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
             attr.SetBackgroundColour(value);
     }
 
             attr.SetBackgroundColour(value);
     }
 
-    value = node->GetPropVal(wxT("characterstyle"), wxEmptyString);
+    value = node->GetAttribute(wxT("characterstyle"), wxEmptyString);
     if (!value.empty())
         attr.SetCharacterStyleName(value);
 
     if (!value.empty())
         attr.SetCharacterStyleName(value);
 
-    value = node->GetPropVal(wxT("texteffects"), wxEmptyString);
+    value = node->GetAttribute(wxT("texteffects"), wxEmptyString);
     if (!value.IsEmpty())
     {
         attr.SetTextEffects(wxAtoi(value));
     }
 
     if (!value.IsEmpty())
     {
         attr.SetTextEffects(wxAtoi(value));
     }
 
-    value = node->GetPropVal(wxT("texteffectflags"), wxEmptyString);
+    value = node->GetAttribute(wxT("texteffectflags"), wxEmptyString);
     if (!value.IsEmpty())
     {
         attr.SetTextEffectFlags(wxAtoi(value));
     if (!value.IsEmpty())
     {
         attr.SetTextEffectFlags(wxAtoi(value));
@@ -1102,7 +1102,7 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
     // Set paragraph attributes
     if (isPara)
     {
     // Set paragraph attributes
     if (isPara)
     {
-        value = node->GetPropVal(wxT("alignment"), wxEmptyString);
+        value = node->GetAttribute(wxT("alignment"), wxEmptyString);
         if (!value.empty())
             attr.SetAlignment((wxTextAttrAlignment) wxAtoi(value));
 
         if (!value.empty())
             attr.SetAlignment((wxTextAttrAlignment) wxAtoi(value));
 
@@ -1110,14 +1110,14 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
         int leftIndent = 0;
         bool hasLeftIndent = false;
 
         int leftIndent = 0;
         bool hasLeftIndent = false;
 
-        value = node->GetPropVal(wxT("leftindent"), wxEmptyString);
+        value = node->GetAttribute(wxT("leftindent"), wxEmptyString);
         if (!value.empty())
         {
             leftIndent = wxAtoi(value);
             hasLeftIndent = true;
         }
 
         if (!value.empty())
         {
             leftIndent = wxAtoi(value);
             hasLeftIndent = true;
         }
 
-        value = node->GetPropVal(wxT("leftsubindent"), wxEmptyString);
+        value = node->GetAttribute(wxT("leftsubindent"), wxEmptyString);
         if (!value.empty())
         {
             leftSubIndent = wxAtoi(value);
         if (!value.empty())
         {
             leftSubIndent = wxAtoi(value);
@@ -1127,31 +1127,31 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
         if (hasLeftIndent)
             attr.SetLeftIndent(leftIndent, leftSubIndent);
 
         if (hasLeftIndent)
             attr.SetLeftIndent(leftIndent, leftSubIndent);
 
-        value = node->GetPropVal(wxT("rightindent"), wxEmptyString);
+        value = node->GetAttribute(wxT("rightindent"), wxEmptyString);
         if (!value.empty())
             attr.SetRightIndent(wxAtoi(value));
 
         if (!value.empty())
             attr.SetRightIndent(wxAtoi(value));
 
-        value = node->GetPropVal(wxT("parspacingbefore"), wxEmptyString);
+        value = node->GetAttribute(wxT("parspacingbefore"), wxEmptyString);
         if (!value.empty())
             attr.SetParagraphSpacingBefore(wxAtoi(value));
 
         if (!value.empty())
             attr.SetParagraphSpacingBefore(wxAtoi(value));
 
-        value = node->GetPropVal(wxT("parspacingafter"), wxEmptyString);
+        value = node->GetAttribute(wxT("parspacingafter"), wxEmptyString);
         if (!value.empty())
             attr.SetParagraphSpacingAfter(wxAtoi(value));
 
         if (!value.empty())
             attr.SetParagraphSpacingAfter(wxAtoi(value));
 
-        value = node->GetPropVal(wxT("linespacing"), wxEmptyString);
+        value = node->GetAttribute(wxT("linespacing"), wxEmptyString);
         if (!value.empty())
             attr.SetLineSpacing(wxAtoi(value));
 
         if (!value.empty())
             attr.SetLineSpacing(wxAtoi(value));
 
-        value = node->GetPropVal(wxT("bulletstyle"), wxEmptyString);
+        value = node->GetAttribute(wxT("bulletstyle"), wxEmptyString);
         if (!value.empty())
             attr.SetBulletStyle(wxAtoi(value));
 
         if (!value.empty())
             attr.SetBulletStyle(wxAtoi(value));
 
-        value = node->GetPropVal(wxT("bulletnumber"), wxEmptyString);
+        value = node->GetAttribute(wxT("bulletnumber"), wxEmptyString);
         if (!value.empty())
             attr.SetBulletNumber(wxAtoi(value));
 
         if (!value.empty())
             attr.SetBulletNumber(wxAtoi(value));
 
-        value = node->GetPropVal(wxT("bulletsymbol"), wxEmptyString);
+        value = node->GetAttribute(wxT("bulletsymbol"), wxEmptyString);
         if (!value.empty())
         {
             wxChar ch = wxAtoi(value);
         if (!value.empty())
         {
             wxChar ch = wxAtoi(value);
@@ -1160,31 +1160,31 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
             attr.SetBulletText(s);
         }
 
             attr.SetBulletText(s);
         }
 
-        value = node->GetPropVal(wxT("bullettext"), wxEmptyString);
+        value = node->GetAttribute(wxT("bullettext"), wxEmptyString);
         if (!value.empty())
             attr.SetBulletText(value);
 
         if (!value.empty())
             attr.SetBulletText(value);
 
-        value = node->GetPropVal(wxT("bulletfont"), wxEmptyString);
+        value = node->GetAttribute(wxT("bulletfont"), wxEmptyString);
         if (!value.empty())
             attr.SetBulletFont(value);
 
         if (!value.empty())
             attr.SetBulletFont(value);
 
-        value = node->GetPropVal(wxT("bulletname"), wxEmptyString);
+        value = node->GetAttribute(wxT("bulletname"), wxEmptyString);
         if (!value.empty())
             attr.SetBulletName(value);
 
         if (!value.empty())
             attr.SetBulletName(value);
 
-        value = node->GetPropVal(wxT("url"), wxEmptyString);
+        value = node->GetAttribute(wxT("url"), wxEmptyString);
         if (!value.empty())
             attr.SetURL(value);
 
         if (!value.empty())
             attr.SetURL(value);
 
-        value = node->GetPropVal(wxT("parstyle"), wxEmptyString);
+        value = node->GetAttribute(wxT("parstyle"), wxEmptyString);
         if (!value.empty())
             attr.SetParagraphStyleName(value);
 
         if (!value.empty())
             attr.SetParagraphStyleName(value);
 
-        value = node->GetPropVal(wxT("liststyle"), wxEmptyString);
+        value = node->GetAttribute(wxT("liststyle"), wxEmptyString);
         if (!value.empty())
             attr.SetListStyleName(value);
 
         if (!value.empty())
             attr.SetListStyleName(value);
 
-        value = node->GetPropVal(wxT("tabs"), wxEmptyString);
+        value = node->GetAttribute(wxT("tabs"), wxEmptyString);
         if (!value.empty())
         {
             wxArrayInt tabs;
         if (!value.empty())
         {
             wxArrayInt tabs;
@@ -1197,13 +1197,13 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
             attr.SetTabs(tabs);
         }
 
             attr.SetTabs(tabs);
         }
 
-        value = node->GetPropVal(wxT("pagebreak"), wxEmptyString);
+        value = node->GetAttribute(wxT("pagebreak"), wxEmptyString);
         if (!value.IsEmpty())
         {
             attr.SetPageBreak(wxAtoi(value) != 0);
         }
 
         if (!value.IsEmpty())
         {
             attr.SetPageBreak(wxAtoi(value) != 0);
         }
 
-        value = node->GetPropVal(wxT("outlinelevel"), wxEmptyString);
+        value = node->GetAttribute(wxT("outlinelevel"), wxEmptyString);
         if (!value.IsEmpty())
         {
             attr.SetOutlineLevel(wxAtoi(value) != 0);
         if (!value.IsEmpty())
         {
             attr.SetOutlineLevel(wxAtoi(value) != 0);
index 16ced8c8f6a34480467b2ff68317b32ffba3486a..a35d73b26789c65833b0937dd9d6e4859e58ca1f 100644 (file)
@@ -49,9 +49,9 @@ static bool wxIsWhiteOnly(const wxString& buf);
 
 wxXmlNode::wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
                      const wxString& name, const wxString& content,
 
 wxXmlNode::wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
                      const wxString& name, const wxString& content,
-                     wxXmlProperty *props, wxXmlNode *next)
+                     wxXmlAttribute *attrs, wxXmlNode *next)
     : m_type(type), m_name(name), m_content(content),
     : m_type(type), m_name(name), m_content(content),
-      m_properties(props), m_parent(parent),
+      m_attrs(attrs), m_parent(parent),
       m_children(NULL), m_next(next)
 {
     if (m_parent)
       m_children(NULL), m_next(next)
 {
     if (m_parent)
@@ -69,7 +69,7 @@ wxXmlNode::wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
 wxXmlNode::wxXmlNode(wxXmlNodeType type, const wxString& name,
                      const wxString& content)
     : m_type(type), m_name(name), m_content(content),
 wxXmlNode::wxXmlNode(wxXmlNodeType type, const wxString& name,
                      const wxString& content)
     : m_type(type), m_name(name), m_content(content),
-      m_properties(NULL), m_parent(NULL),
+      m_attrs(NULL), m_parent(NULL),
       m_children(NULL), m_next(NULL)
 {}
 
       m_children(NULL), m_next(NULL)
 {}
 
@@ -89,8 +89,8 @@ wxXmlNode::~wxXmlNode()
         delete c;
     }
 
         delete c;
     }
 
-    wxXmlProperty *p, *p2;
-    for (p = m_properties; p; p = p2)
+    wxXmlAttribute *p, *p2;
+    for (p = m_attrs; p; p = p2)
     {
         p2 = p->GetNext();
         delete p;
     {
         p2 = p->GetNext();
         delete p;
@@ -99,7 +99,7 @@ wxXmlNode::~wxXmlNode()
 
 wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
 {
 
 wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
 {
-    wxDELETE(m_properties);
+    wxDELETE(m_attrs);
     wxDELETE(m_children);
     DoCopy(node);
     return *this;
     wxDELETE(m_children);
     DoCopy(node);
     return *this;
@@ -119,49 +119,49 @@ void wxXmlNode::DoCopy(const wxXmlNode& node)
         n = n->GetNext();
     }
 
         n = n->GetNext();
     }
 
-    m_properties = NULL;
-    wxXmlProperty *p = node.m_properties;
+    m_attrs = NULL;
+    wxXmlAttribute *p = node.m_attrs;
     while (p)
     {
     while (p)
     {
-       AddProperty(p->GetName(), p->GetValue());
+       AddAttribute(p->GetName(), p->GetValue());
        p = p->GetNext();
     }
 }
 
        p = p->GetNext();
     }
 }
 
-bool wxXmlNode::HasProp(const wxString& propName) const
+bool wxXmlNode::HasAttribute(const wxString& attrName) const
 {
 {
-    wxXmlProperty *prop = GetProperties();
+    wxXmlAttribute *attr = GetAttributes();
 
 
-    while (prop)
+    while (attr)
     {
     {
-        if (prop->GetName() == propName) return true;
-        prop = prop->GetNext();
+        if (attr->GetName() == attrName) return true;
+        attr = attr->GetNext();
     }
 
     return false;
 }
 
     }
 
     return false;
 }
 
-bool wxXmlNode::GetPropVal(const wxString& propName, wxString *value) const
+bool wxXmlNode::GetAttribute(const wxString& attrName, wxString *value) const
 {
 {
-    wxXmlProperty *prop = GetProperties();
+    wxXmlAttribute *attr = GetAttributes();
 
 
-    while (prop)
+    while (attr)
     {
     {
-        if (prop->GetName() == propName)
+        if (attr->GetName() == attrName)
         {
         {
-            *value = prop->GetValue();
+            *value = attr->GetValue();
             return true;
         }
             return true;
         }
-        prop = prop->GetNext();
+        attr = attr->GetNext();
     }
 
     return false;
 }
 
     }
 
     return false;
 }
 
-wxString wxXmlNode::GetPropVal(const wxString& propName, const wxString& defaultVal) const
+wxString wxXmlNode::GetAttribute(const wxString& attrName, const wxString& defaultVal) const
 {
     wxString tmp;
 {
     wxString tmp;
-    if (GetPropVal(propName, &tmp))
+    if (GetAttribute(attrName, &tmp))
         return tmp;
 
     return defaultVal;
         return tmp;
 
     return defaultVal;
@@ -248,48 +248,48 @@ bool wxXmlNode::RemoveChild(wxXmlNode *child)
 
 void wxXmlNode::AddProperty(const wxString& name, const wxString& value)
 {
 
 void wxXmlNode::AddProperty(const wxString& name, const wxString& value)
 {
-    AddProperty(new wxXmlProperty(name, value, NULL));
+    AddProperty(new wxXmlAttribute(name, value, NULL));
 }
 
 }
 
-void wxXmlNode::AddProperty(wxXmlProperty *prop)
+void wxXmlNode::AddProperty(wxXmlAttribute *attr)
 {
 {
-    if (m_properties == NULL)
-        m_properties = prop;
+    if (m_attrs == NULL)
+        m_attrs = attr;
     else
     {
     else
     {
-        wxXmlProperty *p = m_properties;
+        wxXmlAttribute *p = m_attrs;
         while (p->GetNext()) p = p->GetNext();
         while (p->GetNext()) p = p->GetNext();
-        p->SetNext(prop);
+        p->SetNext(attr);
     }
 }
 
 bool wxXmlNode::DeleteProperty(const wxString& name)
 {
     }
 }
 
 bool wxXmlNode::DeleteProperty(const wxString& name)
 {
-    wxXmlProperty *prop;
+    wxXmlAttribute *attr;
 
 
-    if (m_properties == NULL)
+    if (m_attrs == NULL)
         return false;
 
         return false;
 
-    else if (m_properties->GetName() == name)
+    else if (m_attrs->GetName() == name)
     {
     {
-        prop = m_properties;
-        m_properties = prop->GetNext();
-        prop->SetNext(NULL);
-        delete prop;
+        attr = m_attrs;
+        m_attrs = attr->GetNext();
+        attr->SetNext(NULL);
+        delete attr;
         return true;
     }
 
     else
     {
         return true;
     }
 
     else
     {
-        wxXmlProperty *p = m_properties;
+        wxXmlAttribute *p = m_attrs;
         while (p->GetNext())
         {
             if (p->GetNext()->GetName() == name)
             {
         while (p->GetNext())
         {
             if (p->GetNext()->GetName() == name)
             {
-                prop = p->GetNext();
-                p->SetNext(prop->GetNext());
-                prop->SetNext(NULL);
-                delete prop;
+                attr = p->GetNext();
+                p->SetNext(attr->GetNext());
+                attr->SetNext(NULL);
+                delete attr;
                 return true;
             }
             p = p->GetNext();
                 return true;
             }
             p = p->GetNext();
@@ -469,7 +469,7 @@ static void StartElementHnd(void *userData, const char *name, const char **atts)
     const char **a = atts;
     while (*a)
     {
     const char **a = atts;
     while (*a)
     {
-        node->AddProperty(CharToString(ctx->conv, a[0]), CharToString(ctx->conv, a[1]));
+        node->AddAttribute(CharToString(ctx->conv, a[0]), CharToString(ctx->conv, a[1]));
         a += 2;
     }
     if (ctx->root == NULL)
         a += 2;
     }
     if (ctx->root == NULL)
@@ -750,7 +750,7 @@ static void OutputNode(wxOutputStream& stream, wxXmlNode *node, int indent,
                        wxMBConv *convMem, wxMBConv *convFile, int indentstep)
 {
     wxXmlNode *n, *prev;
                        wxMBConv *convMem, wxMBConv *convFile, int indentstep)
 {
     wxXmlNode *n, *prev;
-    wxXmlProperty *prop;
+    wxXmlAttribute *attr;
 
     switch (node->GetType())
     {
 
     switch (node->GetType())
     {
@@ -768,14 +768,14 @@ static void OutputNode(wxOutputStream& stream, wxXmlNode *node, int indent,
             OutputString(stream, wxT("<"));
             OutputString(stream, node->GetName());
 
             OutputString(stream, wxT("<"));
             OutputString(stream, node->GetName());
 
-            prop = node->GetProperties();
-            while (prop)
+            attr = node->GetAttributes();
+            while (attr)
             {
             {
-                OutputString(stream, wxT(" ") + prop->GetName() +  wxT("=\""));
-                OutputStringEnt(stream, prop->GetValue(), convMem, convFile,
+                OutputString(stream, wxT(" ") + attr->GetName() +  wxT("=\""));
+                OutputStringEnt(stream, attr->GetValue(), convMem, convFile,
                                 XML_ESCAPE_QUOTES);
                 OutputString(stream, wxT("\""));
                                 XML_ESCAPE_QUOTES);
                 OutputString(stream, wxT("\""));
-                prop = prop->GetNext();
+                attr = attr->GetNext();
             }
 
             if (node->GetChildren())
             }
 
             if (node->GetChildren())
index d4c97f998f4970cd108790aa939a822d70765843..a633b112a9a62498f88981f61d52784099862470 100644 (file)
@@ -72,7 +72,7 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
                { n = n->GetNext(); continue; }
 
             // checking boolean is a bit ugly here (see GetBool() )
                { n = n->GetNext(); continue; }
 
             // checking boolean is a bit ugly here (see GetBool() )
-            wxString v = n->GetPropVal(wxT("checked"), wxEmptyString);
+            wxString v = n->GetAttribute(wxT("checked"), wxEmptyString);
             v.MakeLower();
             if (v == wxT("1"))
                 control->Check( i, true );
             v.MakeLower();
             if (v == wxT("1"))
                 control->Check( i, true );
index 3093395902db113df23c1d312d01b013be975933..fa4503ff6400cfb8efb5b79d79186e13eed0c263 100644 (file)
@@ -103,12 +103,12 @@ bool wxOwnerDrawnComboBoxXmlHandler::CanHandle(wxXmlNode *node)
 #else
 
 //  Avoid GCC bug - this fails on certain GCC 3.3 and 3.4 builds for an unknown reason
 #else
 
 //  Avoid GCC bug - this fails on certain GCC 3.3 and 3.4 builds for an unknown reason
-//  it is believed to be related to the fact IsOfClass is inline, and node->GetPropVal
+//  it is believed to be related to the fact IsOfClass is inline, and node->GetAttribute
 //  gets passed an invalid "this" pointer. On 2.7, the function is out of line, so the
 //  above should work fine. This code is left in here so this file can easily be used
 //  in a version backported to 2.6. All we are doing here is expanding the macro
 
 //  gets passed an invalid "this" pointer. On 2.7, the function is out of line, so the
 //  above should work fine. This code is left in here so this file can easily be used
 //  in a version backported to 2.6. All we are doing here is expanding the macro
 
-    bool fOurClass = node->GetPropVal(wxT("class"), wxEmptyString) == wxT("wxOwnerDrawnComboBox");
+    bool fOurClass = node->GetAttribute(wxT("class"), wxEmptyString) == wxT("wxOwnerDrawnComboBox");
     return (fOurClass ||
           (m_insideBox && node->GetName() == wxT("item")));
 #endif
     return (fOurClass ||
           (m_insideBox && node->GetName() == wxT("item")));
 #endif
index 5cf6472c5beb0e0c1363902f7f44646d4cffd29d..dbbf54b5e450b55e82489f4f3bb01d3f605030f0 100644 (file)
@@ -109,10 +109,10 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
         wxString str = GetNodeContent(m_node);
 
         wxString tooltip;
         wxString str = GetNodeContent(m_node);
 
         wxString tooltip;
-        m_node->GetPropVal(wxT("tooltip"), &tooltip);
+        m_node->GetAttribute(wxT("tooltip"), &tooltip);
 
         wxString helptext;
 
         wxString helptext;
-        bool hasHelptext = m_node->GetPropVal(wxT("helptext"), &helptext);
+        bool hasHelptext = m_node->GetAttribute(wxT("helptext"), &helptext);
 
         if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
         {
 
         if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
         {
index af053770ac0b6b883d00ea117cbb4858f23eee45..5a024457b6172dcb15610001966521d480f40c24 100644 (file)
@@ -351,7 +351,7 @@ static void ProcessPlatformProperty(wxXmlNode *node)
     while (c)
     {
         isok = false;
     while (c)
     {
         isok = false;
-        if (!c->GetPropVal(wxT("platform"), &s))
+        if (!c->GetAttribute(wxT("platform"), &s))
             isok = true;
         else
         {
             isok = true;
         else
         {
@@ -481,7 +481,7 @@ bool wxXmlResource::UpdateResources()
             {
                 long version;
                 int v1, v2, v3, v4;
             {
                 long version;
                 int v1, v2, v3, v4;
-                wxString verstr = m_data[i].Doc->GetRoot()->GetPropVal(
+                wxString verstr = m_data[i].Doc->GetRoot()->GetAttribute(
                                       wxT("version"), wxT("0.0.0.0"));
                 if (wxSscanf(verstr.c_str(), wxT("%i.%i.%i.%i"),
                     &v1, &v2, &v3, &v4) == 4)
                                       wxT("version"), wxT("0.0.0.0"));
                 if (wxSscanf(verstr.c_str(), wxT("%i.%i.%i.%i"),
                     &v1, &v2, &v3, &v4) == 4)
@@ -534,20 +534,20 @@ wxXmlNode *wxXmlResource::DoFindResource(wxXmlNode *parent,
         if ( node->GetType() == wxXML_ELEMENT_NODE &&
                  (node->GetName() == wxT("object") ||
                   node->GetName() == wxT("object_ref")) &&
         if ( node->GetType() == wxXML_ELEMENT_NODE &&
                  (node->GetName() == wxT("object") ||
                   node->GetName() == wxT("object_ref")) &&
-             node->GetPropVal(wxT("name"), &dummy) && dummy == name )
+             node->GetAttribute(wxT("name"), &dummy) && dummy == name )
         {
         {
-            wxString cls(node->GetPropVal(wxT("class"), wxEmptyString));
+            wxString cls(node->GetAttribute(wxT("class"), wxEmptyString));
             if (!classname || cls == classname)
                 return node;
             if (!classname || cls == classname)
                 return node;
-            // object_ref may not have 'class' property:
+            // object_ref may not have 'class' attribute:
             if (cls.empty() && node->GetName() == wxT("object_ref"))
             {
             if (cls.empty() && node->GetName() == wxT("object_ref"))
             {
-                wxString refName = node->GetPropVal(wxT("ref"), wxEmptyString);
+                wxString refName = node->GetAttribute(wxT("ref"), wxEmptyString);
                 if (refName.empty())
                     continue;
                 wxXmlNode* refNode = FindResource(refName, wxEmptyString, true);
                 if (refNode &&
                 if (refName.empty())
                     continue;
                 wxXmlNode* refNode = FindResource(refName, wxEmptyString, true);
                 if (refNode &&
-                    refNode->GetPropVal(wxT("class"), wxEmptyString) == classname)
+                    refNode->GetAttribute(wxT("class"), wxEmptyString) == classname)
                 {
                     return node;
                 }
                 {
                     return node;
                 }
@@ -601,34 +601,35 @@ wxXmlNode *wxXmlResource::FindResource(const wxString& name,
 
 static void MergeNodes(wxXmlNode& dest, wxXmlNode& with)
 {
 
 static void MergeNodes(wxXmlNode& dest, wxXmlNode& with)
 {
-    // Merge properties:
-    for (wxXmlProperty *prop = with.GetProperties(); prop; prop = prop->GetNext())
+    // Merge attributes:
+    for ( wxXmlAttribute *attr = with.GetAttributes();
+          attr; attr = attr->GetNext() )
     {
     {
-        wxXmlProperty *dprop;
-        for (dprop = dest.GetProperties(); dprop; dprop = dprop->GetNext())
+        wxXmlAttribute *dattr;
+        for (dattr = dest.GetAttributes(); dattr; dattr = dattr->GetNext())
         {
 
         {
 
-            if ( dprop->GetName() == prop->GetName() )
+            if ( dattr->GetName() == attr->GetName() )
             {
             {
-                dprop->SetValue(prop->GetValue());
+                dattr->SetValue(attr->GetValue());
                 break;
             }
         }
 
                 break;
             }
         }
 
-        if ( !dprop )
-            dest.AddProperty(prop->GetName(), prop->GetValue());
+        if ( !dattr )
+            dest.AddAttribute(attr->GetName(), attr->GetValue());
    }
 
     // Merge child nodes:
     for (wxXmlNode* node = with.GetChildren(); node; node = node->GetNext())
     {
    }
 
     // Merge child nodes:
     for (wxXmlNode* node = with.GetChildren(); node; node = node->GetNext())
     {
-        wxString name = node->GetPropVal(wxT("name"), wxEmptyString);
+        wxString name = node->GetAttribute(wxT("name"), wxEmptyString);
         wxXmlNode *dnode;
 
         for (dnode = dest.GetChildren(); dnode; dnode = dnode->GetNext() )
         {
             if ( dnode->GetName() == node->GetName() &&
         wxXmlNode *dnode;
 
         for (dnode = dest.GetChildren(); dnode; dnode = dnode->GetNext() )
         {
             if ( dnode->GetName() == node->GetName() &&
-                 dnode->GetPropVal(wxT("name"), wxEmptyString) == name &&
+                 dnode->GetAttribute(wxT("name"), wxEmptyString) == name &&
                  dnode->GetType() == node->GetType() )
             {
                 MergeNodes(*dnode, *node);
                  dnode->GetType() == node->GetType() )
             {
                 MergeNodes(*dnode, *node);
@@ -639,7 +640,7 @@ static void MergeNodes(wxXmlNode& dest, wxXmlNode& with)
         if ( !dnode )
         {
             static const wxChar *AT_END = wxT("end");
         if ( !dnode )
         {
             static const wxChar *AT_END = wxT("end");
-            wxString insert_pos = node->GetPropVal(wxT("insert_at"), AT_END);
+            wxString insert_pos = node->GetAttribute(wxT("insert_at"), AT_END);
             if ( insert_pos == AT_END )
             {
                 dest.AddChild(new wxXmlNode(*node));
             if ( insert_pos == AT_END )
             {
                 dest.AddChild(new wxXmlNode(*node));
@@ -664,7 +665,7 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent,
     // handling of referenced resource
     if ( node->GetName() == wxT("object_ref") )
     {
     // handling of referenced resource
     if ( node->GetName() == wxT("object_ref") )
     {
-        wxString refName = node->GetPropVal(wxT("ref"), wxEmptyString);
+        wxString refName = node->GetAttribute(wxT("ref"), wxEmptyString);
         wxXmlNode* refNode = FindResource(refName, wxEmptyString, true);
 
         if ( !refNode )
         wxXmlNode* refNode = FindResource(refName, wxEmptyString, true);
 
         if ( !refNode )
@@ -705,7 +706,7 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent,
 
     wxLogError(_("No handler found for XML node '%s', class '%s'!"),
                node->GetName().c_str(),
 
     wxLogError(_("No handler found for XML node '%s', class '%s'!"),
                node->GetName().c_str(),
-               node->GetPropVal(wxT("class"), wxEmptyString).c_str());
+               node->GetAttribute(wxT("class"), wxEmptyString).c_str());
     return NULL;
 }
 
     return NULL;
 }
 
@@ -759,10 +760,10 @@ wxObject *wxXmlResourceHandler::CreateResource(wxXmlNode *node, wxObject *parent
     wxWindow *myParentAW = m_parentAsWindow;
 
     m_instance = instance;
     wxWindow *myParentAW = m_parentAsWindow;
 
     m_instance = instance;
-    if (!m_instance && node->HasProp(wxT("subclass")) &&
+    if (!m_instance && node->HasAttribute(wxT("subclass")) &&
         !(m_resource->GetFlags() & wxXRC_NO_SUBCLASSING))
     {
         !(m_resource->GetFlags() & wxXRC_NO_SUBCLASSING))
     {
-        wxString subclass = node->GetPropVal(wxT("subclass"), wxEmptyString);
+        wxString subclass = node->GetAttribute(wxT("subclass"), wxEmptyString);
         if (!subclass.empty())
         {
             for (wxXmlSubclassFactoriesList::compatibility_iterator i = wxXmlResource::ms_subclassFactories->GetFirst();
         if (!subclass.empty())
         {
             for (wxXmlSubclassFactoriesList::compatibility_iterator i = wxXmlResource::ms_subclassFactories->GetFirst();
@@ -775,7 +776,7 @@ wxObject *wxXmlResourceHandler::CreateResource(wxXmlNode *node, wxObject *parent
 
             if (!m_instance)
             {
 
             if (!m_instance)
             {
-                wxString name = node->GetPropVal(wxT("name"), wxEmptyString);
+                wxString name = node->GetAttribute(wxT("name"), wxEmptyString);
                 wxLogError(_("Subclass '%s' not found for resource '%s', not subclassing!"),
                            subclass.c_str(), name.c_str());
             }
                 wxLogError(_("Subclass '%s' not found for resource '%s', not subclassing!"),
                            subclass.c_str(), name.c_str());
             }
@@ -783,7 +784,7 @@ wxObject *wxXmlResourceHandler::CreateResource(wxXmlNode *node, wxObject *parent
     }
 
     m_node = node;
     }
 
     m_node = node;
-    m_class = node->GetPropVal(wxT("class"), wxEmptyString);
+    m_class = node->GetAttribute(wxT("class"), wxEmptyString);
     m_parent = parent;
     m_parentAsWindow = wxDynamicCast(m_parent, wxWindow);
 
     m_parent = parent;
     m_parentAsWindow = wxDynamicCast(m_parent, wxWindow);
 
@@ -922,7 +923,7 @@ wxString wxXmlResourceHandler::GetText(const wxString& param, bool translate)
     if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
     {
         if (translate && parNode &&
     if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
     {
         if (translate && parNode &&
-            parNode->GetPropVal(wxT("translate"), wxEmptyString) != wxT("0"))
+            parNode->GetAttribute(wxT("translate"), wxEmptyString) != wxT("0"))
         {
             return wxGetTranslation(str2, m_resource->GetDomain());
         }
         {
             return wxGetTranslation(str2, m_resource->GetDomain());
         }
@@ -986,7 +987,7 @@ int wxXmlResourceHandler::GetID()
 
 wxString wxXmlResourceHandler::GetName()
 {
 
 wxString wxXmlResourceHandler::GetName()
 {
-    return m_node->GetPropVal(wxT("name"), wxT("-1"));
+    return m_node->GetAttribute(wxT("name"), wxT("-1"));
 }
 
 
 }
 
 
@@ -1068,7 +1069,7 @@ wxColour wxXmlResourceHandler::GetColour(const wxString& param, const wxColour&
         if (clr.Ok())
             return clr;
 
         if (clr.Ok())
             return clr;
 
-        wxLogError(_("XRC resource: Incorrect colour specification '%s' for property '%s'."),
+        wxLogError(_("XRC resource: Incorrect colour specification '%s' for attribute '%s'."),
                    v.c_str(), param.c_str());
         return wxNullColour;
     }
                    v.c_str(), param.c_str());
         return wxNullColour;
     }
@@ -1086,10 +1087,10 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
     wxXmlNode *bmpNode = GetParamNode(param);
     if ( bmpNode )
     {
     wxXmlNode *bmpNode = GetParamNode(param);
     if ( bmpNode )
     {
-        wxString sid = bmpNode->GetPropVal(wxT("stock_id"), wxEmptyString);
+        wxString sid = bmpNode->GetAttribute(wxT("stock_id"), wxEmptyString);
         if ( !sid.empty() )
         {
         if ( !sid.empty() )
         {
-            wxString scl = bmpNode->GetPropVal(wxT("stock_client"), wxEmptyString);
+            wxString scl = bmpNode->GetAttribute(wxT("stock_client"), wxEmptyString);
             if (scl.empty())
                 scl = defaultArtClient;
             else
             if (scl.empty())
                 scl = defaultArtClient;
             else
@@ -1195,7 +1196,7 @@ wxXmlNode *wxXmlResourceHandler::GetParamNode(const wxString& param)
 
 bool wxXmlResourceHandler::IsOfClass(wxXmlNode *node, const wxString& classname)
 {
 
 bool wxXmlResourceHandler::IsOfClass(wxXmlNode *node, const wxString& classname)
 {
-    return node->GetPropVal(wxT("class"), wxEmptyString) == classname;
+    return node->GetAttribute(wxT("class"), wxEmptyString) == classname;
 }
 
 
 }
 
 
index 9d740b494726de79f5d14118e39ac7dff7aa15e6..9d7bd03d1437ec0b9a30bad143e976d6523ec649 100644 (file)
@@ -65,8 +65,8 @@ private:
         while (node)
         {
             if (node->GetName() == _T("object")
         while (node)
         {
             if (node->GetName() == _T("object")
-                && node->GetPropVal(_T("class"),&classValue)
-                && node->GetPropVal(_T("name"),&nameValue))
+                && node->GetAttribute(_T("class"),&classValue)
+                && node->GetAttribute(_T("name"),&nameValue))
             {
                 m_wdata.Add(XRCWidgetData(nameValue,classValue));
             }
             {
                 m_wdata.Add(XRCWidgetData(nameValue,classValue));
             }
@@ -409,8 +409,8 @@ wxArrayString XmlResApp::PrepareTempFiles()
                 wxString classValue,nameValue;
                 while(node){
                     if(node->GetName() == _T("object")
                 wxString classValue,nameValue;
                 while(node){
                     if(node->GetName() == _T("object")
-                     && node->GetPropVal(_T("class"),&classValue)
-                     && node->GetPropVal(_T("name"),&nameValue)){
+                     && node->GetAttribute(_T("class"),&classValue)
+                     && node->GetAttribute(_T("name"),&nameValue)){
 
                       aXRCWndClassData.Add(
                         XRCWndClassData(nameValue,classValue,node)
 
                       aXRCWndClassData.Add(
                         XRCWndClassData(nameValue,classValue,node)
@@ -444,7 +444,7 @@ static bool NodeContainsFilename(wxXmlNode *node)
    // wxBitmapButton:
    wxXmlNode *parent = node->GetParent();
    if (parent != NULL &&
    // wxBitmapButton:
    wxXmlNode *parent = node->GetParent();
    if (parent != NULL &&
-       parent->GetPropVal(_T("class"), _T("")) == _T("wxBitmapButton") &&
+       parent->GetAttribute(_T("class"), _T("")) == _T("wxBitmapButton") &&
        (name == _T("focus") ||
         name == _T("disabled") ||
         name == _T("selected")))
        (name == _T("focus") ||
         name == _T("disabled") ||
         name == _T("selected")))
@@ -453,7 +453,7 @@ static bool NodeContainsFilename(wxXmlNode *node)
    // wxBitmap or wxIcon toplevel resources:
    if ( name == _T("object") )
    {
    // wxBitmap or wxIcon toplevel resources:
    if ( name == _T("object") )
    {
-       wxString klass = node->GetPropVal(_T("class"), wxEmptyString);
+       wxString klass = node->GetAttribute(_T("class"), wxEmptyString);
        if (klass == _T("wxBitmap") ||
                klass == _T("wxIcon") ||
                 klass == _T("data") )
        if (klass == _T("wxBitmap") ||
                klass == _T("wxIcon") ||
                 klass == _T("data") )
@@ -463,7 +463,7 @@ static bool NodeContainsFilename(wxXmlNode *node)
    // URLs in wxHtmlWindow:
    if ( name == _T("url") &&
         parent != NULL &&
    // URLs in wxHtmlWindow:
    if ( name == _T("url") &&
         parent != NULL &&
-        parent->GetPropVal(_T("class"), _T("")) == _T("wxHtmlWindow") )
+        parent->GetAttribute(_T("class"), _T("")) == _T("wxHtmlWindow") )
    {
        // FIXME: this is wrong for e.g. http:// URLs
        return true;
    {
        // FIXME: this is wrong for e.g. http:// URLs
        return true;
@@ -917,7 +917,7 @@ wxArrayString XmlResApp::FindStrings(wxXmlNode *node)
             // ...and known to contain translatable string
         {
             if (!flagGettext ||
             // ...and known to contain translatable string
         {
             if (!flagGettext ||
-                node->GetPropVal(_T("translate"), _T("1")) != _T("0"))
+                node->GetAttribute(_T("translate"), _T("1")) != _T("0"))
             {
                 arr.Add(ConvertText(n->GetContent()));
             }
             {
                 arr.Add(ConvertText(n->GetContent()));
             }