We have a few XML based interfaces that is quite well documented in XSD schemas. The interfaces are now going to be publicly available and we would like to create reference documentation for them.
我们有一些基于XML的接口,这些接口在XSD模式中有很好的文档说明。接口现在将公开,我们希望为它们创建参考文档。
Is there a tool that can automatically convert XSD files into some more readable format?
是否有一种工具可以自动地将XSD文件转换成更可读的格式?
8 个解决方案
#1
17
x3sp might do what you want: http://xml.fiforms.org/xs3p/
x3sp可以做你想做的事情:http://xml.fiforms.org/xs3p/
#2
15
Insert this at the top of the XSD
将它插入XSD的顶部。
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xs3p.xsl"?>
Then you can directly view the XSD file using a web-browser. The web browser does the conversion to HTML using the specified XSLT.
然后,您可以使用web浏览器直接查看XSD文件。web浏览器使用指定的XSLT进行HTML转换。
You don't need an XSL processor, but stylesheets like xs3p won't generate links using this approach. I use the Firefox web-browser, IE8 seems useless for this.
您不需要XSL处理器,但是像xs3p这样的样式表不会使用这种方法生成链接。我用的是火狐浏览器,IE8对我来说毫无用处。
I've tried these xsl stylesheets: https://sourceforge.net/projects/xs3p/files/xs3p-1.1.3.zip/download http://crism.maden.org/consulting/pub/xsl/xsd2html.xsl
我已经尝试了这些xsl样式表:https://sourceforge.net/projects/xs3p/files/xs3p-1.1.3.zip/download http://crism.org/consulting/pub/xsl/xsd2html .xsl。
I think I prefer xs3p.
我想我更喜欢xs3p。
#3
6
oXygen has very nice XSD schema documentation tool that allows for easy customization through options and additional CSS files.
氧有非常好的XSD模式文档工具,允许通过选项和附加的CSS文件进行简单的定制。
I haven't used it before, but DocFlex/XML is an XML documentation tool with an XSD documentation component called XSD Doc that looks interesting.
我以前没有使用过它,但是DocFlex/XML是一种XML文档工具,具有XSD文档组件,称为XSD文档,看起来很有趣。
Of couse, as pointed out in on of the other answers, XSD is just an XML file so a custom XSLT could be written to generate any documentation output you like.
当然,正如其他答案中指出的,XSD只是一个XML文件,因此可以编写自定义XSLT来生成您喜欢的任何文档输出。
#4
2
An XSLT script can do the job.
XSLT脚本可以完成这项工作。
#5
2
The odds are pretty good that you don't want to use a generic tool for documenting your schema. Schema documentation tools (I'm most familiar with the one in XML Spy) are designed to make schemas readable. From your description, it sounds like that's not really what you want; what you want is to use the information in your schema to as the basis of software documentation.
很有可能您不希望使用通用工具来记录您的模式。模式文档工具(我最熟悉的是XML Spy)的设计目的是使模式可读。从你的描述来看,这似乎不是你真正想要的;您想要的是将您的模式中的信息作为软件文档的基础。
When I've needed to do this, the approach I took was to design HTML that looked the way I needed the documentation to look, and then figure out what information in the schema I'd need to grab to populate it. Using that as a template, it's pretty straightforward to pull in relevant information from the schema using XSLT.
当我需要这样做的时候,我采用的方法是设计HTML,它看起来就像我需要文档的样子,然后找出我需要在模式中获取什么信息来填充它。使用它作为模板,使用XSLT从模式中提取相关信息非常简单。
#6
1
I have generated documentation in the past using a tool I found on Freshmeat.net called xsddoc. Looking it up just now (to get the direct link), I see that it has been superceded by its developers with a tool called xnsdoc. The newer one is free for use by open-source projects, but if you are using this for a commercial product you may have to license it. If the last version released under the "xsddoc" banner suits your purposes, then you can just use that one.
我过去曾使用在Freshmeat.net上发现的名为xsddoc的工具生成文档。现在查找它(为了获得直接链接),我发现它已经被它的开发人员用一个名为xnsdoc的工具取代了。更新的版本对开源项目是免费的,但是如果你把它用于商业产品,你可能需要授权它。如果在“xsddoc”横幅下发布的最后一个版本适合您的目的,那么您可以使用它。
The documentation it produces has the look and feel of Javadoc, and allows for some degree of control in the stylesheet, etc.
它生成的文档具有Javadoc的外观和感觉,并允许在样式表中进行某种程度的控制,等等。
#7
1
If you are ready to delve into the intricacies of Sandcastle, I highly recommend XML Schema Documenter which is a plugin for the excellent Sandcastle Help File Builder.
如果您已经准备好深入了解Sandcastle的复杂性,我强烈推荐XML Schema Documenter,它是一个优秀的Sandcastle帮助文件构建器的插件。
Possible outputs are the same as Sandcastle: a website, a HTML Help (CHM) file, MS Help 2 content, MS Help Viewer 1...
可能的输出与Sandcastle相同:一个网站,一个HTML帮助(CHM)文件,MS帮助2内容,MS帮助查看器1…
#8
-2
It's should not be to hard to convert it (or write in advance) to docbook format.
将它(或预先编写)转换成docbook格式应该不难。
#1
17
x3sp might do what you want: http://xml.fiforms.org/xs3p/
x3sp可以做你想做的事情:http://xml.fiforms.org/xs3p/
#2
15
Insert this at the top of the XSD
将它插入XSD的顶部。
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xs3p.xsl"?>
Then you can directly view the XSD file using a web-browser. The web browser does the conversion to HTML using the specified XSLT.
然后,您可以使用web浏览器直接查看XSD文件。web浏览器使用指定的XSLT进行HTML转换。
You don't need an XSL processor, but stylesheets like xs3p won't generate links using this approach. I use the Firefox web-browser, IE8 seems useless for this.
您不需要XSL处理器,但是像xs3p这样的样式表不会使用这种方法生成链接。我用的是火狐浏览器,IE8对我来说毫无用处。
I've tried these xsl stylesheets: https://sourceforge.net/projects/xs3p/files/xs3p-1.1.3.zip/download http://crism.maden.org/consulting/pub/xsl/xsd2html.xsl
我已经尝试了这些xsl样式表:https://sourceforge.net/projects/xs3p/files/xs3p-1.1.3.zip/download http://crism.org/consulting/pub/xsl/xsd2html .xsl。
I think I prefer xs3p.
我想我更喜欢xs3p。
#3
6
oXygen has very nice XSD schema documentation tool that allows for easy customization through options and additional CSS files.
氧有非常好的XSD模式文档工具,允许通过选项和附加的CSS文件进行简单的定制。
I haven't used it before, but DocFlex/XML is an XML documentation tool with an XSD documentation component called XSD Doc that looks interesting.
我以前没有使用过它,但是DocFlex/XML是一种XML文档工具,具有XSD文档组件,称为XSD文档,看起来很有趣。
Of couse, as pointed out in on of the other answers, XSD is just an XML file so a custom XSLT could be written to generate any documentation output you like.
当然,正如其他答案中指出的,XSD只是一个XML文件,因此可以编写自定义XSLT来生成您喜欢的任何文档输出。
#4
2
An XSLT script can do the job.
XSLT脚本可以完成这项工作。
#5
2
The odds are pretty good that you don't want to use a generic tool for documenting your schema. Schema documentation tools (I'm most familiar with the one in XML Spy) are designed to make schemas readable. From your description, it sounds like that's not really what you want; what you want is to use the information in your schema to as the basis of software documentation.
很有可能您不希望使用通用工具来记录您的模式。模式文档工具(我最熟悉的是XML Spy)的设计目的是使模式可读。从你的描述来看,这似乎不是你真正想要的;您想要的是将您的模式中的信息作为软件文档的基础。
When I've needed to do this, the approach I took was to design HTML that looked the way I needed the documentation to look, and then figure out what information in the schema I'd need to grab to populate it. Using that as a template, it's pretty straightforward to pull in relevant information from the schema using XSLT.
当我需要这样做的时候,我采用的方法是设计HTML,它看起来就像我需要文档的样子,然后找出我需要在模式中获取什么信息来填充它。使用它作为模板,使用XSLT从模式中提取相关信息非常简单。
#6
1
I have generated documentation in the past using a tool I found on Freshmeat.net called xsddoc. Looking it up just now (to get the direct link), I see that it has been superceded by its developers with a tool called xnsdoc. The newer one is free for use by open-source projects, but if you are using this for a commercial product you may have to license it. If the last version released under the "xsddoc" banner suits your purposes, then you can just use that one.
我过去曾使用在Freshmeat.net上发现的名为xsddoc的工具生成文档。现在查找它(为了获得直接链接),我发现它已经被它的开发人员用一个名为xnsdoc的工具取代了。更新的版本对开源项目是免费的,但是如果你把它用于商业产品,你可能需要授权它。如果在“xsddoc”横幅下发布的最后一个版本适合您的目的,那么您可以使用它。
The documentation it produces has the look and feel of Javadoc, and allows for some degree of control in the stylesheet, etc.
它生成的文档具有Javadoc的外观和感觉,并允许在样式表中进行某种程度的控制,等等。
#7
1
If you are ready to delve into the intricacies of Sandcastle, I highly recommend XML Schema Documenter which is a plugin for the excellent Sandcastle Help File Builder.
如果您已经准备好深入了解Sandcastle的复杂性,我强烈推荐XML Schema Documenter,它是一个优秀的Sandcastle帮助文件构建器的插件。
Possible outputs are the same as Sandcastle: a website, a HTML Help (CHM) file, MS Help 2 content, MS Help Viewer 1...
可能的输出与Sandcastle相同:一个网站,一个HTML帮助(CHM)文件,MS帮助2内容,MS帮助查看器1…
#8
-2
It's should not be to hard to convert it (or write in advance) to docbook format.
将它(或预先编写)转换成docbook格式应该不难。