On  2 Jun 2009, David Pollak wrote:

> This is an XML parsing error.  Something in your XML is non-parsable.
> It's not Lift, but the underlying XML parsing library.

Yes, it would seem so. It looks like a bug/non-implemented feature that
the parser is unable to read two attributes with the same name but in
different name spaces. Not sure if this is because the fragment doesn't
contain any name space decls? 

Unfortunately this renders the Menu.builder less useful since it is not
possible to assign CSS classes to both the path items and the selected
item (which, imho, is an obvious use case). Being a Lift newbie, I'm
wondering if there are other parts of Lift that is influenced by this.

Here's a very small test case that illustrates the problem:

Given this program:

import _root_.net.liftweb.util._
import _root_.java.io._

object ReadXML extends Application {
        val xml= PCDataXmlParser(new FileInputStream("test.xml"))
}

This XML fragment fails to parse:
<lift:surround with="base" at="body">
        <lift:Menu.builder  li_path:class="p" li_item:class="i"/>
</lift:surround>

But this parses ok (note the slight change in attribute names):
<lift:surround with="base" at="body">
        <lift:Menu.builder  li_path:class="p" li_item:clasz="i"/>
</lift:surround>

Accidentally, I think there's a problem with the error reporting when
parsing fails. Looking at the code to scala.io.Source, the original
exception is a "double attribute" syntax error, but due to what I think
is a bug in Source.getLine, I always get errors reported as
java.lang.IllegalArgumentException: line 1 does not exist

Am I the only one seeing this?

/Jeppe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to