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 2001/05/14 02:59:54 UTC
cvs commit: xml-xalan/c/src/XalanSourceTree XalanSourceTreeDOMSupport.hpp XalanSourceTreeDOMSupport.cpp XalanSourceTreeDocument.hpp XalanSourceTreeDocument.cpp
dbertoni 01/05/13 17:59:54
Modified: c/src/XalanSourceTree XalanSourceTreeDOMSupport.hpp
XalanSourceTreeDOMSupport.cpp
XalanSourceTreeDocument.hpp
XalanSourceTreeDocument.cpp
Log:
Return pointers to string instead of references for namespace-related functions, to support empty namespace URIs.
Revision Changes Path
1.4 +1 -1 xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDOMSupport.hpp
Index: XalanSourceTreeDOMSupport.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDOMSupport.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanSourceTreeDOMSupport.hpp 2001/01/08 18:22:37 1.3
+++ XalanSourceTreeDOMSupport.hpp 2001/05/14 00:59:53 1.4
@@ -87,7 +87,7 @@
// These interfaces are inherited from DOMSupport...
- virtual const XalanDOMString&
+ virtual const XalanDOMString*
getNamespaceForPrefix(
const XalanDOMString& prefix,
const XalanElement& namespaceContext) const;
1.5 +1 -1 xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDOMSupport.cpp
Index: XalanSourceTreeDOMSupport.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDOMSupport.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XalanSourceTreeDOMSupport.cpp 2001/03/29 22:14:10 1.4
+++ XalanSourceTreeDOMSupport.cpp 2001/05/14 00:59:53 1.5
@@ -103,7 +103,7 @@
-const XalanDOMString&
+const XalanDOMString*
XalanSourceTreeDOMSupport::getNamespaceForPrefix(
const XalanDOMString& prefix,
const XalanElement& namespaceContext) const
1.9 +1 -1 xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.hpp
Index: XalanSourceTreeDocument.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XalanSourceTreeDocument.hpp 2001/05/10 17:52:01 1.8
+++ XalanSourceTreeDocument.hpp 2001/05/14 00:59:54 1.9
@@ -457,7 +457,7 @@
const XalanDOMChar* chars,
unsigned int length);
- const XalanDOMString&
+ const XalanDOMString*
getNamespaceForPrefix(
const XalanDOMChar* theName,
const PrefixResolver& thePrefixResolver,
1.16 +7 -7 xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.cpp
Index: XalanSourceTreeDocument.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XalanSourceTreeDocument.cpp 2001/05/10 17:51:59 1.15
+++ XalanSourceTreeDocument.cpp 2001/05/14 00:59:54 1.16
@@ -827,7 +827,7 @@
-const XalanDOMString&
+const XalanDOMString*
XalanSourceTreeDocument::getNamespaceForPrefix(
const XalanDOMChar* theName,
const PrefixResolver& thePrefixResolver,
@@ -945,10 +945,10 @@
XalanSourceTreeElement* theOwnerElement,
const PrefixResolver& thePrefixResolver)
{
- const XalanDOMString& theNamespace =
+ const XalanDOMString* const theNamespace =
getNamespaceForPrefix(theName, thePrefixResolver, m_stringBuffer);
- if (length(theNamespace) == 0)
+ if (theNamespace == 0 || length(*theNamespace) == 0)
{
return m_attributeAllocator.create(
m_namesStringPool.get(theName),
@@ -971,7 +971,7 @@
return m_attributeNSAllocator.create(
m_namesStringPool.get(theName),
m_namesStringPool.get(theName + length(m_stringBuffer) + 1),
- m_namesStringPool.get(theNamespace),
+ m_namesStringPool.get(*theNamespace),
// This is the prefix...
m_namesStringPool.get(m_stringBuffer),
m_valuesStringPool.get(theValue),
@@ -992,10 +992,10 @@
XalanNode* theNextSibling,
const PrefixResolver& thePrefixResolver)
{
- const XalanDOMString& theNamespace =
+ const XalanDOMString* const theNamespace =
getNamespaceForPrefix(theTagName, thePrefixResolver, m_stringBuffer);
- if (length(theNamespace) == 0)
+ if (theNamespace == 0 || length(*theNamespace) == 0)
{
// the prefix was returned by getNamespaceForPrefix()...
assert(length(m_stringBuffer) == 0);
@@ -1029,7 +1029,7 @@
return m_elementNSAllocator.create(
m_namesStringPool.get(theTagName),
m_namesStringPool.get(theTagName + length(m_stringBuffer) + 1),
- m_namesStringPool.get(theNamespace),
+ m_namesStringPool.get(*theNamespace),
// This is the prefix...
m_namesStringPool.get(m_stringBuffer),
this,
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org