diff options
Diffstat (limited to 'lib/rexml/document.rb')
-rw-r--r-- | lib/rexml/document.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index 558b5d731a..81e63c60f1 100644 --- a/lib/rexml/document.rb +++ b/lib/rexml/document.rb @@ -66,6 +66,7 @@ module REXML def add( child ) if child.kind_of? XMLDecl @children.unshift child + child.parent = self elsif child.kind_of? DocType # Find first Element or DocType node and insert the decl right # before it. If there is no such node, just insert the child at the @@ -183,7 +184,7 @@ module REXML output = Output.new( output, xml_decl.encoding ) end formatter = if indent > -1 - if transitive + if trans REXML::Formatters::Transitive.new( indent, ie_hack ) else REXML::Formatters::Pretty.new( indent, ie_hack ) |