Leos Literak | 27 May 2002 16:36
Picon
Favicon

indent doesn't work when no DTD

Hi,

I use XXE for docbook editing and it is nice.
Now I tried to edit XML with no DTD and even
if I set no DTD indentation, it stripped all
spaces and created ugly file.

Try this http://kt.zork.net/kernel-traffic/kt20020520_167.xml

XXE M13, Linux, JDK 1.3.1

Thanks

	Leo

--

-- 
Leos Literak
http://AbcLinuxu.cz - tady je tucnakum hej!

--
XXE Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Hussein Shafie | 31 May 2002 10:46
Picon

Re: indent doesn't work when no DTD

Leos Literak wrote:
> 
> I use XXE for docbook editing and it is nice.
> Now I tried to edit XML with no DTD and even
> if I set no DTD indentation, it stripped all
> spaces and created ugly file.
> 
> Try this http://kt.zork.net/kernel-traffic/kt20020520_167.xml
> 
> XXE M13, Linux, JDK 1.3.1

I have loaded your file into XXE and then, in the Options dialog box,
Save tab:

1) I checked the "Indent when no DTD" toggle.
2) I typed "2" in the "Indentation" field.

And then I saved your file after slightly modifying it (see attachment).

and I got an _indented_ file (XXE M1.3p2, Linux, JDK 1.3.1).

From the file you sent me, it seems that the value in your "Indentation"
field is either "0" or corrupted. See also in your "~/.xxe",  fields
"indentation" and "indentIfNoDocType".
Attachment (kt20020520_167.xml): text/x-essai-xml, 57 KiB
Leos Literak | 31 May 2002 10:58
Picon
Favicon

Re: indent doesn't work when no DTD

Hi,

please try attached document and options (XXE patch 1)
same problem. If I specify DTD, intendation is repaired.

> I have loaded your file into XXE and then, in the Options dialog box,
> Save tab:
> 
> 1) I checked the "Indent when no DTD" toggle.
> 2) I typed "2" in the "Indentation" field.
> 
> And then I saved your file after slightly modifying it (see attachment).
> 
> and I got an _indented_ file (XXE M1.3p2, Linux, JDK 1.3.1).

Btw XXE is really nice product and I like it. Keep up good
work. And if final version will be reasonably priced (<$100),
I will buy a license.

	Leo

--

-- 
Leos Literak
http://AbcLinuxu.cz - tady je tucnakum hej!
Attachment (xxe.zip): application/zip, 32 KiB
Hussein Shafie | 31 May 2002 13:04
Picon

Re: indent doesn't work when no DTD

Leos Literak wrote:
>
> please try attached document and options (XXE patch 1)
> same problem. If I specify DTD, intendation is repaired.

Sending me your ~/.xxe was a great idea. I was able to reproduce the
behavior you described!

The problems comes from __Open options__ not from Save Options:

If you want to get the behavior you expect, open the Options dialog box,
Open Tab, and check the following toggle: "When no DTD is being used,
guess what spaces are not useful and trim them".

Of course, keep your indentation settings. After that, reload your
document and save it: everything should be fine now.

Note that there is no bug here. This is the correct behavior of XXE.
--
XXE Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Leos Literak | 31 May 2002 14:08
Picon
Favicon

Re: indent doesn't work when no DTD

Hi,

shall I check them or uncheck them? I understand trim spaces
as create one big file with no intendation. Am I right?

And also I dont think if Open settings shall affect Save
behaviour. In my eyes these are separate and even if opened
file didn't have any intendation and you set intendation on
save, then save shall put intendation in saved file.
What do you think?

	Leos

> If you want to get the behavior you expect, open the Options dialog box,
> Open Tab, and check the following toggle: "When no DTD is being used,
> guess what spaces are not useful and trim them".
> 
> Of course, keep your indentation settings. After that, reload your
> document and save it: everything should be fine now.
> 
> Note that there is no bug here. This is the correct behavior of XXE.
> 
> 
> 

--

-- 
Leos Literak
http://AbcLinuxu.cz - tady je tucnakum hej!

--
(Continue reading)

Hussein Shafie | 31 May 2002 15:10
Picon

Re: indent doesn't work when no DTD

Leos Literak wrote:
> 
> shall I check them or uncheck them? I understand trim spaces
> as create one big file with no intendation. Am I right?

No. See below.

> And also I dont think if Open settings shall affect Save
> behaviour. In my eyes these are separate and even if opened
> file didn't have any intendation

True.

> and you set intendation on
> save, then save shall put intendation in saved file.
> What do you think?

True.

Here is the detailed explanation:
---------------------------------

In the case of documents without a DTD, when the "When no DTD is being
used, guess what spaces are not useful and trim them" toggle is checked,
Open behavior is based on the following _heuristic_ (heuristic 1):

1) When an element contains text other that white spaces, white spaces
are not stripped.

2) When an element contains other elements and white spaces, white
(Continue reading)

Leos Literak | 31 May 2002 15:14
Picon
Favicon

Re: indent doesn't work when no DTD

thanks

Hussein Shafie wrote:
> Leos Literak wrote:
> 
>>shall I check them or uncheck them? I understand trim spaces
>>as create one big file with no intendation. Am I right?
> 
> 
> No. See below.
> 
> 
>>And also I dont think if Open settings shall affect Save
>>behaviour. In my eyes these are separate and even if opened
>>file didn't have any intendation
> 
> 
> True.
> 
> 
>>and you set intendation on
>>save, then save shall put intendation in saved file.
>>What do you think?
> 
> 
> True.
> 
> 
> Here is the detailed explanation:
> ---------------------------------
(Continue reading)


Gmane