On 21 Nov 2017, at 17:11, Hussein Shafie wrote:

On 11/21/2017 02:00 PM, Leif Halvard Silli wrote:
...
On 15 Nov 2017, at 9:53, Hussein Shafie wrote:

    On 11/14/2017 11:41 PM, Don Mankewich wrote:

    DITA is not file based, but URL based.

 [  ... snip ... ]

        This isn’t particularly intuitive for a
near-WYSIWYG editor so can the ‘set link target’ attribute panel
        be made
        to accept spaces in the file path?

    Sorry but space characters are not allowed in URLs.

 [ ... snip ... ]


  *

    However, the inconsistancy, is that once you /have/ added
"Lorem%Ipsusm.dita" to your map file (as described above), you can, in fact, get rid of the space character by choosing ”Edit topic …” (in the contextual menu, when you select the <topicref> element): If
    you /now/ delete the "%20" and replace with a ”normal” SPACE
    character - " ", XMLmind will in fact not complain. That is:
    XMLmind’s conformance checker does not cry out in any way.


Is this as well (see below) a (not so harmless) bug? Perhaps I explained myself badly, but it is possible to get rid of the %20 they way I explain above.


  * When adding a new file, using the URL chooser, I may give file a
    Russian name - such as “Russian file" in Russian:
”русский%20фаил.dita". I then have to type the SPACE as %20. The
    result becomes this:
      o href="русский%20файл.dita"

This is indeed a (not so harmless) bug. It should be href="%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%20%D1%84%D0%B0%D0%B9%D0%BB.dita".

Bug or feature? Where is this a harmfull bug?

  * But if I use the file system based file chooser to do the same
    thing, the result becomes completely unreadable:
o href="%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%20%D1%84%D0%B0%D0%B9%D0%BB.dita"

This is the correct behavior.

A step in the wrong direction, for those that actually use non-ASCII letters in file names.

  * The URL standard does not require non-ASCII to be represented as
percentage encoding. It only requires that URL parsers convert the
    code, internally, to percentage encoding before interpreting the
    URL. So this behavior is both unneccessary and not useful to the
user. In fact, it probably causes user to not include non-ASCII in
    their URLs/file names.


I'm sorry but we cannot afford to spend countless hours of work switching XXE code base from "old" URLs to "new" IRIs (https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier).

Anyway, the vast majority of our users do not work with remote files at all. The behavior of XXE when you work with local files is deemed acceptable, even when the file name contain space or non-ASCII characters.

I use the URL-based file chooser not because I work with remote files, but for other benefits.

Example: right-clicking <xref href="%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%20%D1%84%D0%B0%D0%B9%D0%BB.dita"> and selecting "Follow Link" from the popup menu opens a document tab having a "русский фаил.dita" caption.

Well, I agree with Don Mankewitch that the current behavior IMO goes against the WYSIWYG-style that the XMLmind follows.

Further more, my impression is that the file names have high importance in DITA documents. The map file of a DITA document, is meant to make sense, when you look at the file names and when you look at the file names in a folder in your file system. After all, users/authors are supposed to work on the topics of DITA-document separately, and thus the file names of each topic file ought to make some sense on them own - the simplest is the name matches the title.

But the "old" URLs attitute which XMLmind editors implement, favors avoiding space characters and non-ASCII characters in the file names (where the %20 is less of an issue than the conversion to %FOO of non-ASCII letters). This makes it difficult - when you use spaces and/or non-ASCII characters in file names - to take advantage of - and work with - the file names (unless you rewert your file names to ASCII names). I means, IMO, that you don’t get what you expect, when you look at the map file.

One practical issue is that when you add an empty or new file to your map, the title of the document is not added. If you add several files, you could then rearrange the files a little (inside the map file) before adding content to them. But if the file name is completely unreadable, or requires that you open the file in its own tab - to add a title - this option does not exsist. (Unless, of course, you standardize on practice of not using non-ASCII letters, and preferrably avoid spaces in the names).
--
leif halvard silli

--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to