Rename mxf filename ignoring stuff slightly.
[libdcp.git] / src / text.cc
index c70e4333ea05fd9da21729c7f6b4c05d876eae70..782d17112f88a737e3e580f3178857384d08757b 100644 (file)
@@ -35,12 +35,21 @@ using namespace dcp;
  *  in this object's member variables.
  *  @param node Node to read.
  */
-Text::Text (shared_ptr<const cxml::Node> node)
+Text::Text (boost::shared_ptr<const cxml::Node> node)
        : v_align (CENTER)
 {
        text = node->content ();
-       v_position = node->number_attribute<float> ("VPosition");
+       optional<float> x = node->optional_number_attribute<float> ("VPosition");
+       if (!x) {
+               x = node->number_attribute<float> ("Vposition");
+       }
+       v_position = x.get ();
+       
        optional<string> v = node->optional_string_attribute ("VAlign");
+       if (!v) {
+               v = node->optional_string_attribute ("Valign");
+       }
+       
        if (v) {
                v_align = string_to_valign (v.get ());
        }