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 2002/08/15 06:40:52 UTC
cvs commit: xml-xalan/c/src/XalanTransformer XalanDefaultParsedSource.cpp XalanDefaultParsedSource.hpp XalanTransformer.cpp XalanTransformer.hpp XercesDOMParsedSource.cpp XercesDOMParsedSource.hpp
dbertoni 2002/08/14 21:40:52
Modified: c/src/XalanTransformer XalanDefaultParsedSource.cpp
XalanDefaultParsedSource.hpp XalanTransformer.cpp
XalanTransformer.hpp XercesDOMParsedSource.cpp
XercesDOMParsedSource.hpp
Log:
Implemented external schema locations.
Revision Changes Path
1.13 +8 -4 xml-xalan/c/src/XalanTransformer/XalanDefaultParsedSource.cpp
Index: XalanDefaultParsedSource.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanDefaultParsedSource.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XalanDefaultParsedSource.cpp 10 May 2002 21:53:26 -0000 1.12
+++ XalanDefaultParsedSource.cpp 15 Aug 2002 04:40:51 -0000 1.13
@@ -170,10 +170,12 @@
XalanDefaultParsedSource::XalanDefaultParsedSource(
- const InputSource& theInputSource,
- bool fValidate,
- ErrorHandler* theErrorHandler,
- EntityResolver* theEntityResolver) :
+ const InputSource& theInputSource,
+ bool fValidate,
+ ErrorHandler* theErrorHandler,
+ EntityResolver* theEntityResolver,
+ const XalanDOMChar* theExternalSchemaLocation,
+ const XalanDOMChar* theExternalNoNamespaceSchemaLocation) :
XalanParsedSource(),
m_parserLiaison(),
m_domSupport(m_parserLiaison),
@@ -182,6 +184,8 @@
m_parserLiaison.setUseValidation(fValidate);
m_parserLiaison.setEntityResolver(theEntityResolver);
m_parserLiaison.setErrorHandler(theErrorHandler);
+ m_parserLiaison.setExternalSchemaLocation(theExternalSchemaLocation);
+ m_parserLiaison.setExternalNoNamespaceSchemaLocation(theExternalNoNamespaceSchemaLocation);
m_parsedSource = m_parserLiaison.mapDocument(m_parserLiaison.parseXMLStream(theInputSource));
assert(m_parsedSource != 0);
1.13 +6 -4 xml-xalan/c/src/XalanTransformer/XalanDefaultParsedSource.hpp
Index: XalanDefaultParsedSource.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanDefaultParsedSource.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XalanDefaultParsedSource.hpp 10 May 2002 21:53:26 -0000 1.12
+++ XalanDefaultParsedSource.hpp 15 Aug 2002 04:40:51 -0000 1.13
@@ -161,10 +161,12 @@
public:
XalanDefaultParsedSource(
- const InputSource& theInputSource,
- bool fValidate = false,
- ErrorHandler* theErrorHandler = 0,
- EntityResolver* theEntityResolver = 0);
+ const InputSource& theInputSource,
+ bool fValidate = false,
+ ErrorHandler* theErrorHandler = 0,
+ EntityResolver* theEntityResolver = 0,
+ const XalanDOMChar* theExternalSchemaLocation = 0,
+ const XalanDOMChar* theExternalNoNamespaceSchemaLocation = 0);
virtual
~XalanDefaultParsedSource();
1.58 +8 -2 xml-xalan/c/src/XalanTransformer/XalanTransformer.cpp
Index: XalanTransformer.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanTransformer.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- XalanTransformer.cpp 13 Aug 2002 05:37:38 -0000 1.57
+++ XalanTransformer.cpp 15 Aug 2002 04:40:51 -0000 1.58
@@ -144,6 +144,8 @@
m_useValidation(false),
m_entityResolver(0),
m_errorHandler(0),
+ m_externalSchemaLocation(),
+ m_externalNoNamespaceSchemaLocation(),
m_problemListener(0),
#if defined(XALAN_NO_NAMESPACES)
m_warningStream(&cerr),
@@ -621,7 +623,9 @@
theInputSource,
m_useValidation,
m_errorHandler,
- m_entityResolver);
+ m_entityResolver,
+ getExternalSchemaLocation(),
+ getExternalNoNamespaceSchemaLocation());
}
else
{
@@ -630,7 +634,9 @@
theInputSource,
m_useValidation,
m_errorHandler,
- m_entityResolver);
+ m_entityResolver,
+ getExternalSchemaLocation(),
+ getExternalNoNamespaceSchemaLocation());
}
// Store it in a vector.
1.41 +56 -0 xml-xalan/c/src/XalanTransformer/XalanTransformer.hpp
Index: XalanTransformer.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanTransformer.hpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- XalanTransformer.hpp 13 Aug 2002 05:37:38 -0000 1.40
+++ XalanTransformer.hpp 15 Aug 2002 04:40:51 -0000 1.41
@@ -551,6 +551,58 @@
}
/**
+ * This method returns the location for an external schema document
+ * for parsing.
+ *
+ * @return A string representing the location of the external schema document
+ */
+ const XalanDOMChar*
+ getExternalSchemaLocation() const
+ {
+ return m_externalSchemaLocation.size() == 0 ? 0 : m_externalSchemaLocation.c_str();
+ }
+
+ /**
+ * This method sets the location for an external schema document
+ * for parsing.
+ *
+ * @param location A string representing the location of the external schema document
+ */
+ void
+ setExternalSchemaLocation(const XalanDOMChar* location)
+ {
+ assert(location != 0);
+
+ m_externalSchemaLocation = location;
+ }
+
+ /**
+ * This method returns the location for an external schema document
+ * for parsing.
+ *
+ * @return A string representing the location of the external schema document
+ */
+ const XalanDOMChar*
+ getExternalNoNamespaceSchemaLocation() const
+ {
+ return m_externalNoNamespaceSchemaLocation.size() == 0 ? 0 : m_externalNoNamespaceSchemaLocation.c_str();
+ }
+
+ /**
+ * This method sets the location for an external schema document
+ * for parsing.
+ *
+ * @param location A string representing the location of the external schema document
+ */
+ void
+ setExternalNoNamespaceSchemaLocation(const XalanDOMChar* location)
+ {
+ assert(location != 0);
+
+ m_externalNoNamespaceSchemaLocation = location;
+ }
+
+ /**
* This method returns the installed ProblemListener instance.
*
* @return The pointer to the installed ProblemListener instance.
@@ -817,6 +869,10 @@
EntityResolver* m_entityResolver;
ErrorHandler* m_errorHandler;
+
+ XalanDOMString m_externalSchemaLocation;
+
+ XalanDOMString m_externalNoNamespaceSchemaLocation;
ProblemListener* m_problemListener;
1.11 +8 -4 xml-xalan/c/src/XalanTransformer/XercesDOMParsedSource.cpp
Index: XercesDOMParsedSource.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XercesDOMParsedSource.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XercesDOMParsedSource.cpp 10 May 2002 21:14:07 -0000 1.10
+++ XercesDOMParsedSource.cpp 15 Aug 2002 04:40:52 -0000 1.11
@@ -101,10 +101,12 @@
XercesDOMParsedSource::XercesDOMParsedSource(
- const InputSource& theInputSource,
- bool fValidate,
- ErrorHandler* theErrorHandler,
- EntityResolver* theEntityResolver):
+ const InputSource& theInputSource,
+ bool fValidate,
+ ErrorHandler* theErrorHandler,
+ EntityResolver* theEntityResolver,
+ const XalanDOMChar* theExternalSchemaLocation,
+ const XalanDOMChar* theExternalNoNamespaceSchemaLocation) :
XalanParsedSource(),
m_parserLiaison(),
m_parsedSource(0)
@@ -112,6 +114,8 @@
m_parserLiaison.setUseValidation(fValidate);
m_parserLiaison.setEntityResolver(theEntityResolver);
m_parserLiaison.setErrorHandler(theErrorHandler);
+ m_parserLiaison.setExternalSchemaLocation(theExternalSchemaLocation);
+ m_parserLiaison.setExternalNoNamespaceSchemaLocation(theExternalNoNamespaceSchemaLocation);
m_parsedSource = m_parserLiaison.parseXMLStream(theInputSource);
assert(m_parsedSource != 0);
1.9 +6 -4 xml-xalan/c/src/XalanTransformer/XercesDOMParsedSource.hpp
Index: XercesDOMParsedSource.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XercesDOMParsedSource.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XercesDOMParsedSource.hpp 10 May 2002 21:14:07 -0000 1.8
+++ XercesDOMParsedSource.hpp 15 Aug 2002 04:40:52 -0000 1.9
@@ -111,10 +111,12 @@
public:
XercesDOMParsedSource(
- const InputSource& theInputSource,
- bool fValidate = false,
- ErrorHandler* theErrorHandler = 0,
- EntityResolver* theEntityResolver = 0);
+ const InputSource& theInputSource,
+ bool fValidate = false,
+ ErrorHandler* theErrorHandler = 0,
+ EntityResolver* theEntityResolver = 0,
+ const XalanDOMChar* theExternalSchemaLocation = 0,
+ const XalanDOMChar* theExternalNoNamespaceSchemaLocation = 0);
virtual
~XercesDOMParsedSource();
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org