Not part of regular build. Added new method for NamespaceResolver
git-svn-id: svn://10.0.0.236/trunk@82380 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -25,13 +25,13 @@
|
||||
* -- added code in ::resolveFunctionCall to support the
|
||||
* document() function.
|
||||
*
|
||||
* $Id: ProcessorState.cpp,v 1.11 2000-10-06 08:59:46 Peter.VanderBeken%pandora.be Exp $
|
||||
* $Id: ProcessorState.cpp,v 1.12 2000-11-07 10:46:03 kvisco%ziplink.net Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of ProcessorState
|
||||
* Much of this code was ported from XSL:P
|
||||
* @version $Revision: 1.11 $ $Date: 2000-10-06 08:59:46 $
|
||||
* @version $Revision: 1.12 $ $Date: 2000-11-07 10:46:03 $
|
||||
**/
|
||||
|
||||
#include "ProcessorState.h"
|
||||
@@ -412,8 +412,16 @@ Element* ProcessorState::getNamedTemplate(String& name) {
|
||||
**/
|
||||
void ProcessorState::getNameSpaceURI(const String& name, String& nameSpaceURI) {
|
||||
String prefix;
|
||||
|
||||
XMLUtils::getNameSpace(name, prefix);
|
||||
getNameSpaceURIFromPrefix(prefix, nameSpaceURI);
|
||||
|
||||
} //-- getNameSpaceURI
|
||||
|
||||
/**
|
||||
* Returns the namespace URI for the given namespace prefix
|
||||
**/
|
||||
void ProcessorState::getNameSpaceURIFromPrefix(const String& prefix, String& nameSpaceURI) {
|
||||
|
||||
if (prefix.length() == 0) {
|
||||
nameSpaceURI.clear();
|
||||
nameSpaceURI.append(*(String*)defaultNameSpaceURIStack.peek());
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: ProcessorState.h,v 1.6 2000-09-04 16:25:27 axel%pike.org Exp $
|
||||
* $Id: ProcessorState.h,v 1.7 2000-11-07 10:46:03 kvisco%ziplink.net Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -50,11 +50,9 @@
|
||||
/**
|
||||
* Class used for keeping the current state of the XSL Processor
|
||||
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
|
||||
* @version $Revision: 1.6 $ $Date: 2000-09-04 16:25:27 $
|
||||
* @version $Revision: 1.7 $ $Date: 2000-11-07 10:46:03 $
|
||||
**/
|
||||
class ProcessorState : public ContextState,
|
||||
public NamespaceResolver
|
||||
{
|
||||
class ProcessorState : public ContextState {
|
||||
|
||||
public:
|
||||
|
||||
@@ -293,6 +291,11 @@ public:
|
||||
**/
|
||||
void getNameSpaceURI(const String& name, String& nameSpaceURI);
|
||||
|
||||
/**
|
||||
* Returns the namespace URI for the given namespace prefix
|
||||
**/
|
||||
void getNameSpaceURIFromPrefix(const String& prefix, String& nameSpaceURI);
|
||||
|
||||
private:
|
||||
|
||||
enum XMLSpaceMode {STRIP = 0, DEFAULT, PRESERVE};
|
||||
|
||||
Reference in New Issue
Block a user