You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2003/10/25 12:29:58 UTC

cvs commit: xml-security/c/src/transformers TXFMURL.hpp TXFMURL.cpp

blautenb    2003/10/25 03:29:58

  Modified:    c/src/transformers TXFMURL.hpp TXFMURL.cpp
  Log:
  Allow caller to attach directly to a BinInputStream (rather than reference via a URI)
  
  Revision  Changes    Path
  1.9       +5 -2      xml-security/c/src/transformers/TXFMURL.hpp
  
  Index: TXFMURL.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/transformers/TXFMURL.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TXFMURL.hpp	11 Sep 2003 11:11:29 -0000	1.8
  +++ TXFMURL.hpp	25 Oct 2003 10:29:58 -0000	1.9
  @@ -74,7 +74,9 @@
   #include <xercesc/util/BinInputStream.hpp>
   
   /**
  - * \brief Base transformer for URL inputs to chains
  + * \brief Base transformer for URL inputs to chains.  Also used to
  + * provide a method to provide a BinInputStream as an input method
  + *
    * @ingroup internal
    */
   
  @@ -98,6 +100,7 @@
   
   	virtual void setInput(TXFMBase *newInput);
   	void setInput(const XMLCh * URL);
  +	void setInput(XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream * inputStream);
   
   	// Methods to get tranform output type and input requirement
   
  
  
  
  1.7       +12 -3     xml-security/c/src/transformers/TXFMURL.cpp
  
  Index: TXFMURL.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/transformers/TXFMURL.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TXFMURL.cpp	11 Sep 2003 11:11:29 -0000	1.6
  +++ TXFMURL.cpp	25 Oct 2003 10:29:58 -0000	1.7
  @@ -109,8 +109,9 @@
   
   	// Assume we have already checked that this is a valid URL
   
  -	
  -	is = mp_resolver->resolveURI(URL);
  +
  +	if (mp_resolver != NULL)
  +		is = mp_resolver->resolveURI(URL);
   
   	if (is == NULL) {
   
  @@ -121,6 +122,14 @@
   
   }
   
  +void TXFMURL::setInput(BinInputStream * inputStream) {
  +
  +	if (is != NULL)
  +		delete is;
  +
  +	is = inputStream;
  +
  +}
   
   	// Methods to get tranform output type and input requirement