Home Forums DITA and XMetaL Discussion Unusual problem with XMetal and specialized DITA DTD Reply To: Unusual problem with XMetal and specialized DITA DTD


Reply to: Unusual problem with XMetal and specialized DITA DTD

The only way XMetaL would tell you that your file is invalid in one instance but valid in another is that it is using two different DTDs depending on the location of the XML file, the SYSTEM and PUBLIC id and any catalog entries available that match the PUBLIC id. Check the SYSTEM path in the XML document to see that it is in fact pointing to the DTD in the same folder, and that the DTD itself does not reference any other files.

SYSTEM path refers to the same folder where xml file is. Therefore this can't be a SYSTEM related problem. I am also sure that DTD is not referencing to any other files so that can not be a problem in this case.

Note that XMetaL has an extensive catalog lookup mechanism in place for DITA documents and so if your XML file points to a DTD that cannot be found using the SYSTEM id XMetaL will use the PUBLIC id if present. If it finds a matching PUBLIC id in its catalogs then it will use one of the standard DITA DTDs that are installed with the product. I suspect that is what is occurring in your case.

There is no matching PUBLIC id in the catalog. I have actually tried to add specialized DTD through Tools > Select specialized DITA DTD, but it does not work either. My PUBLIC id is totally different than basic DITA PUBLIC ids so that can not be a problem. Therefore I do not believe that PUBLIC id mathing is the problem.

You will want to deploy your specialized DITA DTD so that XMetaL provides you with a DITA authoring experience. You cannot deploy it to a random location as you can with any other DTD if you want XMetaL to recognize it as DITA. If you deploy your DTD using any other method than the one described in the following help topic then it will not be recognized as DITA. What that means is that XMetaL will auto-generate a basic customization for you (CSS and CTM file) giving you basic XML authoring experience, but none of the special DITA authoring functionality will be enabled.

see help topic: Working with DITA > Specializations (and all subtopics)

I have read whole help and it really does not help. 🙂 The solution for this problem is (like I said) user rights, but in a way I do not understand that, because if I can edit my XML-file, why can't XMetal read DTD from the same folder, when my XML's SYSTEM id refers to the same folder?

OK, now I found the real reason…

It is the mydtd.rlx. It was an old one and for some reason XMetal does not update it. When I deleted the old one, mydtd.rlx, XMetal created new .rlx file and DTD was actually validated correctly!