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 03:00:40 UTC
cvs commit: xml-xalan/c/src/XMLSupport FormatterToHTML.cpp FormatterToDOM.hpp FormatterToDOM.cpp
dbertoni 01/05/13 18:00:40
Modified: c/src/XMLSupport FormatterToHTML.cpp FormatterToDOM.hpp
FormatterToDOM.cpp
Log:
Return pointers to string instead of references for namespace-related functions, to support empty namespace URIs.
Revision Changes Path
1.56 +2 -2 xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp
Index: FormatterToHTML.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- FormatterToHTML.cpp 2001/04/27 19:21:20 1.55
+++ FormatterToHTML.cpp 2001/05/14 01:00:38 1.56
@@ -1049,10 +1049,10 @@
assert(thePrefix != 0);
// Check for the namespace...
- const XalanDOMString& theNamespace =
+ const XalanDOMString* const theNamespace =
m_prefixResolver->getNamespaceForPrefix(*thePrefix);
- if (length(theNamespace) != 0)
+ if (theNamespace != 0 && length(*theNamespace) != 0)
{
m_hasNamespaceStack.push_back(true);
1.15 +1 -1 xml-xalan/c/src/XMLSupport/FormatterToDOM.hpp
Index: FormatterToDOM.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToDOM.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- FormatterToDOM.hpp 2001/05/02 15:43:11 1.14
+++ FormatterToDOM.hpp 2001/05/14 01:00:39 1.15
@@ -247,7 +247,7 @@
XalanElement* theElement,
AttributeList& attrs);
- const XalanDOMString&
+ const XalanDOMString*
getNamespaceForPrefix(
const XalanDOMChar* theName,
const PrefixResolver& thePrefixResolver,
1.15 +7 -7 xml-xalan/c/src/XMLSupport/FormatterToDOM.cpp
Index: FormatterToDOM.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToDOM.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- FormatterToDOM.cpp 2001/03/02 19:09:27 1.14
+++ FormatterToDOM.cpp 2001/05/14 01:00:39 1.15
@@ -320,16 +320,16 @@
else
{
// Check for the namespace...
- const XalanDOMString& theNamespace =
+ const XalanDOMString* const theNamespace =
getNamespaceForPrefix(theElementName, *m_prefixResolver, m_buffer2);
- if (length(theNamespace) == 0)
+ if (theNamespace == 0 || length(*theNamespace) == 0)
{
theElement = m_doc->createElement(m_buffer1);
}
else
{
- theElement = m_doc->createElementNS(theNamespace, m_buffer1);
+ theElement = m_doc->createElementNS(*theNamespace, m_buffer1);
}
addAttributes(theElement, attrs);
@@ -365,19 +365,19 @@
assert(theName != 0);
// Check for the namespace...
- const XalanDOMString& theNamespace =
+ const XalanDOMString* const theNamespace =
getNamespaceForPrefix(theName, *m_prefixResolver, m_buffer2);
assign(m_buffer1, theName);
assign(m_buffer2, attrs.getValue(i));
- if (length(theNamespace) == 0)
+ if (theNamespace == 0 || length(*theNamespace) == 0)
{
theElement->setAttribute(m_buffer1, m_buffer2);
}
else
{
- theElement->setAttributeNS(theNamespace, m_buffer1, m_buffer2);
+ theElement->setAttributeNS(*theNamespace, m_buffer1, m_buffer2);
}
}
}
@@ -385,7 +385,7 @@
-const XalanDOMString&
+const XalanDOMString*
FormatterToDOM::getNamespaceForPrefix(
const XalanDOMChar* theName,
const PrefixResolver& thePrefixResolver,
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org