dbertoni 00/08/14 15:08:18
Modified: c/src/XSLT FunctionKey.cpp KeyDeclaration.hpp KeyTable.cpp
KeyTable.hpp Stylesheet.cpp Stylesheet.hpp
StylesheetExecutionContext.hpp
StylesheetExecutionContextDefault.cpp
StylesheetExecutionContextDefault.hpp
XSLTProcessorEnvSupport.hpp
XSLTProcessorEnvSupportDefault.cpp
XSLTProcessorEnvSupportDefault.hpp
Log:
Fixes for thread-safety problem with initializing keys.
Revision Changes Path
1.9 +2 -2 xml-xalan/c/src/XSLT/FunctionKey.cpp
Index: FunctionKey.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionKey.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FunctionKey.cpp 2000/08/14 16:34:44 1.8
+++ FunctionKey.cpp 2000/08/14 22:08:05 1.9
@@ -175,7 +175,7 @@
usedrefs.insert(ref);
const NodeRefListBase*
const nl =
-
executionContext.getNodeSetByKey(*docContext,
+
executionContext.getNodeSetByKey(docContext,
keyname,
ref,
*executionContext.getPrefixResolver());
@@ -192,7 +192,7 @@
const XalanDOMString ref =
arg->str();
const NodeRefListBase* const nl =
-
executionContext.getNodeSetByKey(*docContext,
+
executionContext.getNodeSetByKey(docContext,
keyname,
ref,
*executionContext.getPrefixResolver());
1.6 +5 -33 xml-xalan/c/src/XSLT/KeyDeclaration.hpp
Index: KeyDeclaration.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/KeyDeclaration.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- KeyDeclaration.hpp 2000/07/17 16:23:29 1.5
+++ KeyDeclaration.hpp 2000/08/14 22:08:05 1.6
@@ -92,8 +92,7 @@
XPath& use) :
m_name(name),
m_match(&matchPattern),
- m_use(&use),
- m_inConstruction(false)
+ m_use(&use)
{
}
@@ -113,7 +112,7 @@
*
* @return XPath for "use" attribute
*/
- XPath&
+ const XPath&
getUse() const
{
return *m_use;
@@ -124,47 +123,20 @@
*
* @return XPath for "match" attribute
*/
- XPath&
+ const XPath&
getMatchPattern() const
{
return *m_match;
}
- bool
- getInConstruction() const
- {
- return m_inConstruction;
- }
-
- void
- beginConstruction() const
- {
-#if defined(XALAN_NO_MUTABLE)
- ((KeyDeclaration*)this)->m_inConstruction = true;
-#else
- m_inConstruction = true;
-#endif
- }
-
- void
- endConstruction() const
- {
-#if defined(XALAN_NO_MUTABLE)
- ((KeyDeclaration*)this)->m_inConstruction = false;
-#else
- m_inConstruction = false;
-#endif
- }
-
private:
XalanDOMString m_name;
- XPath* m_match;
+ const XPath* m_match;
- XPath* m_use;
+ const XPath* m_use;
- mutable bool m_inConstruction;
};
1.9 +6 -7 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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- KeyTable.cpp 2000/08/10 18:43:06 1.8
+++ KeyTable.cpp 2000/08/14 22:08:05 1.9
@@ -71,14 +71,13 @@
#include <XPath/XPath.hpp>
-#include <XPath/XPathExecutionContext.hpp>
#include "KeyDeclaration.hpp"
+#include "StylesheetExecutionContext.hpp"
-
const MutableNodeRefList KeyTable::s_dummyList;
@@ -89,7 +88,7 @@
const PrefixResolver&
resolver,
const XalanDOMString& name,
const KeyDeclarationVectorType& keyDeclarations,
- XPathExecutionContext&
executionContext) :
+ StylesheetExecutionContext&
executionContext) :
m_docKey(doc),
m_keys()
{
@@ -135,13 +134,13 @@
if (equals(kd.getName(), name))
{
- if (kd.getInConstruction() == true)
+ if
(executionContext.getInConstruction(kd) == true)
{
fDone = true;
}
else
{
- kd.beginConstruction();
+
executionContext.beginConstruction(kd);
// See if our node matches the
given key declaration according to
// the match attribute on
xsl:key.
@@ -151,7 +150,7 @@
if(score ==
XPath::s_MatchScoreNone)
{
- kd.endConstruction();
+
executionContext.endConstruction(kd);
}
else
{
@@ -216,7 +215,7 @@
}
} // end for(int k = 0;
k < nUseValues; k++)
- kd.endConstruction();
+
executionContext.endConstruction(kd);
} // if(score !=
kd.getMatchPattern().s_MatchScoreNone)
} // if (kd.getInConstruction() == true)
} // if (equals(kd.getName(), name)
1.7 +4 -3 xml-xalan/c/src/XSLT/KeyTable.hpp
Index: KeyTable.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/KeyTable.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- KeyTable.hpp 2000/08/07 19:52:04 1.6
+++ KeyTable.hpp 2000/08/14 22:08:06 1.7
@@ -58,7 +58,7 @@
#define XALAN_KEYTABLE_HEADER_GUARD
/**
- * $Id: KeyTable.hpp,v 1.6 2000/08/07 19:52:04 dbertoni Exp $
+ * $Id: KeyTable.hpp,v 1.7 2000/08/14 22:08:06 dbertoni Exp $
*
* $State: Exp $
*
@@ -88,12 +88,13 @@
class KeyDeclaration;
class NodeRefListBase;
class PrefixResolver;
+class StylesheetExecutionContext;
class XalanElement;
class XalanNode;
-class XPathExecutionContext;
+
/**
* Table of element keys, keyed by document node. An instance of this
* class is keyed by a Document node that should be matched with the
@@ -127,7 +128,7 @@
const PrefixResolver&
resolver,
const XalanDOMString& name,
const KeyDeclarationVectorType& keyDeclarations,
- XPathExecutionContext&
executionContext);
+ StylesheetExecutionContext&
executionContext);
virtual
~KeyTable();
1.32 +6 -6 xml-xalan/c/src/XSLT/Stylesheet.cpp
Index: Stylesheet.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/Stylesheet.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- Stylesheet.cpp 2000/08/14 20:11:48 1.31
+++ Stylesheet.cpp 2000/08/14 22:08:06 1.32
@@ -959,12 +959,12 @@
const NodeRefListBase*
Stylesheet::getNodeSetByKey(
- XalanNode* doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
- const PrefixResolver& resolver,
- XPathExecutionContext& executionContext,
- KeyTablesTableType& theKeysTable) const
+ XalanNode* doc,
+ const XalanDOMString& name,
+ const XalanDOMString& ref,
+ const PrefixResolver& resolver,
+ StylesheetExecutionContext& executionContext,
+ KeyTablesTableType& theKeysTable) const
{
const NodeRefListBase *nl = 0;
1.23 +9 -9 xml-xalan/c/src/XSLT/Stylesheet.hpp
Index: Stylesheet.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/Stylesheet.hpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Stylesheet.hpp 2000/08/14 20:11:49 1.22
+++ Stylesheet.hpp 2000/08/14 22:08:07 1.23
@@ -85,8 +85,8 @@
-#include <XSLT/KeyDeclaration.hpp>
-#include <XSLT/StylesheetExecutionContext.hpp>
+#include "KeyDeclaration.hpp"
+#include "StylesheetExecutionContext.hpp"
@@ -107,7 +107,7 @@
class XMLURL;
class XObject;
class XPath;
-class XPathExecutionContext;
+class StylesheetExecutionContext;
@@ -841,12 +841,12 @@
*/
const NodeRefListBase*
getNodeSetByKey(
- XalanNode* doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
- const PrefixResolver& resolver,
- XPathExecutionContext& executionContext,
- KeyTablesTableType& theKeysTable) const;
+ XalanNode* doc,
+ const XalanDOMString& name,
+ const XalanDOMString& ref,
+ const PrefixResolver& resolver,
+ StylesheetExecutionContext& executionContext,
+ KeyTablesTableType& theKeysTable)
const;
/**
* Add an extension namespace handler. This provides methods for calling
1.27 +37 -14 xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp
Index: StylesheetExecutionContext.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- StylesheetExecutionContext.hpp 2000/08/14 16:34:44 1.26
+++ StylesheetExecutionContext.hpp 2000/08/14 22:08:07 1.27
@@ -98,7 +98,10 @@
+#include "KeyTable.hpp"
+
+
class ElemTemplateElement;
class FormatterListener;
class FormatterToDOM;
@@ -106,6 +109,7 @@
class FormatterToText;
class FormatterToXML;
class GenerateEvent;
+class KeyTable;
class PrefixResolver;
class NodeRefListBase;
class PrintWriter;
@@ -1488,7 +1492,31 @@
const XalanDOMChar* theLHS,
const XalanDOMChar* theRHS) const = 0;
+ /**
+ * Determine if a keydeclaration is being constructed.
+ *
+ * @param id keydeclaration
+ * @return true if being constructed
+ */
+ virtual bool
+ getInConstruction(const KeyDeclaration& keyDeclaration) const = 0;
+ /**
+ * Add keydeclaration to construction list.
+ *
+ * @param keydeclaration being constructed
+ */
+ virtual void
+ beginConstruction(const KeyDeclaration& keyDeclaration) const = 0;
+
+ /**
+ * Remove keydeclaration from construction list.
+ *
+ * @param constructed keydeclaration
+ */
+ virtual void
+ endConstruction(const KeyDeclaration& keyDeclaration) const = 0;
+
// These interfaces are inherited from XPathExecutionContext...
virtual XalanNode*
@@ -1593,22 +1621,9 @@
virtual const NodeRefListBase*
getNodeSetByKey(
- const XalanNode& doc,
+ XalanNode* doc,
const XalanDOMString& name,
const XalanDOMString& ref,
- const XalanElement& nscontext) = 0;
-
- virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref) = 0;
-
- virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
const PrefixResolver& resolver) = 0;
virtual const XObject*
@@ -1695,6 +1710,14 @@
const XalanDOMString& msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const =
0;
+
+ virtual KeyTable*
+ getKeyTable(const XalanNode* doc) const = 0;
+
+ virtual void
+ setKeyTable(
+ KeyTable* keytable,
+ const XalanNode* doc) = 0;
};
1.29 +70 -27
xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp
Index: StylesheetExecutionContextDefault.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- StylesheetExecutionContextDefault.cpp 2000/08/14 16:34:44 1.28
+++ StylesheetExecutionContextDefault.cpp 2000/08/14 22:08:08 1.29
@@ -114,7 +114,32 @@
const StylesheetExecutionContextDefault::DefaultCollationCompareFunctor
StylesheetExecutionContextDefault::s_defaultFunctor;
+bool
+StylesheetExecutionContextDefault::getInConstruction(const KeyDeclaration&
keyDeclaration) const
+{
+ return m_keyDeclarationSet.count(&keyDeclaration)?true:false;
+}
+
+void
+StylesheetExecutionContextDefault::beginConstruction(const KeyDeclaration&
keyDeclaration) const
+{
+#if defined(XALAN_NO_MUTABLE)
+
((StylesheetExecutionContextDefault*)this)->m_keyDeclarationSet.insert(&keyDeclaration);
+#else
+ m_keyDeclarationSet.insert(&keyDeclaration);
+#endif
+}
+
+void
+StylesheetExecutionContextDefault::endConstruction(const KeyDeclaration&
keyDeclaration) const
+{
+#if defined(XALAN_NO_MUTABLE)
+
((StylesheetExecutionContextDefault*)this)->m_keyDeclarationSet.erase(&keyDeclaration);
+#else
+ m_keyDeclarationSet.erase(&keyDeclaration);
+#endif
+}
StylesheetExecutionContextDefault::StylesheetExecutionContextDefault(
XSLTEngineImpl& xsltProcessor,
@@ -142,7 +167,8 @@
m_collationCompareFunctor(&s_defaultFunctor),
m_liveVariablesStack(),
m_variablesStack(),
- m_matchPatternCache()
+ m_matchPatternCache(),
+ m_keyTables()
{
m_liveVariablesStack.reserve(eDefaultVariablesStackSize);
}
@@ -162,7 +188,7 @@
#if !defined(XALAN_NO_NAMESPACES)
using std::for_each;
#endif
-
+
for_each(m_formatterListeners.begin(),
m_formatterListeners.end(),
DeleteFunctor<FormatterListener>());
@@ -185,6 +211,12 @@
m_variablesStack.reset();
+ // Clean up the key table vector
+ for_each(m_keyTables.begin(),
+ m_keyTables.end(),
+ makeMapValueDeleteFunctor(m_keyTables));
+
+ m_keyTables.clear();
assert(m_matchPatternCache.size() == 0);
}
@@ -1566,36 +1598,15 @@
const NodeRefListBase*
-StylesheetExecutionContextDefault::getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
- const XalanElement& nscontext)
-{
- return m_xpathExecutionContextDefault.getNodeSetByKey(doc, name, ref,
nscontext);
-}
-
-
-
-const NodeRefListBase*
-StylesheetExecutionContextDefault::getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref)
-{
- return m_xpathExecutionContextDefault.getNodeSetByKey(doc, name, ref);
-}
-
-
-
-const NodeRefListBase*
StylesheetExecutionContextDefault::getNodeSetByKey(
- const XalanNode& doc,
+ XalanNode* doc,
const XalanDOMString& name,
const XalanDOMString& ref,
const PrefixResolver& resolver)
{
- return m_xpathExecutionContextDefault.getNodeSetByKey(doc, name, ref,
resolver);
+ assert(m_stylesheetRoot != 0);
+
+ return m_stylesheetRoot->getNodeSetByKey(doc, name, ref, resolver,
*this, m_keyTables);
}
@@ -2032,3 +2043,35 @@
// Add the XPath with the current clock
m_matchPatternCache.insert(XPathCacheMapType::value_type(pattern,
XPathCacheEntry(theXPath, addClock)));
}
+
+
+KeyTable*
+StylesheetExecutionContextDefault::getKeyTable(const XalanNode* doc)
const
+{
+ const KeyTablesTableType::const_iterator i =
+ m_keyTables.find(doc);
+
+ if (i == m_keyTables.end())
+ {
+ return 0;
+ }
+ else
+ {
+ return (*i).second;
+ }
+}
+
+
+
+void
+StylesheetExecutionContextDefault::setKeyTable(
+ KeyTable* keytable,
+ const XalanNode* doc)
+{
+ // Get rid of any existing keytable
+ delete m_keyTables[doc];
+
+ m_keyTables[doc] = keytable;
+}
+
+
1.27 +32 -17
xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp
Index: StylesheetExecutionContextDefault.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- StylesheetExecutionContextDefault.hpp 2000/08/14 16:34:45 1.26
+++ StylesheetExecutionContextDefault.hpp 2000/08/14 22:08:08 1.27
@@ -62,7 +62,8 @@
// Base class include file.
-#include <XSLT/StylesheetExecutionContext.hpp>
+#include "Stylesheet.hpp"
+#include "StylesheetExecutionContext.hpp"
@@ -81,7 +82,7 @@
#include <XSLT/VariablesStack.hpp>
-
+class Stylesheet;
class TextOutputStream;
class XPathProcessor;
class XPathSupport;
@@ -528,6 +529,15 @@
const CollationCompareFunctor*
installCollationCompareFunctor(const CollationCompareFunctor*
theFunctor);
+ virtual bool
+ getInConstruction(const KeyDeclaration& keyDeclaration) const;
+
+ virtual void
+ beginConstruction(const KeyDeclaration& keyDeclaration) const;
+
+ virtual void
+ endConstruction(const KeyDeclaration& keyDeclaration) const;
+
// These interfaces are inherited from XPathExecutionContext...
virtual XalanNode*
@@ -631,23 +641,10 @@
getProcessNamespaces() const;
virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
+ getNodeSetByKey(
+ XalanNode* doc,
const XalanDOMString& name,
const XalanDOMString& ref,
- const XalanElement& nscontext);
-
- virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref);
-
- virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
const PrefixResolver& resolver);
virtual const XObject*
@@ -715,6 +712,17 @@
createPrintWriter(std::ostream& theStream);
#endif
+ // These interfaces are inherited from StylesheetExecutionContext...
+
+ virtual KeyTable*
+ getKeyTable(const XalanNode* doc) const;
+
+ virtual void
+ setKeyTable(
+ KeyTable* keytable,
+ const XalanNode* doc);
+
+
// These interfaces are inherited from ExecutionContext...
virtual void
@@ -789,6 +797,7 @@
typedef set<FormatterListener*>
FormatterListenerSetType;
typedef set<PrintWriter*>
PrintWriterSetType;
typedef set<TextOutputStream*>
TextOutputStreamSetType;
+ typedef set<const KeyDeclaration*>
KeyDeclarationSetType;
typedef vector<const XObject*>
VariablesCollectionType;
typedef vector<VariablesCollectionType>
LiveVariablesStackType;
typedef pair<const XPath*, clock_t>
XPathCacheEntry;
@@ -800,11 +809,13 @@
typedef std::set<FormatterListener*>
FormatterListenerSetType;
typedef std::set<PrintWriter*>
PrintWriterSetType;
typedef std::set<TextOutputStream*>
TextOutputStreamSetType;
+ typedef std::set<const KeyDeclaration*>
KeyDeclarationSetType;
typedef std::vector<const XObject*>
VariablesCollectionType;
typedef std::vector<VariablesCollectionType>
LiveVariablesStackType;
typedef std::pair<const XPath*, clock_t>
XPathCacheEntry;
typedef std::map<XalanDOMString, XPathCacheEntry>
XPathCacheMapType;
#endif
+ typedef Stylesheet::KeyTablesTableType
KeyTablesTableType;
enum { eDefaultVariablesCollectionSize = 10,
eXPathCacheMax = 50,
@@ -838,6 +849,10 @@
static XalanNumberFormatFactory* s_xalanNumberFormatFactory;
const static DefaultCollationCompareFunctor
s_defaultFunctor;
+
+ mutable KeyTablesTableType m_keyTables;
+
+ mutable KeyDeclarationSetType m_keyDeclarationSet;
};
1.7 +0 -19 xml-xalan/c/src/XSLT/XSLTProcessorEnvSupport.hpp
Index: XSLTProcessorEnvSupport.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupport.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XSLTProcessorEnvSupport.hpp 2000/07/21 19:52:58 1.6
+++ XSLTProcessorEnvSupport.hpp 2000/08/14 22:08:08 1.7
@@ -71,7 +71,6 @@
-class KeyTable;
class XSLTProcessor;
@@ -86,25 +85,7 @@
~XSLTProcessorEnvSupport();
- // These interfaces are new to XSLTProcessorEnvSupport...
-
- virtual KeyTable*
- getKeyTable(const XalanNode* doc) const = 0;
-
- virtual void
- setKeyTable(
- KeyTable* keytable,
- const XalanNode* doc) = 0;
-
// These interfaces are inherited from XPathEnvSupport...
-
- virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
- const PrefixResolver& resolver,
- XPathExecutionContext& executionContext) const = 0;
virtual XalanDocument*
parseXML(
1.16 +0 -88 xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.cpp
Index: XSLTProcessorEnvSupportDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XSLTProcessorEnvSupportDefault.cpp 2000/08/07 19:52:06 1.15
+++ XSLTProcessorEnvSupportDefault.cpp 2000/08/14 22:08:09 1.16
@@ -94,7 +94,6 @@
XSLTProcessorEnvSupport(),
m_defaultSupport(),
m_processor(theProcessor),
- m_keyTables(),
m_xlocatorTable()
{
}
@@ -159,94 +158,7 @@
m_defaultSupport.reset();
- // Clean up the key table vector
- for_each(m_keyTables.begin(),
- m_keyTables.end(),
- makeMapValueDeleteFunctor(m_keyTables));
-
- m_keyTables.clear();
-
m_xlocatorTable.clear();
-}
-
-
-
-KeyTable*
-XSLTProcessorEnvSupportDefault::getKeyTable(const XalanNode* doc) const
-{
- const KeyTablesTableType::const_iterator i =
- m_keyTables.find(doc);
-
- if (i == m_keyTables.end())
- {
- return 0;
- }
- else
- {
- return (*i).second;
- }
-}
-
-
-
-void
-XSLTProcessorEnvSupportDefault::setKeyTable(
- KeyTable* keytable,
- const XalanNode* doc)
-{
- // Get rid of any existing keytable
- delete m_keyTables[doc];
-
- m_keyTables[doc] = keytable;
-}
-
-
-
-const NodeRefListBase*
-XSLTProcessorEnvSupportDefault::getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
- const PrefixResolver& resolver,
- XPathExecutionContext& executionContext) const
-{
- if (m_processor == 0)
- {
- return m_defaultSupport.getNodeSetByKey(doc,
-
name,
-
ref,
-
resolver,
-
executionContext);
- }
- else
- {
- const NodeRefListBase* nl = 0;
-
- const Stylesheet* const theStylesheet =
- m_processor->getStylesheetRoot();
-
- if (theStylesheet != 0)
- {
- // $$$ ToDo: Figure out this const stuff!!!
- nl =
theStylesheet->getNodeSetByKey(&const_cast<XalanNode&>(doc),
-
name,
-
ref,
-
resolver,
-
executionContext,
-#if defined(XALAN_NO_MUTABLE)
-
(KeysTableType&)m_keyTables);
-#else
-
m_keyTables);
-#endif
- }
-
- if(0 == nl)
- {
- m_processor->error(XalanDOMString("There is no xsl:key
declaration for '") + name + XalanDOMString("'!"));
- }
-
- return nl;
- }
}
1.13 +0 -25 xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.hpp
Index: XSLTProcessorEnvSupportDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XSLTProcessorEnvSupportDefault.hpp 2000/08/07 19:52:07 1.12
+++ XSLTProcessorEnvSupportDefault.hpp 2000/08/14 22:08:09 1.13
@@ -72,7 +72,6 @@
// Base class header file...
#include <XSLT/XSLTProcessorEnvSupport.hpp>
-#include <XSLT/Stylesheet.hpp>
@@ -80,7 +79,6 @@
-class KeyTable;
class XSLTProcessor;
@@ -156,27 +154,8 @@
const XalanDOMString& theNamespace,
const XalanDOMString& functionName);
-
- // These interfaces are inherited from XSLTProcessorEnvSupport...
-
- virtual KeyTable*
- getKeyTable(const XalanNode* doc) const;
-
- virtual void
- setKeyTable(
- KeyTable* keytable,
- const XalanNode* doc);
-
// These interfaces are inherited from XPathEnvSupport...
- virtual const NodeRefListBase*
- getNodeSetByKey(
- const XalanNode& doc,
- const XalanDOMString& name,
- const XalanDOMString& ref,
- const PrefixResolver& resolver,
- XPathExecutionContext& executionContext) const;
-
virtual XalanDocument*
parseXML(
const XalanDOMString& urlString,
@@ -271,15 +250,11 @@
typedef std::map<const XalanNode*, XLocator*> XLocatorTableType;
#endif
- typedef Stylesheet::KeyTablesTableType
KeyTablesTableType;
-
// Data members...
XPathEnvSupportDefault m_defaultSupport;
XSLTProcessor* m_processor;
-
- mutable KeyTablesTableType m_keyTables;
XLocatorTableType m_xlocatorTable;
};