- Aldebaran Robotics: http://www.aldebaran-robotics.com/
- Zenta Robotic Creations: http://robot-kits.org/
- MorphHex video: http://robot-kits.org/2011/12/10/morphex-video-part-ii/
Today’s Robot Links
New Favorite Quote
I have a new favorite quote … one that really made my day:
In other words the universe could in theory spontaneously explode at some point releasing huge amounts of energy as it fell into a more stable lower energy vacuum state. This catastrophe would spread across the universe at the speed of light in an unstoppable wave of heat that would destroy everything in its path.
Source: http://blog.vixra.org/2011/12/04/what-would-a-higgs-at-125-gev-tell-us/
Today’s Robot Links
- PocketBot: http://www.ostan.cz/pocketBot/
- PocketBot2: http://ostan.cz/PocketBot2/
- DYIBin – electronics & robotics simplified: http://www.diybin.com/
XML Question
I’m pretty much a “n00b” when it comes to XML and defining domian specific languages, but I have a problem and I think XML is the right solution. So, I’m writing up my question here on my blog so I can point to this post when I ask people for help. Here it goes …
I want to define a format for a text file that will allow me to quickly create a series of questions for a questionnaire. Once defined I intend to write a program (in Ruby) that will parse my text files and create questionnaires in HTML or PDF. At the most basic level, the text file might look like this:
Start Questionnaire Q: Where were you born? Select one Wiscosnin Outside Wisconsin Unknown Q: Which device(s) do you own? Select all that apply TV Automobile, van, truck or motorcycle Personal computer Home Red plastic dinosaur Q: When do you leave for work? Enter time End Questionnaire
A more XML-esque file might look more like this:
<questionnaire>
<question>
<question-id>A13C76</>
<question-number>1</>
<pre-question>Knowing where you were born is important when determining benefits.</>
<question-text>Were you born in the United States?</>
<answer type="radio" text="Select One">
<answer-option>Yes</>
<answer-option>No</>
<answer-option>Unknown</>
</answer>
</question>
</questionnaire>
Assume I need to create many dozens of these questionnaires on a regular basis.
My questions to the XML/DSL experts out there are:
- How can I find out if someone has already created a schema for asking questions and providing answer options?
- If I want to parse these text files into HTML forms using Ruby, is XML the way to go?
- Is there a better way to do all of this?
Any answers or thoughts will be greatly appreciated! And, thanks in advance for your help.
