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...@locus.apache.org on 2000/07/11 18:00:05 UTC
cvs commit: xml-xalan/c/src/XSLT KeyTable.cpp
dbertoni 00/07/11 09:00:02
Modified: c/src/XSLT KeyTable.cpp
Log:
Fixed bug where empty key value would fail. (idky27, idky28).
Revision Changes Path
1.6 +16 -19 xml-xalan/c/src/XSLT/KeyTable.cpp
Index: KeyTable.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/KeyTable.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- KeyTable.cpp 2000/04/11 15:09:28 1.5
+++ KeyTable.cpp 2000/07/11 15:59:58 1.6
@@ -191,31 +191,28 @@
exprResult = executionContext.getNodeData(*useNode);
}
- if(length(exprResult) != 0)
- {
- MutableNodeRefList& keyNodes =
+ MutableNodeRefList& keyNodes =
m_keys[kd.getName()][exprResult];
-
- // See if the matched node is already in the
- // table set. If it is there, we're done, otherwise
- // add it.
- bool foundit = false;
- const unsigned int nKeyNodes = keyNodes.getLength(); //size();
+ // See if the matched node is already in the
+ // table set. If it is there, we're done, otherwise
+ // add it.
+ bool foundit = false;
- for(unsigned int j = 0; j < nKeyNodes; j++)
- {
- if(testNode == keyNodes.item(j))
- {
- foundit = true;
- break;
- }
- } // end for j
+ const unsigned int nKeyNodes = keyNodes.getLength(); //size();
- if(foundit == false)
+ for(unsigned int j = 0; j < nKeyNodes; j++)
+ {
+ if(testNode == keyNodes.item(j))
{
- keyNodes.addNode(testNode);
+ foundit = true;
+ break;
}
+ } // end for j
+
+ if(foundit == false)
+ {
+ keyNodes.addNode(testNode);
}
} // end for(int k = 0; k < nUseValues; k++)