what happened |
omdoc-xml.scala:44: error: type mismatch;
found : scala.Seq[scala.xml.Node]
required: scala.xml.Node
Elem(M.prefix, M.label, M.attributes, M.scope, M.child)
^
one error found
|
what expected |
There seems to be no way to construct a Node except with a constant number of children passed separately to the constructor, i.e.,
Elem(M.prefix, M.label, M.attributes, M.scope, M.child(0), ..., M.child(n)).
I guess it's possible with lteral XML, but something like the above example would be awkward.
This is in contrast to the example on http://lamp.epfl.ch/~emir/projects/scalaxbook/scalaxbook.docbk.html#id2508510 which says that a
def add( p: Node, e: Node ) = Elem(null, p.label, Null, TopScope, p.child concat e)
is possible. |