Coldfusion and XML issues
Aug 10th, 2006 by Karen
I spent the better part of two days this week working on getting Coldfusion to properly transform a finding aid from EAD into HTML so that we can display our archival finding aids as part of our website. The biggest problem with this process has been the fact that Coldfusion doesn’t like the way in which the DTD is attached to the EAD XML file. The original EADs have the DTD linked as a relative path. However, Coldfusion won’t parse the file with it this way. The only way I seem to be able to get it to work is to change
<!DOCTYPE ead PUBLIC “+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival Description (EAD) Version 2002)//EN” “ead.dtd”>
to
<!DOCTYPE ead PUBLIC “+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival Description (EAD) Version 2002)//EN” “http://serveraddress/path/to/ead.dtd”>
This was beyond maddening since all the other program I use to test transforms are fine with the path the way it is. A part of me is curious if I was using another programming language and hence another XML parser if thing would work the way I anticipate. However, I don’t really have time to test out my theory at the moment. Now that I’ve actually gotten a transform to work I want to make the transform format things the way I want.
After that I plan on doing some work using Coldfusion to add RSS and Atom feed to our web pages. There are many good code example that demonstrate how to do this out on the web, but I’m thinking of adding a little AJAX to the mix to enhance the display. All of this effort is part of work to build a module in our new content management system that is capable of handling XML. I’m really excited about getting this working. The module will be even more powerful if I’m able to get the XML server for our catalog in the next year. For now I’m content with baby steps because I know they can lead to bigger things.


[...] Karen at Library Web Chic talks today about Coldfusion dealing with relative and absolute paths when transforming xml. I’ve found ColdFusion to be very picky about paths no matter what it’s doing. This includes scheduling tasks, uploading files, etc. Although that’s probably a good thing. [...]
I had this same problem, Saxon couldn’t find the dtd since it wasn’t on my server and certainly not in the same folder as the ead file.
I changed my xml to point to the dtd out on the Internet.
This is similar to how XHTML files start.
So I now have
<!DOCTYPE ead PUBLIC “+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival Descr
iption (EAD) Version 2002)//EN” “http://oac.cdlib.org/ents/ead.dtd”>
I got the impression that this is more correct ead anyway.