You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/11/03 04:29:19 UTC
cvs commit: xml-xalan/c/src/DOMSupport XalanNamespacesStack.cpp XalanNamespacesStack.hpp
dbertoni 2002/11/02 19:29:18
Modified: c/src/DOMSupport XalanNamespacesStack.cpp
XalanNamespacesStack.hpp
Log:
Added implementation of a proxy class for PrefixResolver.
Revision Changes Path
1.3 +32 -0 xml-xalan/c/src/DOMSupport/XalanNamespacesStack.cpp
Index: XalanNamespacesStack.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/DOMSupport/XalanNamespacesStack.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XalanNamespacesStack.cpp 11 Oct 2002 07:10:03 -0000 1.2
+++ XalanNamespacesStack.cpp 3 Nov 2002 03:29:18 -0000 1.3
@@ -64,6 +64,38 @@
+XalanNamespacesStack::PrefixResolverProxy::PrefixResolverProxy(
+ const XalanNamespacesStack& theStack,
+ const XalanDOMString& theURI) :
+ m_stack(theStack),
+ m_uri(theURI)
+{
+}
+
+
+
+XalanNamespacesStack::PrefixResolverProxy::~PrefixResolverProxy()
+{
+}
+
+
+
+const XalanDOMString*
+XalanNamespacesStack::PrefixResolverProxy::getNamespaceForPrefix(const XalanDOMString& prefix) const
+{
+ return m_stack.getNamespaceForPrefix(prefix);
+}
+
+
+
+const XalanDOMString&
+XalanNamespacesStack::PrefixResolverProxy::getURI() const
+{
+ return m_uri;
+}
+
+
+
XalanNamespacesStack::XalanNamespacesStackEntry::XalanNamespacesStackEntry() :
m_namespaces(),
m_position(m_namespaces.begin())
1.6 +33 -0 xml-xalan/c/src/DOMSupport/XalanNamespacesStack.hpp
Index: XalanNamespacesStack.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/DOMSupport/XalanNamespacesStack.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XalanNamespacesStack.hpp 11 Oct 2002 07:20:29 -0000 1.5
+++ XalanNamespacesStack.hpp 3 Nov 2002 03:29:18 -0000 1.6
@@ -73,6 +73,7 @@
+#include <PlatformSupport/PrefixResolver.hpp>
#include <PlatformSupport/XalanNamespace.hpp>
@@ -80,6 +81,38 @@
class XALAN_DOMSUPPORT_EXPORT XalanNamespacesStack
{
public:
+
+ class XALAN_DOMSUPPORT_EXPORT PrefixResolverProxy : public PrefixResolver
+ {
+ public:
+
+ /**
+ * Construct a PrefixResolver from a XalanNamespaceStack
+ * instance.
+ *
+ * @param theStack The stack to use for prefix resolution
+ * @param theURI The namespace URI of the resolver, if any. Only a reference is kept, so this cannot be a temporary
+ * @return pointer to the string value if found, otherwise 0.
+ */
+ PrefixResolverProxy(
+ const XalanNamespacesStack& theStack,
+ const XalanDOMString& theURI);
+
+ virtual
+ ~PrefixResolverProxy();
+
+ virtual const XalanDOMString*
+ getNamespaceForPrefix(const XalanDOMString& prefix) const;
+
+ virtual const XalanDOMString&
+ getURI() const;
+
+ private:
+
+ const XalanNamespacesStack& m_stack;
+
+ const XalanDOMString& m_uri;
+ };
class XALAN_DOMSUPPORT_EXPORT XalanNamespacesStackEntry
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org