~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to lib/rexml/cdata.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
      @string
40
40
    end
41
41
 
 
42
    # == DEPRECATED
 
43
    # See the rexml/formatters package
 
44
    #
42
45
                # Generates XML output of this object
43
46
                #
44
47
                # output::
45
48
                #   Where to write the string.  Defaults to $stdout
46
49
                # indent::
47
 
                #   An integer.  If -1, no indenting will be used; otherwise, the
48
 
                #   indentation will be this number of spaces, and children will be
49
 
                #   indented an additional amount.  Defaults to -1.
 
50
    #   The amount to indent this node by
50
51
                # transitive::
51
 
                #   If transitive is true and indent is >= 0, then the output will be
52
 
                #   pretty-printed in such a way that the added whitespace does not affect
53
 
                #   the absolute *value* of the document -- that is, it leaves the value
54
 
                #   and number of Text nodes in the document unchanged.
 
52
    #   Ignored
55
53
                # ie_hack::
56
 
                #   Internet Explorer is the worst piece of crap to have ever been
57
 
                #   written, with the possible exception of Windows itself.  Since IE is
58
 
                #   unable to parse proper XML, we have to provide a hack to generate XML
59
 
                #   that IE's limited abilities can handle.  This hack inserts a space 
60
 
                #   before the /> on empty tags.
 
54
    #   Ignored
61
55
                #
62
56
                # _Examples_
63
57
                #  c = CData.new( " Some text " )
64
58
                #  c.write( $stdout )     #->  <![CDATA[ Some text ]]>
65
59
                def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
66
 
      #indent( output, indent ) unless transitive
 
60
      Kernel.warn( "#{self.class.name}.write is deprecated" )
 
61
                        indent( output, indent )
67
62
                        output << START
68
63
                        output << @string
69
64
                        output << STOP