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/05/10 23:14:07 UTC
cvs commit: xml-xalan/c/src/XalanTransformer XalanSourceTreeWrapperParsedSource.cpp XalanSourceTreeWrapperParsedSource.hpp XalanDefaultParsedSource.cpp XalanDefaultParsedSource.hpp XercesDOMParsedSource.cpp XercesDOMParsedSource.hpp XercesDOMWrapperParsedSource.cpp XercesDOMWrapperParsedSource.hpp
dbertoni 02/05/10 14:14:07
Modified: c/src/XalanTransformer XalanDefaultParsedSource.cpp
XalanDefaultParsedSource.hpp
XercesDOMParsedSource.cpp XercesDOMParsedSource.hpp
XercesDOMWrapperParsedSource.cpp
XercesDOMWrapperParsedSource.hpp
Added: c/src/XalanTransformer
XalanSourceTreeWrapperParsedSource.cpp
XalanSourceTreeWrapperParsedSource.hpp
Log:
Immplemented new document wrapper. Cleaned up current implementation.
Revision Changes Path
1.11 +8 -13 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.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XalanDefaultParsedSource.cpp 6 Apr 2002 19:37:20 -0000 1.10
+++ XalanDefaultParsedSource.cpp 10 May 2002 21:14:07 -0000 1.11
@@ -75,7 +75,6 @@
#include <XalanSourceTree/XalanSourceTreeDocument.hpp>
-#include <XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
@@ -100,23 +99,12 @@
-const XalanDOMString*
-XalanDefaultParsedSourceDOMSupport::getNamespaceForPrefix(
- const XalanDOMString& prefix,
- const XalanElement& namespaceContext) const
-{
- return DOMServices::getNamespaceForPrefix(
- prefix,
- namespaceContext);
-}
-
-
-
const XalanDOMString&
XalanDefaultParsedSourceDOMSupport::getUnparsedEntityURI(
const XalanDOMString& theName,
const XalanDocument& theDocument) const
{
+ // Check the wrapped XalanSourceTreeDOMSupport instance...
const XalanDOMString& theURI =
m_domSupport.getUnparsedEntityURI(
theName,
@@ -128,6 +116,7 @@
}
else
{
+ // Chain up to our parent...
return XalanSourceTreeDOMSupport::getUnparsedEntityURI(
theName,
theDocument);
@@ -155,6 +144,12 @@
m_parserLiaison()
{
m_domSupport.setParserLiaison(&m_parserLiaison);
+}
+
+
+
+XalanDefaultParsedSourceHelper::~XalanDefaultParsedSourceHelper()
+{
}
1.11 +11 -6 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.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XalanDefaultParsedSource.hpp 5 Apr 2002 03:46:33 -0000 1.10
+++ XalanDefaultParsedSource.hpp 10 May 2002 21:14:07 -0000 1.11
@@ -64,8 +64,8 @@
-#include <XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
#include <XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
+#include <XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
@@ -94,11 +94,6 @@
// These interfaces are inherited from DOMSupport...
- virtual const XalanDOMString*
- getNamespaceForPrefix(
- const XalanDOMString& prefix,
- const XalanElement& namespaceContext) const;
-
virtual const XalanDOMString&
getUnparsedEntityURI(
const XalanDOMString& theName,
@@ -111,6 +106,14 @@
private:
+ // Not implemented...
+ XalanDefaultParsedSourceDOMSupport(const XalanDefaultParsedSourceDOMSupport&);
+
+ XalanDefaultParsedSourceDOMSupport&
+ operator=(const XalanDefaultParsedSourceDOMSupport&);
+
+
+ // Data members...
const XalanSourceTreeDOMSupport& m_domSupport;
};
@@ -123,6 +126,8 @@
XalanDefaultParsedSourceHelper(
const XalanSourceTreeDOMSupport& theSourceDOMSupport,
const XalanSourceTreeParserLiaison& theSourceParserLiaison);
+
+ ~XalanDefaultParsedSourceHelper();
virtual DOMSupport&
getDOMSupport();
1.10 +22 -23 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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XercesDOMParsedSource.cpp 6 Apr 2002 19:37:20 -0000 1.9
+++ XercesDOMParsedSource.cpp 10 May 2002 21:14:07 -0000 1.10
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -70,34 +70,33 @@
-class XALAN_TRANSFORMER_EXPORT XercesDOMParsedSourceHelper : public XalanParsedSourceHelper
+XercesDOMParsedSourceHelper::XercesDOMParsedSourceHelper() :
+ m_domSupport(),
+ m_parserLiaison()
{
-public:
+}
- XercesDOMParsedSourceHelper(const XercesParserLiaison& theXercesParserLiaison) :
- m_domSupport(),
- m_parserLiaison()
- {
- }
- virtual DOMSupport&
- getDOMSupport()
- {
- return m_domSupport;
- }
- virtual XMLParserLiaison&
- getParserLiaison()
- {
- return m_parserLiaison;
- }
+XercesDOMParsedSourceHelper::~XercesDOMParsedSourceHelper()
+{
+}
+
+
+
+DOMSupport&
+XercesDOMParsedSourceHelper::getDOMSupport()
+{
+ return m_domSupport;
+}
-private:
- XercesDOMSupport m_domSupport;
- XercesParserLiaison m_parserLiaison;
-};
+XMLParserLiaison&
+XercesDOMParsedSourceHelper::getParserLiaison()
+{
+ return m_parserLiaison;
+}
@@ -155,7 +154,7 @@
XalanParsedSourceHelper*
XercesDOMParsedSource::createHelper() const
{
- return new XercesDOMParsedSourceHelper(m_parserLiaison);
+ return new XercesDOMParsedSourceHelper;
}
1.8 +26 -3 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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XercesDOMParsedSource.hpp 5 Apr 2002 03:46:33 -0000 1.7
+++ XercesDOMParsedSource.hpp 10 May 2002 21:14:07 -0000 1.8
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,8 +64,8 @@
-#include <XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
-#include <XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
+#include <XercesParserLiaison/XercesParserLiaison.hpp>
+#include <XercesParserLiaison/XercesDOMSupport.hpp>
@@ -76,6 +76,29 @@
class EntityResolver;
class ErrorHandler;
class InputSource;
+
+
+
+class XALAN_TRANSFORMER_EXPORT XercesDOMParsedSourceHelper : public XalanParsedSourceHelper
+{
+public:
+
+ XercesDOMParsedSourceHelper();
+
+ ~XercesDOMParsedSourceHelper();
+
+ virtual DOMSupport&
+ getDOMSupport();
+
+ virtual XMLParserLiaison&
+ getParserLiaison();
+
+private:
+
+ XercesDOMSupport m_domSupport;
+
+ XercesParserLiaison m_parserLiaison;
+};
1.5 +8 -31 xml-xalan/c/src/XalanTransformer/XercesDOMWrapperParsedSource.cpp
Index: XercesDOMWrapperParsedSource.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XercesDOMWrapperParsedSource.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XercesDOMWrapperParsedSource.cpp 28 Mar 2002 07:09:11 -0000 1.4
+++ XercesDOMWrapperParsedSource.cpp 10 May 2002 21:14:07 -0000 1.5
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,40 +62,17 @@
-#include <XercesParserLiaison/XercesDocumentBridge.hpp>
-
+#include <PlatformSupport/URISupport.hpp>
-class XALAN_TRANSFORMER_EXPORT XercesDOMWrapperParsedSourceHelper : public XalanParsedSourceHelper
-{
-public:
- XercesDOMWrapperParsedSourceHelper(
- XercesDOMSupport& theDOMSupport,
- XercesParserLiaison& theParserLiaison) :
- m_domSupport(theDOMSupport),
- m_parserLiaison(theParserLiaison)
- {
- }
-
- virtual DOMSupport&
- getDOMSupport()
- {
- return m_domSupport;
- }
-
- virtual XMLParserLiaison&
- getParserLiaison()
- {
- return m_parserLiaison;
- }
+#include <XercesParserLiaison/XercesParserLiaison.hpp>
+#include <XercesParserLiaison/XercesDOMSupport.hpp>
+#include <XercesParserLiaison/XercesDocumentBridge.hpp>
-private:
- XercesDOMSupport& m_domSupport;
- XercesParserLiaison& m_parserLiaison;
-};
+#include "XercesDOMParsedSource.hpp"
@@ -108,7 +85,7 @@
m_parserLiaison(theParserLiaison),
m_domSupport(theDOMSupport),
m_parsedSource(theParserLiaison.createDocument(theDocument, true, true)),
- m_uri(theURI)
+ m_uri(URISupport::NormalizeURIText(theURI))
{
assert(m_parsedSource != 0);
}
@@ -133,7 +110,7 @@
XalanParsedSourceHelper*
XercesDOMWrapperParsedSource::createHelper() const
{
- return new XercesDOMWrapperParsedSourceHelper(m_domSupport, m_parserLiaison);
+ return new XercesDOMParsedSourceHelper;
}
1.3 +3 -10 xml-xalan/c/src/XalanTransformer/XercesDOMWrapperParsedSource.hpp
Index: XercesDOMWrapperParsedSource.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XercesDOMWrapperParsedSource.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XercesDOMWrapperParsedSource.hpp 24 Nov 2001 14:31:03 -0000 1.2
+++ XercesDOMWrapperParsedSource.hpp 10 May 2002 21:14:07 -0000 1.3
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,20 +64,13 @@
-#include <XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
-#include <XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
-
-
-
-#include <XSLT/XSLTInputSource.hpp>
-
-
-
#include <XalanTransformer/XalanParsedSource.hpp>
class DOM_Document;
+class XercesParserLiaison;
+class XercesDOMSupport;
1.1 xml-xalan/c/src/XalanTransformer/XalanSourceTreeWrapperParsedSource.cpp
Index: XalanSourceTreeWrapperParsedSource.cpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xalan" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
#include "XalanSourceTreeWrapperParsedSource.hpp"
#include <PlatformSupport/URISupport.hpp>
#include <XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
#include <XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
#include <XalanSourceTree/XalanSourceTreeDocument.hpp>
#include "XalanDefaultParsedSource.hpp"
XalanSourceTreeWrapperParsedSource::XalanSourceTreeWrapperParsedSource(
XalanSourceTreeDocument* theDocument,
XalanSourceTreeParserLiaison& theParserLiaison,
XalanSourceTreeDOMSupport& theDOMSupport,
const XalanDOMString& theURI) :
XalanParsedSource(),
m_parserLiaison(theParserLiaison),
m_domSupport(theDOMSupport),
m_parsedSource(theDocument),
m_uri(URISupport::NormalizeURIText(theURI))
{
assert(m_parsedSource != 0);
}
XalanSourceTreeWrapperParsedSource::~XalanSourceTreeWrapperParsedSource()
{
}
XalanDocument*
XalanSourceTreeWrapperParsedSource::getDocument() const
{
return m_parsedSource;
}
XalanParsedSourceHelper*
XalanSourceTreeWrapperParsedSource::createHelper() const
{
return new XalanDefaultParsedSourceHelper(m_domSupport, m_parserLiaison);
}
const XalanDOMString&
XalanSourceTreeWrapperParsedSource::getURI() const
{
return m_uri;
}
1.1 xml-xalan/c/src/XalanTransformer/XalanSourceTreeWrapperParsedSource.hpp
Index: XalanSourceTreeWrapperParsedSource.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xalan" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
#if !defined(XALANSOURCETREEWRAPPERPARSEDSOURCE_HEADER_GUARD)
#define XALANSOURCETREEWRAPPERPARSEDSOURCE_HEADER_GUARD
// Base include file. Must be first.
#include <XalanTransformer/XalanTransformerDefinitions.hpp>
#include <XalanTransformer/XalanParsedSource.hpp>
class XalanSourceTreeDOMSupport;
class XalanSourceTreeDocument;
class XalanSourceTreeParserLiaison;
/**
* This is designed to allow a XalanTranfomer object to wrap a parsed
* Xerces document.
*/
class XALAN_TRANSFORMER_EXPORT XalanSourceTreeWrapperParsedSource : public XalanParsedSource
{
public:
XalanSourceTreeWrapperParsedSource(
XalanSourceTreeDocument* theDocument,
XalanSourceTreeParserLiaison& theParserLiaison,
XalanSourceTreeDOMSupport& theDOMSupport,
const XalanDOMString& theURI = XalanDOMString());
virtual
~XalanSourceTreeWrapperParsedSource();
virtual XalanDocument*
getDocument() const;
virtual XalanParsedSourceHelper*
createHelper() const;
virtual const XalanDOMString&
getURI() const;
private:
XalanSourceTreeParserLiaison& m_parserLiaison;
XalanSourceTreeDOMSupport& m_domSupport;
XalanSourceTreeDocument* const m_parsedSource;
const XalanDOMString m_uri;
};
#endif // XALANSOURCETREEWRAPPERPARSEDSOURCE_HEADER_GUARD
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org