cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to prompt for dtd?

SOLVED
smacajone
Newbie

how to prompt for dtd?

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to prompt for dtd?

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

View solution in original post

8 REPLIES 8

Re: how to prompt for dtd?

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.

Re: how to prompt for dtd?

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.

Re: how to prompt for dtd?

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

Re: how to prompt for dtd?

Hi clay,

thank you for the tips!

Sonia

Re: how to prompt for dtd?

Did you resolve this issue?

If so, could you mark the Correct Answer, or let the community know how you resolved the issue?

Re: how to prompt for dtd?

Hi, sorry for delay.

I will add the doctype declation in he documents with a script as Gareth suggested.

Than you to all the community

Re: how to prompt for dtd?

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

View solution in original post

Re: how to prompt for dtd?

I Gareth,

thank you very much, I think your solution is the cleanest solution.

Thank you very much

Announcements