dbertoni    01/04/12 12:25:09

  Modified:    c/samples/StreamTransform StreamTransform.cpp
  Log:
  Changes for the OS/390 port.
  
  Revision  Changes    Path
  1.5       +16 -2     xml-xalan/c/samples/StreamTransform/StreamTransform.cpp
  
  Index: StreamTransform.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/StreamTransform/StreamTransform.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StreamTransform.cpp       2001/02/13 22:45:43     1.4
  +++ StreamTransform.cpp       2001/04/12 19:25:05     1.5
  @@ -115,13 +115,26 @@
                                                        theXObjectFactory);
   
                                // A simple input document...
  -                             const char* const  theInputDocument = "<?xml 
version='1.0'?><doc>Hello world!</doc>";
  +#if defined(XALAN_NON_ASCII_PLATFORM)
  +                             const char* const  theInputDocument = "<?xml 
version='1.0' encoding='EBCDIC-CP-US' ?><doc>Hello world!</doc>";
  +#else
  +                             const char* const  theInputDocument = "<?xml 
version='1.0' encoding='ISO-8859-1' ?><doc>Hello world!</doc>";
  +#endif
   
  -                             // A "hello world" stylesheet.  Note that the 
encoding for the output is US-ASCII,
  +                             // A "hello world" stylesheet.  Note that the 
encoding for the output is platform-dependent,
                                // since we're writing to a string.  It could 
be any encoding, but "binary" encodings,
                                // or encodings that could produce multi-byte 
characters would require transcoding on
                                // some platforms.
                                const char* const  theStylesheet =
  +#if defined(XALAN_NON_ASCII_PLATFORM)
  +"<?xml version='1.0' encoding='EBCDIC-CP-US'?>\
  +<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' 
version='1.0'>\
  +<xsl:output encoding='EBCDIC-CP-US'/>\
  +<xsl:template match='doc'>\
  +<out><xsl:value-of select='.'/></out>\
  +</xsl:template>\
  +</xsl:stylesheet>";
  +#else
   "<?xml version='1.0'?>\
   <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' 
version='1.0'>\
   <xsl:output encoding='US-ASCII'/>\
  @@ -129,6 +142,7 @@
   <out><xsl:value-of select='.'/></out>\
   </xsl:template>\
   </xsl:stylesheet>";
  +#endif
   
                                // Our input streams...
                                istrstream      
theInputDocumentStream(theInputDocument, strlen(theInputDocument));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to