Problem exporting content with XMERL

karol skocik karol.skocik@REDACTED
Tue May 2 10:45:03 CEST 2006


Hi,
  I am trying to export content, but XMERL dies with error. The
content looks like this :

simple() ->
    {document, [{title, "Doc Title"}, {author, "Ulf Wiger"}],
     [{section, [{heading, "heading1"}],
       [{'P', "This is a paragraph of text."},
        {section, [{heading, "heading2"}],
         [{'P', "This is another paragraph."},
          {table, [{border, 1}],
           [{heading,
             [{col, "head1"},
	      {col, "head2"}]},
            {row,
             [{col, "col11"},
              {col, "col12"}]},
            {row,
             [{col, "col21"},
              {col, "col22"}]}]}]}]}]}.

-- it is the same content as used in Ulf's presentation.

Next, I am doing the same as in presentation :

xmerl:export_simple(dvbh_xml:simple(), xmerl_xml, [{title, "Doc Title"}]).
but there is a problem.

The whole session looks like this:

(ipe@REDACTED)13> dvbh_xml:simple().
{document,[{title,"Doc Title"},{author,"Ulf Wiger"}],
          [{section,[{heading,"heading1"}],
                    [{'P',"This is a paragraph of text."},
                     {section,[{heading,"heading2"}],
                              [{'P',"This is another paragraph."},
                               {table,[{border,1}],
                                      [{heading,[{col,"head1"},{col,"head2"}]},
                                       {row,[{col,"col11"},{col,"col12"}]},
                                       {row,[{col,"col21"},{col|...}]}]}]}]}]}
(ipe@REDACTED)14> xmerl:export_simple(dvbh_xml:simple(), xmerl_xml,
[{title, "Doc Title"}]).

=ERROR REPORT==== 2-May-2006::10:32:28 ===
Error in process <0.289.0> on node 'ipe@REDACTED' with exit value:
{function_clause,[{xmerl_lib,expand_content,[{document,[{title,"Doc
Title"},{author,"Ulf
Wiger"}],[{section,[{heading,"heading1"}],[{'P',"This is a paragraph
of text."},{section,[{heading,"heading2"}],[{'P',"This is anothe...

** exited: {function_clause,[{xmerl_lib,
                                 expand_content,
                                 [{document,
                                      [{title,"Doc Title"},
                                       {author,"Ulf Wiger"}],
                                      [{section,
                                           [{heading,"heading1"}],
                                           [{'P',
                                                "This is a paragraph of text."},
                                            {section,
                                                [{heading,"heading2"}],
                                                [{'P',
                                                     "This is another
paragraph."},
                                                 {table,
                                                     [{...}],
                                                     [...]}]}]}]},
                                  1,
                                  [],
                                  false]},
                             {xmerl,export_simple1,3},
                             {erl_eval,do_apply,5},
                             {shell,exprs,6},
                             {shell,eval_loop,3}]} **

Does anybody know what is the problem? I am using latest Erlang on Linux/x86.

Karol



More information about the erlang-questions mailing list