# Cod9新结构xml可否与xdxf格式结合优化下

**URL:** <https://forum.freemdict.com/t/topic/7764>\
**Category:** 技术交流与词典编修\
**Created:** [2021 年8 月 16 日 16:43 UTC](https://forum.freemdict.com/t/topic/7764 "2021-08-16T16:43:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

作者： ![lemonlab](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/l/dc4da7/32.png) [@lemonlab](https://forum.freemdict.com/u/lemonlab)\
发布日期： [2021 年8 月 16 日 16:43 UTC](https://forum.freemdict.com/t/topic/7764/1 "2021-08-16T16:43:39Z")

</div>

[牛津现代英汉双解V1 正式发布 (全中英切换版, 复查错误; 2020-05-28更新 END : ) - 英汉 - FreeMdict Forum](https://forum.freemdict.com/t/topic/1290/344)

此处的新结构应该是XML格式,标签名短小简洁,加上css可以直接呈现html一样美观  
xdxf是特定的XML词典格式,可直接被Goldendict识别读取,方便整理词典源文件.目前没有好的css样式可参考  
如果将两者优点结合,做一个升级版的xdxf倒也不失为一种清晰数据的好的通用格式

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2021 年8 月 16 日 17:04 UTC](https://forum.freemdict.com/t/topic/7764/2 "2021-08-16T17:04:49Z")

</div>

xdxf是很好，只是转换成本过高了。

---

<div class="post-metadata">

作者： ![lemonlab](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/l/dc4da7/32.png) [@lemonlab](https://forum.freemdict.com/u/lemonlab)\
发布日期： [2021 年8 月 16 日 17:25 UTC](https://forum.freemdict.com/t/topic/7764/3 "2021-08-16T17:25:50Z")

</div>

我主要想提取多个词典里的例句之类的,寻找一种存贮格式

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2021 年8 月 16 日 17:29 UTC](https://forum.freemdict.com/t/topic/7764/4 "2021-08-16T17:29:07Z")

</div>

可以先提取，用mdx存xdxf是一样的。

---

<div class="post-metadata">

作者： ![lemonlab](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/l/dc4da7/32.png) [@lemonlab](https://forum.freemdict.com/u/lemonlab)\
发布日期： [2021 年8 月 18 日 02:37 UTC](https://forum.freemdict.com/t/topic/7764/5 "2021-08-18T02:37:21Z")

</div>

针对xdxf,goldendict已经是简单支持的,并内置了简单css?

不必像xdxf一样对内容做DTD严格限制,去掉该语句可行吗  
无需过于强调语义化,设计的时候还是要考虑如何方便css控制  
只利用它大框架结构,比如词头部分,原先的def\>是否滥用了,内部def\>改个新标签?  
不同区块缩进有明确的标签,如cod9的 sa\> sb\> sc\>,还是更好办法呢

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2021 年8 月 18 日 03:38 UTC](https://forum.freemdict.com/t/topic/7764/6 "2021-08-18T03:38:00Z")

</div>

xdxf的dtd，goldendict是不会去检查的。goldendict只是当成html来处理，但是会提取某些特定的标签，如版本，图片，链接之类的，goldendict会不会报错，你要自己尝试了。添加新标签应该没问题。
