help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use nxml mode, but without the auto formatting


From: Yuri Khan
Subject: Re: Use nxml mode, but without the auto formatting
Date: Sun, 23 Mar 2014 11:14:15 +0700

On Sun, Mar 23, 2014 at 9:40 AM, Harry Putnam <reader@newsguy.com> wrote:

> This happens in  Xming  '*.launch' files on windows, for me.
>
> These files are created if you use the xming gui to setup a launcher
> for a remote program.
>
> If I let emacs format the code then the code doesn't work to launch anything. 
>  If I leave it in a
> single line, it does.
[…]
>
> Here is what happens if I hit <enter> after the last '>'.
> ,----
> |    <?xml version="1.0" encoding="utf-8"?>
> |    <XLaunch xmlns="http://www.straightrunning.com/XmingNotes";
> |             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> |             xsi:schemaLocation="http://www.straightrunning.com/XmingNotes
> |                                 XLaunch.xsd" WindowMode="MultiWindow"
> |             ClientMode="StartProgram" Program="xterm -g 84x36 -fg linen -bg
> |                                                DarkSlateGrey -cr Skyblue
> |                                                -fn
> |                                                
> dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1"
> |             ClientStart="PuTTY" RemoteHost="192.168.1.42"
> |             RemoteUser="reader" Clipboard="true"/>
> `----

You might want to also file a bug report with Xming. As an XML file,
the reformatted version is equivalent to the original, so the software
must treat them identically.

Also, see what happens if you remove all line breaks in attribute
values. (Not that it makes any difference with regard to XML
well-formedness, validity or semantics — any XML processor that treats
the original version, your reformatted version or my reformatted
version below differently is broken.)

,----
|    <?xml version="1.0" encoding="utf-8"?>
|    <XLaunch xmlns="http://www.straightrunning.com/XmingNotes";
|             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
|             xsi:schemaLocation="http://www.straightrunning.com/XmingNotes
XLaunch.xsd"
|             WindowMode="MultiWindow"
|             ClientMode="StartProgram"
|             Program="xterm -g 84x36 -fg linen -bg DarkSlateGrey -cr
Skyblue -fn dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1"
|             ClientStart="PuTTY" RemoteHost="192.168.1.42"
|             RemoteUser="reader" Clipboard="true"/>
`----

(OK, I’m not entirely confident that my email client won’t re-wrap it
but you get the idea.)

Also, the xsi:schemaLocation attribute value seems to be wrong — it
specifies two schema URIs, the first of which does not resolve to an
XML schema definition document (but to a redirect to an ordinary HTML
page), and the other is just a filename with no indication of how to
locate it. On the other hand, the URI
http://www.straightrunning.com/XmingNotes/XLaunch.xsd (after replacing
space with a slash) is valid and resolves to a schema definition. I
don’t see how this could affect the processing of the document,
however.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]