Вопрос

I have a problem with the Java and Xerces parser on Windows. I have a file prepared by another group of developers and they use backslashes in the DTD file path. The path begins with backslash and it should mean, that the path is an absolute path beginning in the root. But it works this way just with slashes. If backslashes used, the first backslash is ignored and the path begins in working directory. In my opinion this is not a standard solution to use backslashes. Each XML file I've ever seen uses slashes.

Have anybody encountered similar problem? Is there some workaround in Xerces settings or must the another group work regarding the standard? (Unfortunately they have a lot of these files and they don't want to change them at all.)

Это было полезно?

Решение

they use backslashes in the DTD file path

Then they need to stop doing that. They are not complying with the XML standard. A DTD path is a partial URI and the separators are forward-slashes: see #1.2.3.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top