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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

how to prompt for dtd?

smacajone
1-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

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

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.

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.

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

Hi clay,

thank you for the tips!

Sonia

Did you resolve this issue?

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

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

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

I Gareth,

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

Thank you very much

Top Tags