Skip to main content
1-Visitor
February 12, 2016
Solved

how to prompt for dtd?

  • February 12, 2016
  • 1 reply
  • 4179 views

Hi All,

I use Arbortext editor 6.0 M060, I can't set the promptnodtd to on because  i can't find it in the options list.

It should be set to on by default, but  when I open a document without a doctype declaration, the editor open it  in free-form XML mode, without prompting for the dtd.

Anyone can help me?

thanks

Sonia

Best answer by GarethOakes

I like Clay's suggestion. Something else you could consider along those lines is a script to scan all existing XML files, and for those files without a doctype, perform a simple heuristic analysis in order to determine and assign a DOCTYPE declaration to each. Or if you had a limited set of DOCTYPEs then just try each DOCTYPE one at a time until the file validates

1 reply

16-Pearl
February 14, 2016

The 6.0 release is quite old, perhaps the option you are looking for was not implemented? I think all options should be in the list. If it's a hidden option of somesort then you will be forced to use Editor command line or ACL script to toggle it: "set promptnodtd=yes" or whatever is required.

The recommended way to work with new doctypes is to install the DTD into your "custom" folder and register its PUBLIC doctype identifier(s) within your catalogs file.

smacajone1-VisitorAuthor
1-Visitor
February 15, 2016

thanks for your reply.

The option is described in the help center, so I expected to find it in the list (tools - preferences- advanced-) but unfortunatily it's not there. As I wrote I have already

tried to set it the acl code as described in the help center, but it doesn't work, nothing happend. So I thought it could be a bug and I wonder if there is a workaround for it

I have all my dtds and doctypes stuff (fosi, acl etc..) in costum folder, an I have a catalog with public doctypes declared, BUT I have some thousands of documents without a doctype declation inside.

18-Opal
February 15, 2016

Hi Sonia--

Actually, I think that option is meant for the case where the document contains a doctype declaration, but the doctype file can't be found in the specified location. At that point it will prompt you for a new location from which to load the DTD.

For what you are doing, you may need to add some custom ACL code to let users choose a DTD for documents that don't specify one. You could write a function that prompts the user for a document filename, and also for a doctype file (DTD or schema), and then uses doc_open() to open the document with that doctype. You could attach that function to a menu item called "Open with Selected Doctype".

--Clay