Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have an xsd file and have not done much xml manipulation, parsing, etc. I want/need test xml files for my code but don't have any samples. (I am using xerces to parse)
This is similar to: xml-instance-generation-from-xml-schema-xsd
but I don't really want to make it a two step process. (python or java)
I just want to feed xsd file to some tool and have it generate a sample xml file. How can I do that?
Also see: how-to-generate-sample-xml-documents-from-their-dtd-or-xsd
Eclipse has tools for doing this (and it's free.)
EDIT (yeah, I was a little too terse) : What you want are the XSD editing tools in Eclipse. I know it's bundled with Eclipse IDE for Java EE Developers, and I think also with the Eclipse Modeling Tools download. (It's also possible to add them into an existing Eclipse install, though I don't know exactly which plugin(s) you'll want to add.)
(I'd like to be more precise than that, but the eclipse.org web site models itself after Massachusetts roads: If you don't know where you are, you don't belong there.)
Anyway: Once you've got the right version of Eclipse, open the existing schema file for editing (or create a new one: select File -> New... Other ... XML / XML Schema ). When you're ready to generate a test XML file, locate the file in the Package Explorer (the navigator view, usually on the left side), right click on it, and select Generate/XML File.
(What was I saying about navigability... ?)
Microsoft has published a "document generator" tool as a sample. This is an article that describes the architecture and operation of the sample app in some detail.
If you just want to use the doc generation tool, click here and install the MSI.
It's free. The source is available. Requires the .NET Framework to run. Works only with XSDs. (not Relax NG or DTD).
Oxygen's XML Schema Editor can generate sample XML instance documents from a given Schema.
I can do this very simply in VS2010, I don't know if this has been a new feature but this works pretty easy. Right click on the root element of an xsd in the 'xml schema explorer'. You will see an option to 'Generate Sample XML'. On clicking it VS creates a temp file
Liquid XML will do XML sample generation, don't think there's a command line option but you can do it through the UI. Seems to do a pretty good job, gets all the data types/enums right, the only thing it seems to struggle on is patterns, but then understanding a regular expression well enough to produce a valid string is a bit tricky...
Using Eclipse Ganymede or later you can generate xml from xsd. Just right click the xsd and navigate to generate > xml.
I've used XMLSpy for this in the past with great success.
You may use XMLFox for this simple task.
Have you taken a look at Microsoft's XML Schema Definition Tool (xsd.exe)?
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
During the development of my projects I find myself producing some large documents with slight variations on only a few paragraphs. For instance, the same configuration plan will be used throughout different projects but each document has to be tailored with specific data and to comply with some specific requirements.
Being a lazy person and a fan of model-driven development, I have been looking for ways to optimize this process and I got these options:
Document templates - Using master document templates (the presentation) with forms (the model) or restricting the edition of a document to only a few key fields, and then cross-referencing the inputted data all over the document would do the trick... but I still feel that I could de-couple both layers a bit more.
UML modeling - Using CASE tools with UML support, I thought I could model my documents as packages and classes with annotations, change the model for each project and generate a report using a document template. The problem is that those tools are not designed for treating large chunks of text and I am having some difficulties to progress.
Process modeling - Using Eclipse EPF https://www.eclipse.org/epf/ seems a bit overkilling for what I want to accomplish. Remember: I´m a lazy person.
I would like to ask the community on their experiences with model-based documentation or their ways to optimize the generation of documents throughout the software development cycle.
I'm not sure I fully understand, so apologies if this misses the mark.
I've faced (I think) a similar problem, where there's a many:many relationship between content and the documents it needs to be presented in. For example, a 'project overview' that needs to be included in a requirements document, project plan, etc.
Thus far the best solution I've found is:
Write each section in Markdown format. There are some nice editors that make writing Markdown easy and efficient (e.g. Mou on OSX).
Use Pandoc to convert Markdown into Restructured Text (RST).
Use Sphinx to generate documents from the RST files.
I have multiple Sphinx doc templates, each of which combines some of the common sections with others specific to that doc. If one of the common sections gets updated it's easy to re-generate all docs to incorporate. Version Control is pretty straightforward as the source files are all simple text. Sphinx can also generate multiple formats easily: for example html to put online, or pdf for printing/distribution.
You could remove the need for step 2 by writing in RST natively. For me the extra step is worth it as I haven't found an RST editor that's as comfortable or efficient as Mou. YMMV of course.
It's not a perfect solution: for example, creating links across sections isn't that easy. But in general it works well for my needs.
hth.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I maintain a small library project written in C++.
I'd like to use Sphinx to maintain the library website + user documentation per release version. I have found [similar question asked How to manage many versions? on the sphinx-dev mailing list which I have bumped but without extensive follow-up.
How to manage many versions?
I think of basic structure like this:
mylib/ <- website root
mylib/...
mylib/tutorial/...
mylib/doc <- list of documentation per release version
mylib/doc/1.0.0
mylib/doc/2.0.0
mylib/doc/X.Y.Z
I'm trying to figure out best practical configuration for this structure.
I have root configuration mylib/conf.py where I control the website structure and content.
I could put .rst files into mylib/doc/1.0.0 and mylib/doc/2.0.0 build them using the root conf.py. But then it seems tricky to control toctree for website and for docs.
So, I think it may be more practical to separate website config/build from per release documentation config/builds:
mylib/conf.py
mylib/doc/1.0.0/conf.py
mylib/doc/2.0.0/conf.py
mylib/doc/X.Y.Z/conf.py
but I'd like the main documents in mylib/doc/X.Y.Z/conf.py to use the same layout is the root documents in mylib/, so I can have consistent look, e.g. links in page header, etc.
This way I can easily achieve consistent toctree per documentation release.
It should be easy to walk the directories and perform builds for website and for each doc version separately.
Regarding searching the documentation, I don't mind the search engine to scan all versions of documentation per single query as well as I don't mind to have search engine specific to particular version (search box is displayed in the same place, but depending what is being read, it scans index of current version only).
Is there any better way to achieve that?
I've found similar question asked in sphinx for multiple, separate documents and I'm wondering if the Intersphinx plugin is a good idea here.
UPDATE:
2017-04-10: SO answer pointing to an interesting Sphinx extension: sphinxcobtrib-versioning
2011-10-21: Following olt's question in comments, mylib/ is not how I mean to structure project in VCS. So, I don't want to maintain multiple versions of documentation in VCS. The mylib/ is just structure for easier visualisation. It can be also working directory where I put Sphinx sources together (e.g. pull from version branches, etc.) and where I launch Sphinx to build the output.
In my opinion, the documentation should stay with the code in the same repository. Otherwise you would need to manage the documentation source manually, for example when you backport a feature from version B to A. With a single repository, you just check out that version and re-build the documentation.
You should look at SQLAlchemy project, they have multiple versions of their documentation available on the same site. The documentation is in the same repository and they copy the output of each version into their static homepage folders.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have had contact with Google Chromium Code and that’s terrific for building applications with. The problem now lies that no-one has tried to use it outside Google Chromium Project. What I have in mind is to develop an open source project which may be used for this purpose. The fundamental goals would be:
Guarantee Linux-Windows support for the same code.
Take advantage of all resources available like thread control, stats, unit test…
Make it clearer how to use Skia for graphic effects and customizations.
Present a useful application doing the most of this.
Integrate C++ and JavaScript code using V8
Use Webkit for rendering html content
There’s a chance of it get off the paper. What do YOU think?
Claudio M. Souza Junior
Developer.
see https://github.com/lianliuwei/chromium_base
I create it for the same reason like you.
chromium is great project. It's code could be useful to using in other project. but It need time to extract it. I see one project to extract the ui part, but it change too many for noreason for example it change the .cc to .cpp. my project extract the base, ui, view part for the origin project, rm the ICU (it's so big) and gurl(you can add it quick) keep the gyp, gclient, grit-i18n, gtest, gmock... change the code little. and keep the extract history. I add a new type of messageloop for using it in the MFC(for company project :( ) now it can only work on Windows but it's no so hard to make it work on linux.(google do it all)
for use the browser in you project you can see the http://code.google.com/p/chromium/ for help.
It's great this project help you a litte. I at first think it's a no one care project.
I'm assuming you have looked at the extensively documented and developed QtWebkit and know why you don't want to use that?
I'm sure it will be easier to use V8 in a QtWebkit application than to somehow tear out Chromium's "View project".
Qt has the bonus that as long as you operate within the framework, everything will work on a lot of different platforms (more than Chomium now supports I think).
I think there should be a tool to do so ? is anyone here aware of any ?
I saw other posts related to this but found none for C++, I am aware that I can do that with JAVA and C#.
If you use XML Spy or oXygen, you can generate sample XML files based on a schema. Both tools accept commandline options and can be run in batch mode so that'll probably fit in your unit tests, if that's what you're after. Wrap your own C++ code around it and you're in business.
If you need quality XML, with tons of tweakable options, you might want to check out http://www.code-generator.com/XML-Sample-Generator.aspx. No C++ here, just a tool that works, and rises beyond the default "lorem ipsum..." output.
HTH,
~Rob
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
In another question I asked if mutation-testing is useful in practice. As I didn't get any answers that satisfy me, I want to check the current tools myself. So I need an overview about current existing mutation-test-frameworks. Which of them are most usable and why?
I program in Java, so I would prefer Java-tools, but I would risk a look at interesting frameworks for different languages.
I want to integrate in an automatic build-process, so I would prefer tools that can be executed through command-line.
There is also PIT which can be hooked into your build via a maven plugin or command line interface.
It provides much nicer reports than the other available tools with combined mutation and line coverage. It also runs considerably faster than the source based tools for Java such as Jester, and about twice as fast as Jumble.
Unlike the Jumble and Javalanche it also works with all the major mocking frameworks (Mockito, JMock, EasyMock, PowerMock and JMockit).
(disclosure I'm the author).
I know it's an old thread, but it's still an answer to the question. I'm working with some friends on an open source .NET mutation testing framework called NinjaTurtles, which you can find on CodePlex and on Nuget. The main project website is here.
I only know of two frameworks, but they're both for Java :)
Jester
Jumble
I haven't used either of them, I'm afraid.
CREAM is a tool for C#/.Net
http://galera.ii.pw.edu.pl/~adr/CREAM/index.php
For Ruby there is Heckle, and a newcomer called Boo_hiss.
For the .Net community, there is NesTer, but it has some serious limitations. E.g. only supports C# and NUnit.
Does not appear to be actively maintained either, but it might be a starting point.
I took a look at Jester (the actual source code) and it seems to me that it does not support too many mutations. There is a file in there where these mutations are specified. I might be wrong about the above but what I definitely did not like was the mix between launching the tool from command line and the little GUI feedback interface. Why not give feedback in the command line like JUnit does when run outside an IDE?
Jumble is another thing :). It has a simple command line interface and comes with an Eclipse plugin too. The feedback is all text in the console. I am happy with this tool and I plan to write some ANT target to add it in my project continuous integration.
I am also looking at Javalanche but did not try it yet.
I'll have news in a few weeks.
Might be of some interest. Microsoft Research's: https://pex4fun.com/
You can try µJava. I haven't used it, but it looks like mutation testing might be an interesting way to evaluate test suites.
MμClipse only supports JUnit 3 and is no longer maintained.
Jester as for it, is laborious and requires a complicated configuration; plus is not maintained anymore.
The best tool I could find is Javalanche
I had wrote a entire article about this !
Jester does provide a file for the mutations and they are limited. To some degree, you can add your own mutations to the file.
I've experimented with Jumble and Jester and I found that Jumble provides more mutations and better documentation. Additionally, I've had quick responses from the project owners when I've emailed them. One drawback to Jumble is that it operates on the bytecode using BCEL. That presents something of a learning curve for many developers.
My company, State Farm, wrote an Ant task that we may contribute back to the Jumble project. Based on what I've read in their mailing lists, others are working on an Ant task for Jumble too.
I'm looking at Javalanche as well. I’ll be glad to share what I know when I’m done.