 	  (1+ (current-column))
 	nil))))
 
+(defun urweb-begun-xml ()
+  "Check if this is the first new line in a new <xml>...</xml> section"
+  (save-excursion
+    (let ((start-pos (point)))
+      (previous-line 1)
+      (search-forward "<xml>" start-pos t))))
+
 (defun urweb-new-tags ()
   "Decide if the previous line of XML introduced unclosed tags"
   (save-excursion

               (cond
                ((looking-at "</")
                 (urweb-tag-matching-indent))
                ((urweb-new-tags)
                 (+ prev-indent 2))
                (t

                    (setq done t)
                  (decf depth)))
            (setq done t))))
      (if (looking-at "<xml")
          (+ (current-indentation) 2)
        (current-indentation)))))

(defun urweb-calculate-indentation ()
  (save-excursion
