The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Fusebox 4.1 DTDs (and how to use them!)

posted under category: Fusebox on November 17, 2005 at 1:00 am by MrNate

Another thing I've been playing with lately is getting tag insight (you know, those little drop-downs while you type) to work on fusebox.xml and circuit.xml files. I'm no kind of Eclipse hacker, so the easy way to do it is make a DTD file for the XML editor you may already have in Eclipse.

Mmmkay... how does that help me? Glad you asked!

First, do you have an XML editor? You'll need one for this exercise. I prefer the WST XML editor from the Eclipse org., and it's easy for you to get. Go to your auto-update tool (under the help menu), and search the Eclipse update site for new plugins. Locate the WST (Web Standards Tools), select it and hit the 'select required' button. Now install and restart.

Next, you need to add the DTDs to the local DTD registry. What I did was hit the Eclipse prefs, and found the XML Catalog section under Web and XML. Then I added 2 user specified entries, for fusebox.xml and circuit.xml, pointed them to the appropriate DTD file on my local disk, made them a Public ID key type and gave the key a name (I used circuit.dtd and fusebox.dtd).

Next, in my XML files, I added this doctype to my circuits:
<!DOCTYPE fusebox:circuit PUBLIC "circuit.dtd" "circuit.dtd">
And to my Fusebox.xml:
<!DOCTYPE fusebox PUBLIC "fusebox.dtd" "fusebox.dtd">
I wish I knew what that all meant, but i'm ignorant out of lack for good books and time to read them ;)

And there it is. Restart Eclipse (for good measure) and it should all just work!
All you need is the DTDs to try it yourself, so here you go:

Fusebox 4.1 Document Type Definitions

These were copied and modified from the ones by Sandy Clark - Sandy, hope you don't mind. Good work getting it started, thanks!

Hope you all like. Let me know if any of you have any updates to these, as it's my first real stab at DTDs.

Too old to comment!
On Nov 18, 2005 at 1:00 AM mgw (mattw sends love to said:
Cool. I'm just learning Fusebox and this (along with your cheat sheet will definitely help). In Eclipse 3.1.1 with fusebox.xml open, I was able to right click, choose 'Add DTD information...' then browse to the newly-entered dtd key. Then all sorts of hints showed up.

The XML file was presented as a tree, I'm guessing because of the XML plugin.


On Nov 18, 2005 at 1:00 AM Nathan Strutz ( said:
Thanks for your comment. I don't know where you found the option to "Add DTD Information", but I'm interested to find out. Also, the XML tree view is a second way to view your XML docs. There should be some tabs on the bottom (Design and Source). Click the source view to switch it to plain text.

On Dec 5, 2007 at 1:00 AM SIGEPJEDI (sigepjedi who wouldn't be caught dead at said:
Im on Eclipse, Fusebox5, using XML Buddy.

If you right click on fusebox.xml.cfm in the navigator tab window, Properties > XMLBuddy > DTD

There you can "Use this DTD"

Ive added the entries, but Im not getting any tag insight....
Too old to comment!