dbertoni 01/12/14 08:52:25
Modified: c/src/XSLT ElemAttribute.cpp
Log:
Make sure that an attribute's prefix is stripped if its namespace is null.
(namespace118, namespace129, namespace133)
Revision Changes Path
1.33 +11 -2 xml-xalan/c/src/XSLT/ElemAttribute.cpp
Index: ElemAttribute.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemAttribute.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- ElemAttribute.cpp 2001/12/14 16:30:55 1.32
+++ ElemAttribute.cpp 2001/12/14 16:52:25 1.33
@@ -195,14 +195,23 @@
{
m_pNamespaceAVT->evaluate(attrNameSpace, sourceNode,
*this, executionContext);
+ indexOfNSSep = indexOf(origAttrName,
XalanUnicode::charColon);
+
if(isEmpty(attrNameSpace))
{
+ // If there's no namespace, but the attribute
has a
+ // prefix, then we must strip the prefix off.
+ if (indexOfNSSep < origAttrNameLength)
+ {
+ substring(origAttrName, attrName,
indexOfNSSep + 1);
+ }
+
+ // We set this to indicate that there is no
prefix any
+ // longer.
indexOfNSSep = origAttrNameLength;
}
else
{
- indexOfNSSep = indexOf(origAttrName,
XalanUnicode::charColon);
-
// See if the namespace already exists. If it
does, we'll get the
// prefix that was used when it was declared.
const XalanDOMString* const prefix =
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]