Предыдущая тема :: Следующая тема |
Автор |
Сообщение |
Kurt Гость
|
Добавлено: Вт Ноя 15, 2005 20:21 Заголовок сообщения: Something weird here... |
|
|
I am not a great expert in XML, but something strange with your FB2 format. There is an editor with XML support SlickEdit. If I load into it OEB file and validate it everything is fine, but if I try to open FB2 file and validate it, the editor complains:
What could be the problem? Who is the culprit: your format or SlickEdit XML validator?
Thank you for your help. |
|
Вернуться к началу |
|
|
GribUser Автор формата FB2 - Автор библиотеки FB
Зарегистрирован: 30.09.2004 Сообщения: 2475 Откуда: Москва
|
Добавлено: Вт Ноя 15, 2005 21:06 Заголовок сообщения: |
|
|
OEB validation as based upon DTD, fb2 uses schema - it's much more flexible. SlickEdit probably does not support schema validation. Use validator from FBTools, this one:
http://www.gribuser.ru/xml/fictionbook/2.0/software/fb2_verify.rar
with new chema. Or use XMLSpy. For linux use
Код: | xmllint --noout --schema FictionBook.xsd MySuperBook.fb2
| (Requires libxml2) |
|
Вернуться к началу |
|
|
Kurt Гость
|
Добавлено: Вт Ноя 15, 2005 22:00 Заголовок сообщения: |
|
|
Thank you for the answer. Unfortunately, not validated file cannot use full XML support in SlickEdit, so it is not a problem of FB2 validation per se. All right, I'll try to contact SlickEdit support... |
|
Вернуться к началу |
|
|
Kurt Новенький участник форума
Зарегистрирован: 20.04.2006 Сообщения: 3
|
Добавлено: Чт Апр 20, 2006 18:49 Заголовок сообщения: |
|
|
Once again my question about validation of your files. Right, SlickEdit is not an industry standard tool for XML file validation, so it's the culprit (as we decided...)
But it turns out not so simple. I tried Microsoft Visual Web Developer 2005 which is definitely XML tool of choice. It does not complain about DTD, but does not show any schema elements in the prompt either. But if I load any other XML file, e.g.
Код: |
<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
<Schema href="%VsInstallDir%/Common7/IDE/Policy/Schemas/TDLSchema.xsd"
targetNamespace="http://www.microsoft.com/schema/EnterpriseTemplates/TDLSchema"/>
<Schema href="%VsInstallDir%/Common7/IDE/Policy/Schemas/Policy.xsd"
targetNamespace="http://schemas.microsoft.com/VSPolicy/PDLSchema"/>
<Schema href="%VsInstallDir%/xml/schemas/%LCID%/snippetformat.xsd"
targetNamespace="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"/>
<Schema href="%VsInstallDir%/xml/schemas/%LCID%/vstemplate.xsd"
targetNamespace="http://schemas.microsoft.com/developer/vstemplate/2005"/>
<Schema href="%VsInstallDir%/xml/schemas/%LCID%/Microsoft.Build.xsd"
targetNamespace="http://schemas.microsoft.com/developer/msbuild/2003"/>
<Schema href="%VsInstallDir%/xml/schemas/%LCID%/vscontent.xsd"
targetNamespace="http://schemas.microsoft.com/developer/vscontent/2005"/>
<Schema href="%VsInstallDir%/common7/packages/SDM/Schema/SystemDefinitionModel.xsd"
targetNamespace="http://schemas.microsoft.com/SystemDefinitionModel/2005/1" />
<Association extension="config" schema="%VsInstallDir%/xml/schemas/dotNetConfig.xsd"/>
</SchemaCatalog>
|
it works fine, and all schema elements could be used from IntelliSence prompt.
So, something still is definitely fishy with your format... |
|
Вернуться к началу |
|
|
GribUser Автор формата FB2 - Автор библиотеки FB
Зарегистрирован: 30.09.2004 Сообщения: 2475 Откуда: Москва
|
Добавлено: Чт Апр 20, 2006 21:13 Заголовок сообщения: |
|
|
Kurt писал(а): | So, something still is definitely fishy with your format... | You complain about tools I've never used. All I know is fb2 is w3c-complant. Whatewer extentions (as shown above) do M$ involves. Even the ancient versions of XMLSpy can use fb2 schema to edit xml, I'm left guessing what prevents Microsoft Visual Web Developer from doing so. And I doubt it is "tool of choice". In fact I suppose it is not from what you say.
ps. In fact you must have messed with namespaces (see those targetNamespace?) so M$ is innocent. Supporting schema is way to easy to make it work that bad.
pps. The resume is: you should read docs for the tool you use and understand, what exactly goes wrong. I'm 99% sure fb2's schema is ok. |
|
Вернуться к началу |
|
|
Kurt Новенький участник форума
Зарегистрирован: 20.04.2006 Сообщения: 3
|
Добавлено: Чт Апр 20, 2006 21:48 Заголовок сообщения: |
|
|
GribUser писал(а): | And I doubt it is "tool of choice". In fact I suppose it is not from what you say. |
I called it "tool of choice" not because it is so good, but because it is easily available...
GribUser писал(а): | ps. In fact you must have messed with namespaces (see those targetNamespace?) so M$ is innocent. Supporting schema is way to easy to make it work that bad. |
I do not quite understand what do you mean, but I did not mess with anything: this code fragment is from a real file without any change...
GribUser писал(а): | pps. The resume is: you should read docs for the tool you use and understand, what exactly goes wrong. I'm 99% sure fb2's schema is ok. |
Yes, sure, no doubt... My point was that I simply loaded two XML files in the same tool, and one file is working, and other not. I hoped that experts around could immediately tell me what is wrong... Another point is that your validation tools use schema file locally only, maybe the problem is with a remote access... Anyway, thanks for replying... |
|
Вернуться к началу |
|
|
Kurt Новенький участник форума
Зарегистрирован: 20.04.2006 Сообщения: 3
|
|
Вернуться к началу |
|
|
|