Ticket #82 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

Manually adding a doctype is ignored

Reported by: ser Owned by: ser
Priority: normal Milestone: 3.1.5
Component: DOM Version: 3.1.3
Severity: normal Keywords:
Cc: Ruby version: 1.8.2
Operating system: Linux

Description

  def test_ticket_x_default
    doc = REXML::Document.new
    doc << REXML::XMLDecl.default
    doc << REXML::Element.new("a")

    str = ""
    doc.write(str)

    assert_equal("<?xml version='1.0'?><a/>", str)
  end

  def test_ticket_x_new
    doc = REXML::Document.new
    doc << REXML::XMLDecl.new("1.0", "UTF-8")
    doc << REXML::Element.new("a")

    str = ""
    doc.write(str)

    assert_equal("<?xml version='1.0' encoding='UTF-8'?><a/>", str)
  end

Change History

Changed 2 years ago by ser

  • status changed from new to closed
  • resolution set to invalid
Note: See TracTickets for help on using tickets.