I tried all the options, but couldn't tag completion to get to work. Does a feature like this exist ?
e.g. right click in the editing window or hitting TAB in the "Insert Elements" window ?
Some information:
- v. 1.0.8.7 on Windows XP swiss-french up-to-date
- the document validates against the DTD, also finds errors if I add some
- I did not use the "associate DTD option" but just use a DOCTYPE system declaration
- I have the same issue with an XSD version (validator works, but I can't get tag insertion to work)
Tag completion should definitely work on your system. One way of testing this is to create a new document using the DocBook, DITA, TEI, XHTML or RSS templates. All of these should offer full tag completion where appropriate.
The program offers two mechanisms:
(a) in the editor, tag completion comes into effect when you type in the open angle bracket '<'; attribute name/value completion occurs when you press space and '=' respectively. Please note that tag completion is disabled while tags are locked. Press Ctrl+L or toggle the chain icon to switch tag locking on/off.
(b) in the Insert Element/Insert Sibling pane, you can double click element names to insert.
If tag completion does not work for these documents, please let me know as this is part of the program's core functionality.
Finally, if you find that tag completion works for DocBook, DITA, XHTML etc. but not for your document, it is probable that the document is attached to a remote DTD. Validation will access remote DTDs (if the relevant checkbox under Tools>Options>General is ticked), but tag completion/validation-as-you-type will not. The solution is to use a PUBLIC identifier and provide a local copy of the DTD. The DTD itself could live anywhere on your system, but the PUBLIC identifier needs to be mapped to the local DTD in C:\Program Files\XML Copy Editor\catalog\catalog. (This is an XML file, so you can easily edit it in the program.)
<right click in the editing window or hitting TAB in the "Insert Elements" window>
Right click in the editor is currently used for other functions. In the Insert Element pane, double click or Tab followed by Return will insert the currently selected element.
<I did not use the "associate DTD option" but just use a DOCTYPE system declaration>
This is not a problem. If DTD validation works, the document is correctly associated with the DTD.
<I have the same issue with an XSD version (validator works, but I can't get tag insertion to work)>
XSD tag completion is in preparation but not yet available. It is scheduled to appear in the near future, at the same time as XSD validation-as-you-type.
Please let me know if I can help in any way (email gnschmidt at users dot sourceforge dot net, otherwise you could try the mailing list or respond to this thread).
Regards,
Gerald
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanx, DocBook and DITA do work find indeed.
It then didn't take me a long time to find the problem. I was writing in ISO Latin AND had an ISO latin declaration in the DTD too. I believe that the latter is legal (but I am no XML expert)
(1) I had the following XML and DTD combo which didn't work at all:
-----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE RECIT SYSTEM "recit.dtd">
<RECIT> </RECIT>
------
and this head of DTD which allows me to write french comments in the DTD.
------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DTD pour écrire des récits TRES simples. -->
<!ELEMENT RECIT (Titre, Contexte, Probleme, But, FIL, Morale, INFOS)>
....
------
(2) This works fully. (the DTDs are the same as above basically, just ripped of the XML declaration)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE RECIT SYSTEM "recit-utf-8.dtd">
(3) This woks without the "<" shortcut as I expected :)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE RECIT SYSTEM "recit-utf-8.dtd">
The world is clearly moving towards UTF-8, but some people still like to write in ISO Latin, up to you to decide if you wish to support this :)
I actually now have an other feature request for some future version:
- show elements in the right order (instead of alphabetically)
- mark somehow the mandatory ones
Thanx a lot for your help ! - Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for sending me the files: I get the same results on my computer. I will need to look at the DTD parser in detail. If the underlying parser (Expat) returns an error when it encounters the DTD's XML declaration, there may not be a lot that can be done – though it's interesting that libxml and MSXML validate the file without complaining.
If, however, the error is produced in the program's source, I will treat it as a bug and fix it as soon as possible. I will let you know how I get on.
-Gerald
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I tried all the options, but couldn't tag completion to get to work. Does a feature like this exist ?
e.g. right click in the editing window or hitting TAB in the "Insert Elements" window ?
Some information:
- v. 1.0.8.7 on Windows XP swiss-french up-to-date
- the document validates against the DTD, also finds errors if I add some
- I did not use the "associate DTD option" but just use a DOCTYPE system declaration
- I have the same issue with an XSD version (validator works, but I can't get tag insertion to work)
I made a quick evalutation of existing editors and yours just would be perfect if I can get this feature to work:
http://edutechwiki.unige.ch/en/XML_editor
- greetings - Daniel Schneider at tecfa.unige.ch
Tag completion should definitely work on your system. One way of testing this is to create a new document using the DocBook, DITA, TEI, XHTML or RSS templates. All of these should offer full tag completion where appropriate.
The program offers two mechanisms:
(a) in the editor, tag completion comes into effect when you type in the open angle bracket '<'; attribute name/value completion occurs when you press space and '=' respectively. Please note that tag completion is disabled while tags are locked. Press Ctrl+L or toggle the chain icon to switch tag locking on/off.
(b) in the Insert Element/Insert Sibling pane, you can double click element names to insert.
If tag completion does not work for these documents, please let me know as this is part of the program's core functionality.
Finally, if you find that tag completion works for DocBook, DITA, XHTML etc. but not for your document, it is probable that the document is attached to a remote DTD. Validation will access remote DTDs (if the relevant checkbox under Tools>Options>General is ticked), but tag completion/validation-as-you-type will not. The solution is to use a PUBLIC identifier and provide a local copy of the DTD. The DTD itself could live anywhere on your system, but the PUBLIC identifier needs to be mapped to the local DTD in C:\Program Files\XML Copy Editor\catalog\catalog. (This is an XML file, so you can easily edit it in the program.)
<right click in the editing window or hitting TAB in the "Insert Elements" window>
Right click in the editor is currently used for other functions. In the Insert Element pane, double click or Tab followed by Return will insert the currently selected element.
<I did not use the "associate DTD option" but just use a DOCTYPE system declaration>
This is not a problem. If DTD validation works, the document is correctly associated with the DTD.
<I have the same issue with an XSD version (validator works, but I can't get tag insertion to work)>
XSD tag completion is in preparation but not yet available. It is scheduled to appear in the near future, at the same time as XSD validation-as-you-type.
Please let me know if I can help in any way (email gnschmidt at users dot sourceforge dot net, otherwise you could try the mailing list or respond to this thread).
Regards,
Gerald
Dear Gerald
Thanx, DocBook and DITA do work find indeed.
It then didn't take me a long time to find the problem. I was writing in ISO Latin AND had an ISO latin declaration in the DTD too. I believe that the latter is legal (but I am no XML expert)
(1) I had the following XML and DTD combo which didn't work at all:
-----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE RECIT SYSTEM "recit.dtd">
<RECIT> </RECIT>
------
and this head of DTD which allows me to write french comments in the DTD.
------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DTD pour écrire des récits TRES simples. -->
<!ELEMENT RECIT (Titre, Contexte, Probleme, But, FIL, Morale, INFOS)>
....
------
(2) This works fully. (the DTDs are the same as above basically, just ripped of the XML declaration)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE RECIT SYSTEM "recit-utf-8.dtd">
(3) This woks without the "<" shortcut as I expected :)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE RECIT SYSTEM "recit-utf-8.dtd">
The world is clearly moving towards UTF-8, but some people still like to write in ISO Latin, up to you to decide if you wish to support this :)
I actually now have an other feature request for some future version:
- show elements in the right order (instead of alphabetically)
- mark somehow the mandatory ones
Thanx a lot for your help ! - Daniel
Thanks for sending me the files: I get the same results on my computer. I will need to look at the DTD parser in detail. If the underlying parser (Expat) returns an error when it encounters the DTD's XML declaration, there may not be a lot that can be done – though it's interesting that libxml and MSXML validate the file without complaining.
If, however, the error is produced in the program's source, I will treat it as a bug and fix it as soon as possible. I will let you know how I get on.
-Gerald
Sorry Daniel, the error was of course mine! This bug is fixed in the source. The patch will be released with version 1.0.8.8.
Apologies for the inconvenience, and thanks again for your help!
Regards,
Gerald