Not valid XML

172 views
Skip to first unread message

Serkhang

unread,
Feb 27, 2016, 11:16:35 AM2/27/16
to Ukelele Users
Though I can hardly imagine I'm the first one to run into the problem, I couldn't find anything undertaking a forum search. All the same, I beg your pardon if this has been treated earlier.

Had my Super.keylayout file created with Ukelele 2.8.8 in Mountain Lion.
Want to open it in Ukelele 3.0.2 in Yosemite.
Get feedback: Could not open the file, as it was not valid XML.

I removed Ukelele inluding every related file in the User Library (Caches, Application Support, Preferences, etc.) and made a fresh install. Did not help.

What am I missing? Best thanks for your help!

Gé van Gasteren

unread,
Feb 27, 2016, 12:14:34 PM2/27/16
to ukelel...@googlegroups.com
John is online; I hope he can find out what’s going on.
Please attach your layout file to a message here so he can look at the contents.

We had something looking a lot like this recently, in fact. I was able to trick around it by installing the layout in Snow Leopard, creating a "New From Current Input Source" layout with Ukelele (old version), then opening that file with the newer version of Ukelele in El Capitan.

It turned out that at the beginning of the file, it read "XML" in upper case i.s.o. "xml" in lower case...

--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.
To post to this group, send email to ukelel...@googlegroups.com.
Visit this group at https://groups.google.com/group/ukelele-users.
For more options, visit https://groups.google.com/d/optout.

Serkhang

unread,
Feb 27, 2016, 3:28:48 PM2/27/16
to Ukelele Users
Best thanks.

Changing 'XML' to 'xml' in a text editor solved the problem.

Gé van Gasteren

unread,
Feb 27, 2016, 3:41:48 PM2/27/16
to ukelel...@googlegroups.com
All right!

On 27 February 2016 at 21:28, Serkhang <serk...@gmail.com> wrote:
Best thanks.

Changing 'XML' to 'xml' in a text editor solved the problem.

--

Ebbo

unread,
May 9, 2016, 7:27:29 AM5/9/16
to Ukelele Users
It didn't solve it for me. I'm still getting this very message.

I'm using MBP 3,1 / 10.8.5 and used to use a previous version of U (2.1.5) and I think OS X, too, to create a custom layout five years ago (2011) that I still use and which I want to modify again. Updated to U3.0.3. Opening current input source creates "… not valid XML". Did a forum search, found this post, had a look into my .keyboard file, but it is in lower case. However, it is in 'xml 1.0' and in another post I stumbled across I noticed that the current version requires xml 1.1.
Provided that *is* the problem, what needs to be done to convert the document to xml 1.1 (except from changing the declaration itself)?

Serkhang

unread,
May 9, 2016, 12:39:19 PM5/9/16
to Ukelele Users
Well, John will certainly know.

Otherwise, if you can post the first some lines of your file in plain text, I'd compare with a current version.
What I can tell you for sure: My recent files produced with Ukelele are xml 1.1.

John Brownie

unread,
May 9, 2016, 5:32:25 PM5/9/16
to ukelel...@googlegroups.com
On 9/05/2016 21:27, 'Ebbo' via Ukelele Users wrote:
> It didn't solve it for me. I'm still getting this very message.
>
> I'm using MBP 3,1 / 10.8.5 and used to use a previous version of U
> (2.1.5) and I think OS X, too, to create a custom layout five years
> ago (2011) that I still use and which I want to modify again. Updated
> to U3.0.3. Opening current input source creates "… not valid XML". Did
> a forum search, found this post, had a look into my .keyboard file,
> but it is in lower case. However, it is in 'xml 1.0' and in another
> post I stumbled across I noticed that the current version requires xml
> 1.1.
> Provided that *is* the problem, what needs to be done to convert the
> document to xml 1.1 (except from changing the declaration itself)?

I can't say for sure. XML parsing is a rather complicated thing, and I
don't understand the inner workings of the parser that I'm using, so
it's hard to diagnose. If you want to send the file to me, you can do
so. I'm pretty busy currently, but have some time available to look at
things like this.

The main change from XML 1.0 to 1.1 is to allow character references to
almost any Unicode data point. The only forbidden ones are the "not a
character" ones (U+FFEF and U+FEFF and also in other planes) and the
null character (U+0000). There are other changes in the definition of
what can be a name and so on, but they don't matter so much.

That said, the current parser is technically an XML 1.0 parser that I've
modified to handle the greater character range, so it's neither a 1.0 or
1.1 parser. I don't believe that the version number in the header is of
any relevance to the actual parser, but it does matter for other
programs that know how to handle XML (e.g. XML Spear).

John
--
John Brownie, john_b...@sil.org or j.br...@sil.org.pg
Summer Institute of Linguistics, Ukarumpa, Eastern Highlands Province,
Papua New Guinea
Mussau-Emira language, Mussau Island, New Ireland Province, Papua New Guinea

Gé van Gasteren

unread,
May 10, 2016, 8:41:14 AM5/10/16
to ukelel...@googlegroups.com
Hi Ebbo,

In one case, I succeeded to open the layout in an indirect way – maybe you can try that approach:
Install the keyboard in the old OS X and activate it.
In that same OS X, open (old) Ukelele, create a new layout "New From Current Input Source" and save it.
Take that file to the new OS X and open it with the new Ukelele.

I guess this way, because Ukelele creates an XML file from scratch and fills it with the converted info from the current input source, you get to work around any XML errors.
Good luck!
Reply all
Reply to author
Forward
0 new messages